From 333cb5cfa710c6b563b01f4aa3cc6bb4321151f2 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 1 Sep 2022 21:00:45 +0000 Subject: [PATCH 1/2] fix: additional error codes added to service configuration for retry PiperOrigin-RevId: 471585446 Source-Link: https://github.com/googleapis/googleapis/commit/e1b54cd79326cd4aae95ea7ae121dcd115a44dbf Source-Link: https://github.com/googleapis/googleapis-gen/commit/5cf9f3d16d4414508889245a7ac5ae36f4d886ee Copy-Tag: eyJwIjoiamF2YS1hcGlnZWUtcmVnaXN0cnkvLk93bEJvdC55YW1sIiwiaCI6IjVjZjlmM2QxNmQ0NDE0NTA4ODg5MjQ1YTdhYzVhZTM2ZjRkODg2ZWUifQ== --- .../apigeeregistry/v1/ProvisioningClient.java | 994 ++++ .../v1/ProvisioningSettings.java | 317 + .../apigeeregistry/v1/RegistryClient.java | 5082 +++++++++++++++++ .../apigeeregistry/v1/RegistrySettings.java | 664 +++ .../apigeeregistry/v1/gapic_metadata.json | 171 + .../cloud/apigeeregistry/v1/package-info.java | 56 + .../stub/GrpcProvisioningCallableFactory.java | 113 + .../v1/stub/GrpcProvisioningStub.java | 419 ++ .../v1/stub/GrpcRegistryCallableFactory.java | 113 + .../v1/stub/GrpcRegistryStub.java | 1494 +++++ .../HttpJsonProvisioningCallableFactory.java | 105 + .../v1/stub/HttpJsonProvisioningStub.java | 650 +++ .../stub/HttpJsonRegistryCallableFactory.java | 105 + .../v1/stub/HttpJsonRegistryStub.java | 2428 ++++++++ .../v1/stub/ProvisioningStub.java | 110 + .../v1/stub/ProvisioningStubSettings.java | 651 +++ .../apigeeregistry/v1/stub/RegistryStub.java | 309 + .../v1/stub/RegistryStubSettings.java | 1844 ++++++ .../apigeeregistry/v1/MockIAMPolicy.java | 59 + .../apigeeregistry/v1/MockIAMPolicyImpl.java | 127 + .../apigeeregistry/v1/MockLocations.java | 59 + .../apigeeregistry/v1/MockLocationsImpl.java | 105 + .../apigeeregistry/v1/MockProvisioning.java | 59 + .../v1/MockProvisioningImpl.java | 123 + .../cloud/apigeeregistry/v1/MockRegistry.java | 59 + .../apigeeregistry/v1/MockRegistryImpl.java | 792 +++ .../v1/ProvisioningClientHttpJsonTest.java | 676 +++ .../v1/ProvisioningClientTest.java | 636 +++ .../v1/RegistryClientHttpJsonTest.java | 4162 ++++++++++++++ .../apigeeregistry/v1/RegistryClientTest.java | 3618 ++++++++++++ .../apigeeregistry/v1/ProvisioningGrpc.java | 480 ++ .../cloud/apigeeregistry/v1/RegistryGrpc.java | 3287 +++++++++++ .../google/cloud/apigeeregistry/v1/Api.java | 2694 +++++++++ .../apigeeregistry/v1/ApiDeployment.java | 3462 +++++++++++ .../apigeeregistry/v1/ApiDeploymentName.java | 258 + .../v1/ApiDeploymentOrBuilder.java | 458 ++ .../cloud/apigeeregistry/v1/ApiName.java | 216 + .../cloud/apigeeregistry/v1/ApiOrBuilder.java | 363 ++ .../cloud/apigeeregistry/v1/ApiSpec.java | 3347 +++++++++++ .../cloud/apigeeregistry/v1/ApiSpecName.java | 288 + .../apigeeregistry/v1/ApiSpecOrBuilder.java | 451 ++ .../cloud/apigeeregistry/v1/ApiVersion.java | 2355 ++++++++ .../apigeeregistry/v1/ApiVersionName.java | 257 + .../v1/ApiVersionOrBuilder.java | 321 ++ .../cloud/apigeeregistry/v1/Artifact.java | 1631 ++++++ .../cloud/apigeeregistry/v1/ArtifactName.java | 778 +++ .../apigeeregistry/v1/ArtifactOrBuilder.java | 158 + .../v1/CreateApiDeploymentRequest.java | 1032 ++++ .../CreateApiDeploymentRequestOrBuilder.java | 86 + .../apigeeregistry/v1/CreateApiRequest.java | 1032 ++++ .../v1/CreateApiRequestOrBuilder.java | 86 + .../v1/CreateApiSpecRequest.java | 1032 ++++ .../v1/CreateApiSpecRequestOrBuilder.java | 86 + .../v1/CreateApiVersionRequest.java | 1032 ++++ .../v1/CreateApiVersionRequestOrBuilder.java | 86 + .../v1/CreateArtifactRequest.java | 1032 ++++ .../v1/CreateArtifactRequestOrBuilder.java | 86 + .../v1/CreateInstanceRequest.java | 1004 ++++ .../v1/CreateInstanceRequestOrBuilder.java | 78 + .../v1/DeleteApiDeploymentRequest.java | 687 +++ .../DeleteApiDeploymentRequestOrBuilder.java | 42 + .../DeleteApiDeploymentRevisionRequest.java | 616 ++ ...ApiDeploymentRevisionRequestOrBuilder.java | 35 + .../apigeeregistry/v1/DeleteApiRequest.java | 687 +++ .../v1/DeleteApiRequestOrBuilder.java | 42 + .../v1/DeleteApiSpecRequest.java | 687 +++ .../v1/DeleteApiSpecRequestOrBuilder.java | 42 + .../v1/DeleteApiSpecRevisionRequest.java | 616 ++ ...DeleteApiSpecRevisionRequestOrBuilder.java | 35 + .../v1/DeleteApiVersionRequest.java | 687 +++ .../v1/DeleteApiVersionRequestOrBuilder.java | 42 + .../v1/DeleteArtifactRequest.java | 602 ++ .../v1/DeleteArtifactRequestOrBuilder.java | 31 + .../v1/DeleteInstanceRequest.java | 602 ++ .../v1/DeleteInstanceRequestOrBuilder.java | 31 + .../v1/GetApiDeploymentRequest.java | 602 ++ .../v1/GetApiDeploymentRequestOrBuilder.java | 31 + .../apigeeregistry/v1/GetApiRequest.java | 602 ++ .../v1/GetApiRequestOrBuilder.java | 31 + .../v1/GetApiSpecContentsRequest.java | 602 ++ .../GetApiSpecContentsRequestOrBuilder.java | 31 + .../apigeeregistry/v1/GetApiSpecRequest.java | 602 ++ .../v1/GetApiSpecRequestOrBuilder.java | 31 + .../v1/GetApiVersionRequest.java | 602 ++ .../v1/GetApiVersionRequestOrBuilder.java | 31 + .../v1/GetArtifactContentsRequest.java | 602 ++ .../GetArtifactContentsRequestOrBuilder.java | 31 + .../apigeeregistry/v1/GetArtifactRequest.java | 602 ++ .../v1/GetArtifactRequestOrBuilder.java | 31 + .../apigeeregistry/v1/GetInstanceRequest.java | 602 ++ .../v1/GetInstanceRequestOrBuilder.java | 31 + .../cloud/apigeeregistry/v1/Instance.java | 2642 +++++++++ .../cloud/apigeeregistry/v1/InstanceName.java | 223 + .../apigeeregistry/v1/InstanceOrBuilder.java | 151 + .../v1/ListApiDeploymentRevisionsRequest.java | 848 +++ ...piDeploymentRevisionsRequestOrBuilder.java | 61 + .../ListApiDeploymentRevisionsResponse.java | 1045 ++++ ...iDeploymentRevisionsResponseOrBuilder.java | 75 + .../v1/ListApiDeploymentsRequest.java | 1054 ++++ .../ListApiDeploymentsRequestOrBuilder.java | 92 + .../v1/ListApiDeploymentsResponse.java | 1045 ++++ .../ListApiDeploymentsResponseOrBuilder.java | 75 + .../v1/ListApiSpecRevisionsRequest.java | 848 +++ .../ListApiSpecRevisionsRequestOrBuilder.java | 61 + .../v1/ListApiSpecRevisionsResponse.java | 1045 ++++ ...ListApiSpecRevisionsResponseOrBuilder.java | 75 + .../v1/ListApiSpecsRequest.java | 1054 ++++ .../v1/ListApiSpecsRequestOrBuilder.java | 92 + .../v1/ListApiSpecsResponse.java | 1045 ++++ .../v1/ListApiSpecsResponseOrBuilder.java | 75 + .../v1/ListApiVersionsRequest.java | 1054 ++++ .../v1/ListApiVersionsRequestOrBuilder.java | 92 + .../v1/ListApiVersionsResponse.java | 1045 ++++ .../v1/ListApiVersionsResponseOrBuilder.java | 75 + .../apigeeregistry/v1/ListApisRequest.java | 1054 ++++ .../v1/ListApisRequestOrBuilder.java | 92 + .../apigeeregistry/v1/ListApisResponse.java | 1045 ++++ .../v1/ListApisResponseOrBuilder.java | 75 + .../v1/ListArtifactsRequest.java | 1054 ++++ .../v1/ListArtifactsRequestOrBuilder.java | 92 + .../v1/ListArtifactsResponse.java | 1045 ++++ .../v1/ListArtifactsResponseOrBuilder.java | 75 + .../cloud/apigeeregistry/v1/LocationName.java | 192 + .../apigeeregistry/v1/OperationMetadata.java | 1658 ++++++ .../v1/OperationMetadataOrBuilder.java | 156 + .../v1/ProvisioningServiceProto.java | 184 + .../v1/RegistryModelsProto.java | 290 + .../v1/RegistryServiceProto.java | 891 +++ .../v1/ReplaceArtifactRequest.java | 689 +++ .../v1/ReplaceArtifactRequestOrBuilder.java | 42 + .../v1/RollbackApiDeploymentRequest.java | 775 +++ ...RollbackApiDeploymentRequestOrBuilder.java | 53 + .../v1/RollbackApiSpecRequest.java | 775 +++ .../v1/RollbackApiSpecRequestOrBuilder.java | 53 + .../v1/TagApiDeploymentRevisionRequest.java | 768 +++ ...ApiDeploymentRevisionRequestOrBuilder.java | 51 + .../v1/TagApiSpecRevisionRequest.java | 768 +++ .../TagApiSpecRevisionRequestOrBuilder.java | 51 + .../v1/UpdateApiDeploymentRequest.java | 1046 ++++ .../UpdateApiDeploymentRequestOrBuilder.java | 89 + .../apigeeregistry/v1/UpdateApiRequest.java | 1046 ++++ .../v1/UpdateApiRequestOrBuilder.java | 89 + .../v1/UpdateApiSpecRequest.java | 1046 ++++ .../v1/UpdateApiSpecRequestOrBuilder.java | 89 + .../v1/UpdateApiVersionRequest.java | 1046 ++++ .../v1/UpdateApiVersionRequestOrBuilder.java | 89 + .../v1/provisioning_service.proto | 205 + .../apigeeregistry/v1/registry_models.proto | 364 ++ .../apigeeregistry/v1/registry_service.proto | 1133 ++++ .../SyncCreateSetCredentialsProvider.java | 41 + .../SyncCreateSetCredentialsProvider1.java | 40 + .../create/SyncCreateSetEndpoint.java | 38 + .../createinstance/AsyncCreateInstance.java | 49 + .../AsyncCreateInstanceLRO.java | 50 + .../createinstance/SyncCreateInstance.java | 45 + ...ateInstanceLocationnameInstanceString.java | 42 + ...yncCreateInstanceStringInstanceString.java | 42 + .../deleteinstance/AsyncDeleteInstance.java | 46 + .../AsyncDeleteInstanceLRO.java | 48 + .../deleteinstance/SyncDeleteInstance.java | 43 + .../SyncDeleteInstanceInstancename.java | 39 + .../SyncDeleteInstanceString.java | 39 + .../getiampolicy/AsyncGetIamPolicy.java | 48 + .../getiampolicy/SyncGetIamPolicy.java | 45 + .../getinstance/AsyncGetInstance.java | 46 + .../getinstance/SyncGetInstance.java | 43 + .../SyncGetInstanceInstancename.java | 39 + .../getinstance/SyncGetInstanceString.java | 39 + .../getlocation/AsyncGetLocation.java | 42 + .../getlocation/SyncGetLocation.java | 39 + .../listlocations/AsyncListLocations.java | 51 + .../AsyncListLocationsPaged.java | 58 + .../listlocations/SyncListLocations.java | 47 + .../setiampolicy/AsyncSetIamPolicy.java | 49 + .../setiampolicy/SyncSetIamPolicy.java | 46 + .../AsyncTestIamPermissions.java | 49 + .../SyncTestIamPermissions.java | 45 + .../getinstance/SyncGetInstance.java | 45 + .../SyncCreateSetCredentialsProvider.java | 41 + .../SyncCreateSetCredentialsProvider1.java | 40 + .../create/SyncCreateSetEndpoint.java | 38 + .../createapi/AsyncCreateApi.java | 48 + .../createapi/SyncCreateApi.java | 45 + .../SyncCreateApiLocationnameApiString.java | 41 + .../SyncCreateApiStringApiString.java | 41 + .../AsyncCreateApiDeployment.java | 49 + .../SyncCreateApiDeployment.java | 45 + ...iDeploymentApinameApideploymentString.java | 42 + ...piDeploymentStringApideploymentString.java | 42 + .../createapispec/AsyncCreateApiSpec.java | 49 + .../createapispec/SyncCreateApiSpec.java | 46 + ...ateApiSpecApiversionnameApispecString.java | 41 + .../SyncCreateApiSpecStringApispecString.java | 41 + .../AsyncCreateApiVersion.java | 48 + .../SyncCreateApiVersion.java | 45 + ...eateApiVersionApinameApiversionString.java | 41 + ...reateApiVersionStringApiversionString.java | 41 + .../createartifact/AsyncCreateArtifact.java | 48 + .../createartifact/SyncCreateArtifact.java | 45 + ...tifactApideploymentnameArtifactString.java | 42 + ...ncCreateArtifactApinameArtifactString.java | 41 + ...eateArtifactApispecnameArtifactString.java | 42 + ...eArtifactApiversionnameArtifactString.java | 41 + ...ateArtifactLocationnameArtifactString.java | 41 + ...yncCreateArtifactStringArtifactString.java | 41 + .../deleteapi/AsyncDeleteApi.java | 47 + .../deleteapi/SyncDeleteApi.java | 44 + .../deleteapi/SyncDeleteApiApiname.java | 39 + .../deleteapi/SyncDeleteApiString.java | 39 + .../AsyncDeleteApiDeployment.java | 49 + .../SyncDeleteApiDeployment.java | 46 + ...cDeleteApiDeploymentApideploymentname.java | 40 + .../SyncDeleteApiDeploymentString.java | 40 + .../AsyncDeleteApiDeploymentRevision.java | 49 + .../SyncDeleteApiDeploymentRevision.java | 45 + ...piDeploymentRevisionApideploymentname.java | 40 + ...SyncDeleteApiDeploymentRevisionString.java | 40 + .../deleteapispec/AsyncDeleteApiSpec.java | 49 + .../deleteapispec/SyncDeleteApiSpec.java | 46 + .../SyncDeleteApiSpecApispecname.java | 39 + .../SyncDeleteApiSpecString.java | 40 + .../AsyncDeleteApiSpecRevision.java | 49 + .../SyncDeleteApiSpecRevision.java | 45 + .../SyncDeleteApiSpecRevisionApispecname.java | 39 + .../SyncDeleteApiSpecRevisionString.java | 40 + .../AsyncDeleteApiVersion.java | 48 + .../SyncDeleteApiVersion.java | 45 + .../SyncDeleteApiVersionApiversionname.java | 39 + .../SyncDeleteApiVersionString.java | 39 + .../deleteartifact/AsyncDeleteArtifact.java | 49 + .../deleteartifact/SyncDeleteArtifact.java | 46 + .../SyncDeleteArtifactArtifactname.java | 40 + .../SyncDeleteArtifactString.java | 41 + .../v1/registryclient/getapi/AsyncGetApi.java | 46 + .../v1/registryclient/getapi/SyncGetApi.java | 43 + .../getapi/SyncGetApiApiname.java | 39 + .../getapi/SyncGetApiString.java | 39 + .../AsyncGetApiDeployment.java | 49 + .../SyncGetApiDeployment.java | 45 + ...SyncGetApiDeploymentApideploymentname.java | 40 + .../SyncGetApiDeploymentString.java | 40 + .../getapispec/AsyncGetApiSpec.java | 48 + .../getapispec/SyncGetApiSpec.java | 45 + .../getapispec/SyncGetApiSpecApispecname.java | 39 + .../getapispec/SyncGetApiSpecString.java | 40 + .../AsyncGetApiSpecContents.java | 48 + .../SyncGetApiSpecContents.java | 45 + .../SyncGetApiSpecContentsApispecname.java | 39 + .../SyncGetApiSpecContentsString.java | 40 + .../getapiversion/AsyncGetApiVersion.java | 47 + .../getapiversion/SyncGetApiVersion.java | 44 + .../SyncGetApiVersionApiversionname.java | 39 + .../SyncGetApiVersionString.java | 39 + .../getartifact/AsyncGetArtifact.java | 49 + .../getartifact/SyncGetArtifact.java | 46 + .../SyncGetArtifactArtifactname.java | 40 + .../getartifact/SyncGetArtifactString.java | 41 + .../AsyncGetArtifactContents.java | 49 + .../SyncGetArtifactContents.java | 46 + .../SyncGetArtifactContentsArtifactname.java | 40 + .../SyncGetArtifactContentsString.java | 41 + .../getiampolicy/AsyncGetIamPolicy.java | 48 + .../getiampolicy/SyncGetIamPolicy.java | 45 + .../getlocation/AsyncGetLocation.java | 42 + .../getlocation/SyncGetLocation.java | 39 + .../AsyncListApiDeploymentRevisions.java | 53 + .../AsyncListApiDeploymentRevisionsPaged.java | 61 + .../SyncListApiDeploymentRevisions.java | 50 + .../AsyncListApiDeployments.java | 52 + .../AsyncListApiDeploymentsPaged.java | 60 + .../SyncListApiDeployments.java | 48 + .../SyncListApiDeploymentsApiname.java | 41 + .../SyncListApiDeploymentsString.java | 41 + .../listapis/AsyncListApis.java | 51 + .../listapis/AsyncListApisPaged.java | 59 + .../registryclient/listapis/SyncListApis.java | 48 + .../listapis/SyncListApisLocationname.java | 41 + .../listapis/SyncListApisString.java | 41 + .../AsyncListApiSpecRevisions.java | 53 + .../AsyncListApiSpecRevisionsPaged.java | 61 + .../SyncListApiSpecRevisions.java | 49 + .../listapispecs/AsyncListApiSpecs.java | 52 + .../listapispecs/AsyncListApiSpecsPaged.java | 60 + .../listapispecs/SyncListApiSpecs.java | 49 + .../SyncListApiSpecsApiversionname.java | 41 + .../listapispecs/SyncListApiSpecsString.java | 41 + .../listapiversions/AsyncListApiVersions.java | 52 + .../AsyncListApiVersionsPaged.java | 59 + .../listapiversions/SyncListApiVersions.java | 48 + .../SyncListApiVersionsApiname.java | 41 + .../SyncListApiVersionsString.java | 41 + .../listartifacts/AsyncListArtifacts.java | 51 + .../AsyncListArtifactsPaged.java | 59 + .../listartifacts/SyncListArtifacts.java | 48 + .../SyncListArtifactsApideploymentname.java | 42 + .../SyncListArtifactsApiname.java | 41 + .../SyncListArtifactsApispecname.java | 42 + .../SyncListArtifactsApiversionname.java | 41 + .../SyncListArtifactsLocationname.java | 41 + .../SyncListArtifactsString.java | 41 + .../listlocations/AsyncListLocations.java | 50 + .../AsyncListLocationsPaged.java | 58 + .../listlocations/SyncListLocations.java | 47 + .../replaceartifact/AsyncReplaceArtifact.java | 43 + .../replaceartifact/SyncReplaceArtifact.java | 40 + .../SyncReplaceArtifactArtifact.java | 38 + .../AsyncRollbackApiDeployment.java | 50 + .../SyncRollbackApiDeployment.java | 46 + .../rollbackapispec/AsyncRollbackApiSpec.java | 49 + .../rollbackapispec/SyncRollbackApiSpec.java | 46 + .../setiampolicy/AsyncSetIamPolicy.java | 49 + .../setiampolicy/SyncSetIamPolicy.java | 46 + .../AsyncTagApiDeploymentRevision.java | 50 + .../SyncTagApiDeploymentRevision.java | 46 + .../AsyncTagApiSpecRevision.java | 49 + .../SyncTagApiSpecRevision.java | 46 + .../AsyncTestIamPermissions.java | 49 + .../SyncTestIamPermissions.java | 45 + .../updateapi/AsyncUpdateApi.java | 48 + .../updateapi/SyncUpdateApi.java | 45 + .../updateapi/SyncUpdateApiApiFieldmask.java | 40 + .../AsyncUpdateApiDeployment.java | 49 + .../SyncUpdateApiDeployment.java | 45 + ...teApiDeploymentApideploymentFieldmask.java | 40 + .../updateapispec/AsyncUpdateApiSpec.java | 48 + .../updateapispec/SyncUpdateApiSpec.java | 45 + .../SyncUpdateApiSpecApispecFieldmask.java | 40 + .../AsyncUpdateApiVersion.java | 48 + .../SyncUpdateApiVersion.java | 45 + ...ncUpdateApiVersionApiversionFieldmask.java | 40 + .../registrysettings/getapi/SyncGetApi.java | 45 + .../getinstance/SyncGetInstance.java | 46 + .../getapi/SyncGetApi.java | 45 + 333 files changed, 104431 insertions(+) create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningClient.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningSettings.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryClient.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistrySettings.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/gapic_metadata.json create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/package-info.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningCallableFactory.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningStub.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryCallableFactory.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryStub.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningCallableFactory.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningStub.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryCallableFactory.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryStub.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStub.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStubSettings.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStub.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicy.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicyImpl.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocations.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocationsImpl.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioning.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioningImpl.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistry.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistryImpl.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientTest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientTest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningGrpc.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryGrpc.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Api.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeployment.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentName.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiName.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpec.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecName.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersion.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionName.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Artifact.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactName.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Instance.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceName.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponse.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponse.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponse.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponse.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponse.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponse.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponseOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponse.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/LocationName.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadata.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadataOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningServiceProto.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryModelsProto.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryServiceProto.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequest.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequestOrBuilder.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/provisioning_service.proto create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_models.proto create mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_service.proto create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstance.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstanceLRO.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstance.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceStringInstanceString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstance.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstanceLRO.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstance.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceInstancename.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/AsyncGetIamPolicy.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/SyncGetIamPolicy.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/AsyncGetInstance.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstance.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceInstancename.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/AsyncGetLocation.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/SyncGetLocation.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocations.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocationsPaged.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/SyncListLocations.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/AsyncSetIamPolicy.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/SyncSetIamPolicy.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/AsyncTestIamPermissions.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/SyncTestIamPermissions.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningsettings/getinstance/SyncGetInstance.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/AsyncCreateApi.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApi.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiLocationnameApiString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiStringApiString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/AsyncCreateApiDeployment.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeployment.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentApinameApideploymentString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentStringApideploymentString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/AsyncCreateApiSpec.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpec.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecApiversionnameApispecString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecStringApispecString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/AsyncCreateApiVersion.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersion.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionApinameApiversionString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionStringApiversionString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/AsyncCreateArtifact.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifact.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApideploymentnameArtifactString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApinameArtifactString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApispecnameArtifactString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApiversionnameArtifactString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactLocationnameArtifactString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactStringArtifactString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/AsyncDeleteApi.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApi.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiApiname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/AsyncDeleteApiDeployment.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeployment.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentApideploymentname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/AsyncDeleteApiDeploymentRevision.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevision.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionApideploymentname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/AsyncDeleteApiSpec.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpec.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecApispecname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/AsyncDeleteApiSpecRevision.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevision.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionApispecname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/AsyncDeleteApiVersion.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersion.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionApiversionname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/AsyncDeleteArtifact.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifact.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactArtifactname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/AsyncGetApi.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApi.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiApiname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/AsyncGetApiDeployment.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeployment.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentApideploymentname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/AsyncGetApiSpec.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpec.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecApispecname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/AsyncGetApiSpecContents.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContents.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsApispecname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/AsyncGetApiVersion.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersion.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionApiversionname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/AsyncGetArtifact.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifact.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactArtifactname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/AsyncGetArtifactContents.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContents.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsArtifactname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/AsyncGetIamPolicy.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/SyncGetIamPolicy.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/AsyncGetLocation.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/SyncGetLocation.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisions.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisionsPaged.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/SyncListApiDeploymentRevisions.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeployments.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeploymentsPaged.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeployments.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsApiname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApis.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApisPaged.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApis.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisLocationname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisions.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisionsPaged.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/SyncListApiSpecRevisions.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecs.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecsPaged.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecs.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsApiversionname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersions.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersionsPaged.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersions.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsApiname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifacts.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifactsPaged.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifacts.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApideploymentname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApispecname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiversionname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsLocationname.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsString.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocations.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocationsPaged.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/SyncListLocations.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/AsyncReplaceArtifact.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifact.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifactArtifact.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/AsyncRollbackApiDeployment.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/SyncRollbackApiDeployment.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/AsyncRollbackApiSpec.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/SyncRollbackApiSpec.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/AsyncSetIamPolicy.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/SyncSetIamPolicy.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/AsyncTagApiDeploymentRevision.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/SyncTagApiDeploymentRevision.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/AsyncTagApiSpecRevision.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/SyncTagApiSpecRevision.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/AsyncTestIamPermissions.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/SyncTestIamPermissions.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/AsyncUpdateApi.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApi.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApiApiFieldmask.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/AsyncUpdateApiDeployment.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeployment.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeploymentApideploymentFieldmask.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/AsyncUpdateApiSpec.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpec.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpecApispecFieldmask.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/AsyncUpdateApiVersion.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersion.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersionApiversionFieldmask.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registrysettings/getapi/SyncGetApi.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/provisioningstubsettings/getinstance/SyncGetInstance.java create mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/registrystubsettings/getapi/SyncGetApi.java diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningClient.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningClient.java new file mode 100644 index 000000000000..9dfc39371672 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningClient.java @@ -0,0 +1,994 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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.apigeeregistry.v1.stub.ProvisioningStub; +import com.google.cloud.apigeeregistry.v1.stub.ProvisioningStubSettings; +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.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The service that is used for managing the data plane provisioning of the + * Registry. + * + *

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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+ *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+ *   Instance response = provisioningClient.getInstance(name);
+ * }
+ * }
+ * + *

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

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

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

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

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

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

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ProvisioningSettings provisioningSettings =
+ *     ProvisioningSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ProvisioningSettings provisioningSettings =
+ *     ProvisioningSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings);
+ * }
+ * + *

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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ProvisioningSettings provisioningSettings =
+ *     ProvisioningSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             ProvisioningSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ProvisioningClient implements BackgroundResource { + private final ProvisioningSettings settings; + private final ProvisioningStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ProvisioningClient with default settings. */ + public static final ProvisioningClient create() throws IOException { + return create(ProvisioningSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ProvisioningClient, 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 ProvisioningClient create(ProvisioningSettings settings) throws IOException { + return new ProvisioningClient(settings); + } + + /** + * Constructs an instance of ProvisioningClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ProvisioningSettings). + */ + public static final ProvisioningClient create(ProvisioningStub stub) { + return new ProvisioningClient(stub); + } + + /** + * Constructs an instance of ProvisioningClient, 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 ProvisioningClient(ProvisioningSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ProvisioningStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ProvisioningClient(ProvisioningStub 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 ProvisioningSettings getSettings() { + return settings; + } + + public ProvisioningStub 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. + /** + * Provisions instance resources for the Registry. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Instance instance = Instance.newBuilder().build();
+   *   String instanceId = "instanceId902024336";
+   *   Instance response =
+   *       provisioningClient.createInstanceAsync(parent, instance, instanceId).get();
+   * }
+   * }
+ * + * @param parent Required. Parent resource of the Instance, of the form: + * `projects/*/locations/*` + * @param instance Required. The Instance. + * @param instanceId Required. Identifier to assign to the Instance. Must be unique within scope + * of the parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInstanceAsync( + LocationName parent, Instance instance, String instanceId) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInstance(instance) + .setInstanceId(instanceId) + .build(); + return createInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Provisions instance resources for the Registry. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Instance instance = Instance.newBuilder().build();
+   *   String instanceId = "instanceId902024336";
+   *   Instance response =
+   *       provisioningClient.createInstanceAsync(parent, instance, instanceId).get();
+   * }
+   * }
+ * + * @param parent Required. Parent resource of the Instance, of the form: + * `projects/*/locations/*` + * @param instance Required. The Instance. + * @param instanceId Required. Identifier to assign to the Instance. Must be unique within scope + * of the parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInstanceAsync( + String parent, Instance instance, String instanceId) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(parent) + .setInstance(instance) + .setInstanceId(instanceId) + .build(); + return createInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Provisions instance resources for the Registry. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   Instance response = provisioningClient.createInstanceAsync(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 createInstanceAsync( + CreateInstanceRequest request) { + return createInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Provisions instance resources for the Registry. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       provisioningClient.createInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createInstanceOperationCallable() { + return stub.createInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Provisions instance resources for the Registry. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = provisioningClient.createInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createInstanceCallable() { + return stub.createInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the Registry instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   provisioningClient.deleteInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Instance to delete. Format: + * `projects/*/locations/*/instances/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInstanceAsync(InstanceName name) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the Registry instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   provisioningClient.deleteInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Instance to delete. Format: + * `projects/*/locations/*/instances/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInstanceAsync(String name) { + DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); + return deleteInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the Registry instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
+   *   provisioningClient.deleteInstanceAsync(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 deleteInstanceAsync( + DeleteInstanceRequest request) { + return deleteInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the Registry instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       provisioningClient.deleteInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteInstanceOperationCallable() { + return stub.deleteInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the Registry instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
+   *   ApiFuture future = provisioningClient.deleteInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteInstanceCallable() { + return stub.deleteInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   Instance response = provisioningClient.getInstance(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Instance to retrieve. Format: + * `projects/*/locations/*/instances/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(InstanceName name) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   Instance response = provisioningClient.getInstance(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Instance to retrieve. Format: + * `projects/*/locations/*/instances/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(String name) { + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   GetInstanceRequest request =
+   *       GetInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
+   *   Instance response = provisioningClient.getInstance(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 Instance getInstance(GetInstanceRequest request) { + return getInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   GetInstanceRequest request =
+   *       GetInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
+   *   ApiFuture future = provisioningClient.getInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getInstanceCallable() { + return stub.getInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : provisioningClient.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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       provisioningClient.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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = provisioningClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = provisioningClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = provisioningClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = provisioningClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = provisioningClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = provisioningClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = provisioningClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = provisioningClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       provisioningClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @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 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( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningSettings.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningSettings.java new file mode 100644 index 000000000000..489170f07040 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningSettings.java @@ -0,0 +1,317 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1; + +import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; + +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.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.apigeeregistry.v1.stub.ProvisioningStubSettings; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProvisioningClient}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ProvisioningSettings.Builder provisioningSettingsBuilder = ProvisioningSettings.newBuilder();
+ * provisioningSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         provisioningSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ProvisioningSettings provisioningSettings = provisioningSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ProvisioningSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createInstance. */ + public UnaryCallSettings createInstanceSettings() { + return ((ProvisioningStubSettings) getStubSettings()).createInstanceSettings(); + } + + /** Returns the object with the settings used for calls to createInstance. */ + public OperationCallSettings + createInstanceOperationSettings() { + return ((ProvisioningStubSettings) getStubSettings()).createInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return ((ProvisioningStubSettings) getStubSettings()).deleteInstanceSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return ((ProvisioningStubSettings) getStubSettings()).deleteInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return ((ProvisioningStubSettings) getStubSettings()).getInstanceSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((ProvisioningStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((ProvisioningStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((ProvisioningStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((ProvisioningStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((ProvisioningStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final ProvisioningSettings create(ProvisioningStubSettings stub) + throws IOException { + return new ProvisioningSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ProvisioningStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ProvisioningStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ProvisioningStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ProvisioningStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ProvisioningStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ProvisioningStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ProvisioningStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProvisioningStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(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 ProvisioningSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ProvisioningSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ProvisioningStubSettings.newBuilder(clientContext)); + } + + protected Builder(ProvisioningSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ProvisioningStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ProvisioningStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ProvisioningStubSettings.newHttpJsonBuilder()); + } + + public ProvisioningStubSettings.Builder getStubSettingsBuilder() { + return ((ProvisioningStubSettings.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 createInstance. */ + public UnaryCallSettings.Builder createInstanceSettings() { + return getStubSettingsBuilder().createInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public OperationCallSettings.Builder + createInstanceOperationSettings() { + return getStubSettingsBuilder().createInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return getStubSettingsBuilder().deleteInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return getStubSettingsBuilder().deleteInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getStubSettingsBuilder().getInstanceSettings(); + } + + /** 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(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public ProvisioningSettings build() throws IOException { + return new ProvisioningSettings(this); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryClient.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryClient.java new file mode 100644 index 000000000000..2247bd36be10 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryClient.java @@ -0,0 +1,5082 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1; + +import com.google.api.HttpBody; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +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.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apigeeregistry.v1.stub.RegistryStub; +import com.google.cloud.apigeeregistry.v1.stub.RegistryStubSettings; +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.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The Registry service allows teams to manage descriptions of APIs. + * + *

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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (RegistryClient registryClient = RegistryClient.create()) {
+ *   ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
+ *   Api response = registryClient.getApi(name);
+ * }
+ * }
+ * + *

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

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

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

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

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

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

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * RegistrySettings registrySettings =
+ *     RegistrySettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * RegistryClient registryClient = RegistryClient.create(registrySettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * RegistrySettings registrySettings =
+ *     RegistrySettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RegistryClient registryClient = RegistryClient.create(registrySettings);
+ * }
+ * + *

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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * RegistrySettings registrySettings =
+ *     RegistrySettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             RegistrySettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * RegistryClient registryClient = RegistryClient.create(registrySettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class RegistryClient implements BackgroundResource { + private final RegistrySettings settings; + private final RegistryStub stub; + + /** Constructs an instance of RegistryClient with default settings. */ + public static final RegistryClient create() throws IOException { + return create(RegistrySettings.newBuilder().build()); + } + + /** + * Constructs an instance of RegistryClient, 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 RegistryClient create(RegistrySettings settings) throws IOException { + return new RegistryClient(settings); + } + + /** + * Constructs an instance of RegistryClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(RegistrySettings). + */ + public static final RegistryClient create(RegistryStub stub) { + return new RegistryClient(stub); + } + + /** + * Constructs an instance of RegistryClient, 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 RegistryClient(RegistrySettings settings) throws IOException { + this.settings = settings; + this.stub = ((RegistryStubSettings) settings.getStubSettings()).createStub(); + } + + protected RegistryClient(RegistryStub stub) { + this.settings = null; + this.stub = stub; + } + + public final RegistrySettings getSettings() { + return settings; + } + + public RegistryStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching APIs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Api element : registryClient.listApis(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of APIs. Format: + * `projects/*/locations/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListApisPagedResponse listApis(LocationName parent) { + ListApisRequest request = + ListApisRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listApis(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching APIs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Api element : registryClient.listApis(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of APIs. Format: + * `projects/*/locations/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListApisPagedResponse listApis(String parent) { + ListApisRequest request = ListApisRequest.newBuilder().setParent(parent).build(); + return listApis(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching APIs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApisRequest request =
+   *       ListApisRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Api element : registryClient.listApis(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 ListApisPagedResponse listApis(ListApisRequest request) { + return listApisPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching APIs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApisRequest request =
+   *       ListApisRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future = registryClient.listApisPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Api element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listApisPagedCallable() { + return stub.listApisPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching APIs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApisRequest request =
+   *       ListApisRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListApisResponse response = registryClient.listApisCallable().call(request);
+   *     for (Api element : response.getApisList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listApisCallable() { + return stub.listApisCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
+   *   Api response = registryClient.getApi(name);
+   * }
+   * }
+ * + * @param name Required. The name of the API to retrieve. Format: + * `projects/*/locations/*/apis/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Api getApi(ApiName name) { + GetApiRequest request = + GetApiRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getApi(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
+   *   Api response = registryClient.getApi(name);
+   * }
+   * }
+ * + * @param name Required. The name of the API to retrieve. Format: + * `projects/*/locations/*/apis/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Api getApi(String name) { + GetApiRequest request = GetApiRequest.newBuilder().setName(name).build(); + return getApi(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetApiRequest request =
+   *       GetApiRequest.newBuilder()
+   *           .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .build();
+   *   Api response = registryClient.getApi(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 Api getApi(GetApiRequest request) { + return getApiCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetApiRequest request =
+   *       GetApiRequest.newBuilder()
+   *           .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .build();
+   *   ApiFuture future = registryClient.getApiCallable().futureCall(request);
+   *   // Do something.
+   *   Api response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getApiCallable() { + return stub.getApiCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Api api = Api.newBuilder().build();
+   *   String apiId = "apiId93021397";
+   *   Api response = registryClient.createApi(parent, api, apiId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of APIs. Format: + * `projects/*/locations/*` + * @param api Required. The API to create. + * @param apiId Required. The ID to use for the API, which will become the final component of the + * API's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Api createApi(LocationName parent, Api api, String apiId) { + CreateApiRequest request = + CreateApiRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setApi(api) + .setApiId(apiId) + .build(); + return createApi(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Api api = Api.newBuilder().build();
+   *   String apiId = "apiId93021397";
+   *   Api response = registryClient.createApi(parent, api, apiId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of APIs. Format: + * `projects/*/locations/*` + * @param api Required. The API to create. + * @param apiId Required. The ID to use for the API, which will become the final component of the + * API's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Api createApi(String parent, Api api, String apiId) { + CreateApiRequest request = + CreateApiRequest.newBuilder().setParent(parent).setApi(api).setApiId(apiId).build(); + return createApi(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   CreateApiRequest request =
+   *       CreateApiRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setApi(Api.newBuilder().build())
+   *           .setApiId("apiId93021397")
+   *           .build();
+   *   Api response = registryClient.createApi(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 Api createApi(CreateApiRequest request) { + return createApiCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   CreateApiRequest request =
+   *       CreateApiRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setApi(Api.newBuilder().build())
+   *           .setApiId("apiId93021397")
+   *           .build();
+   *   ApiFuture future = registryClient.createApiCallable().futureCall(request);
+   *   // Do something.
+   *   Api response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createApiCallable() { + return stub.createApiCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   Api api = Api.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Api response = registryClient.updateApi(api, updateMask);
+   * }
+   * }
+ * + * @param api Required. The API to update. + *

The `name` field is used to identify the API to update. Format: + * `projects/*/locations/*/apis/*` + * @param updateMask The list of fields to be updated. If omitted, all fields are updated that are + * set in the request message (fields set to default values are ignored). If an asterisk + * "*" is specified, all fields are updated, including fields that are unspecified/default + * in the request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Api updateApi(Api api, FieldMask updateMask) { + UpdateApiRequest request = + UpdateApiRequest.newBuilder().setApi(api).setUpdateMask(updateMask).build(); + return updateApi(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   UpdateApiRequest request =
+   *       UpdateApiRequest.newBuilder()
+   *           .setApi(Api.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   Api response = registryClient.updateApi(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 Api updateApi(UpdateApiRequest request) { + return updateApiCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   UpdateApiRequest request =
+   *       UpdateApiRequest.newBuilder()
+   *           .setApi(Api.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future = registryClient.updateApiCallable().futureCall(request);
+   *   // Do something.
+   *   Api response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateApiCallable() { + return stub.updateApiCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified API and all of the resources that it owns. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
+   *   registryClient.deleteApi(name);
+   * }
+   * }
+ * + * @param name Required. The name of the API to delete. Format: + * `projects/*/locations/*/apis/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApi(ApiName name) { + DeleteApiRequest request = + DeleteApiRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteApi(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified API and all of the resources that it owns. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
+   *   registryClient.deleteApi(name);
+   * }
+   * }
+ * + * @param name Required. The name of the API to delete. Format: + * `projects/*/locations/*/apis/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApi(String name) { + DeleteApiRequest request = DeleteApiRequest.newBuilder().setName(name).build(); + deleteApi(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified API and all of the resources that it owns. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiRequest request =
+   *       DeleteApiRequest.newBuilder()
+   *           .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   registryClient.deleteApi(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 deleteApi(DeleteApiRequest request) { + deleteApiCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified API and all of the resources that it owns. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiRequest request =
+   *       DeleteApiRequest.newBuilder()
+   *           .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = registryClient.deleteApiCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteApiCallable() { + return stub.deleteApiCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching versions. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
+   *   for (ApiVersion element : registryClient.listApiVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of versions. Format: + * `projects/*/locations/*/apis/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListApiVersionsPagedResponse listApiVersions(ApiName parent) { + ListApiVersionsRequest request = + ListApiVersionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listApiVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching versions. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
+   *   for (ApiVersion element : registryClient.listApiVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of versions. Format: + * `projects/*/locations/*/apis/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListApiVersionsPagedResponse listApiVersions(String parent) { + ListApiVersionsRequest request = ListApiVersionsRequest.newBuilder().setParent(parent).build(); + return listApiVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching versions. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiVersionsRequest request =
+   *       ListApiVersionsRequest.newBuilder()
+   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (ApiVersion element : registryClient.listApiVersions(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 ListApiVersionsPagedResponse listApiVersions(ListApiVersionsRequest request) { + return listApiVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching versions. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiVersionsRequest request =
+   *       ListApiVersionsRequest.newBuilder()
+   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.listApiVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ApiVersion element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listApiVersionsPagedCallable() { + return stub.listApiVersionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching versions. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiVersionsRequest request =
+   *       ListApiVersionsRequest.newBuilder()
+   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListApiVersionsResponse response = registryClient.listApiVersionsCallable().call(request);
+   *     for (ApiVersion element : response.getApiVersionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listApiVersionsCallable() { + return stub.listApiVersionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
+   *   ApiVersion response = registryClient.getApiVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the version to retrieve. Format: + * `projects/*/locations/*/apis/*/versions/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiVersion getApiVersion(ApiVersionName name) { + GetApiVersionRequest request = + GetApiVersionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getApiVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString();
+   *   ApiVersion response = registryClient.getApiVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the version to retrieve. Format: + * `projects/*/locations/*/apis/*/versions/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiVersion getApiVersion(String name) { + GetApiVersionRequest request = GetApiVersionRequest.newBuilder().setName(name).build(); + return getApiVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetApiVersionRequest request =
+   *       GetApiVersionRequest.newBuilder()
+   *           .setName(
+   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
+   *           .build();
+   *   ApiVersion response = registryClient.getApiVersion(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 ApiVersion getApiVersion(GetApiVersionRequest request) { + return getApiVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetApiVersionRequest request =
+   *       GetApiVersionRequest.newBuilder()
+   *           .setName(
+   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
+   *           .build();
+   *   ApiFuture future = registryClient.getApiVersionCallable().futureCall(request);
+   *   // Do something.
+   *   ApiVersion response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getApiVersionCallable() { + return stub.getApiVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
+   *   ApiVersion apiVersion = ApiVersion.newBuilder().build();
+   *   String apiVersionId = "apiVersionId1678816025";
+   *   ApiVersion response = registryClient.createApiVersion(parent, apiVersion, apiVersionId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of versions. Format: + * `projects/*/locations/*/apis/*` + * @param apiVersion Required. The version to create. + * @param apiVersionId Required. The ID to use for the version, which will become the final + * component of the version's resource name. + *

This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiVersion createApiVersion( + ApiName parent, ApiVersion apiVersion, String apiVersionId) { + CreateApiVersionRequest request = + CreateApiVersionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setApiVersion(apiVersion) + .setApiVersionId(apiVersionId) + .build(); + return createApiVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
+   *   ApiVersion apiVersion = ApiVersion.newBuilder().build();
+   *   String apiVersionId = "apiVersionId1678816025";
+   *   ApiVersion response = registryClient.createApiVersion(parent, apiVersion, apiVersionId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of versions. Format: + * `projects/*/locations/*/apis/*` + * @param apiVersion Required. The version to create. + * @param apiVersionId Required. The ID to use for the version, which will become the final + * component of the version's resource name. + *

This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiVersion createApiVersion( + String parent, ApiVersion apiVersion, String apiVersionId) { + CreateApiVersionRequest request = + CreateApiVersionRequest.newBuilder() + .setParent(parent) + .setApiVersion(apiVersion) + .setApiVersionId(apiVersionId) + .build(); + return createApiVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   CreateApiVersionRequest request =
+   *       CreateApiVersionRequest.newBuilder()
+   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setApiVersion(ApiVersion.newBuilder().build())
+   *           .setApiVersionId("apiVersionId1678816025")
+   *           .build();
+   *   ApiVersion response = registryClient.createApiVersion(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 ApiVersion createApiVersion(CreateApiVersionRequest request) { + return createApiVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   CreateApiVersionRequest request =
+   *       CreateApiVersionRequest.newBuilder()
+   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setApiVersion(ApiVersion.newBuilder().build())
+   *           .setApiVersionId("apiVersionId1678816025")
+   *           .build();
+   *   ApiFuture future = registryClient.createApiVersionCallable().futureCall(request);
+   *   // Do something.
+   *   ApiVersion response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createApiVersionCallable() { + return stub.createApiVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiVersion apiVersion = ApiVersion.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ApiVersion response = registryClient.updateApiVersion(apiVersion, updateMask);
+   * }
+   * }
+ * + * @param apiVersion Required. The version to update. + *

The `name` field is used to identify the version to update. Format: + * `projects/*/locations/*/apis/*/versions/*` + * @param updateMask The list of fields to be updated. If omitted, all fields are updated that are + * set in the request message (fields set to default values are ignored). If an asterisk + * "*" is specified, all fields are updated, including fields that are unspecified/default + * in the request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiVersion updateApiVersion(ApiVersion apiVersion, FieldMask updateMask) { + UpdateApiVersionRequest request = + UpdateApiVersionRequest.newBuilder() + .setApiVersion(apiVersion) + .setUpdateMask(updateMask) + .build(); + return updateApiVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   UpdateApiVersionRequest request =
+   *       UpdateApiVersionRequest.newBuilder()
+   *           .setApiVersion(ApiVersion.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiVersion response = registryClient.updateApiVersion(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 ApiVersion updateApiVersion(UpdateApiVersionRequest request) { + return updateApiVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   UpdateApiVersionRequest request =
+   *       UpdateApiVersionRequest.newBuilder()
+   *           .setApiVersion(ApiVersion.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future = registryClient.updateApiVersionCallable().futureCall(request);
+   *   // Do something.
+   *   ApiVersion response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateApiVersionCallable() { + return stub.updateApiVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified version and all of the resources that it owns. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
+   *   registryClient.deleteApiVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the version to delete. Format: + * `projects/*/locations/*/apis/*/versions/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApiVersion(ApiVersionName name) { + DeleteApiVersionRequest request = + DeleteApiVersionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteApiVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified version and all of the resources that it owns. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString();
+   *   registryClient.deleteApiVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the version to delete. Format: + * `projects/*/locations/*/apis/*/versions/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApiVersion(String name) { + DeleteApiVersionRequest request = DeleteApiVersionRequest.newBuilder().setName(name).build(); + deleteApiVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified version and all of the resources that it owns. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiVersionRequest request =
+   *       DeleteApiVersionRequest.newBuilder()
+   *           .setName(
+   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   registryClient.deleteApiVersion(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 deleteApiVersion(DeleteApiVersionRequest request) { + deleteApiVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified version and all of the resources that it owns. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiVersionRequest request =
+   *       DeleteApiVersionRequest.newBuilder()
+   *           .setName(
+   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = registryClient.deleteApiVersionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteApiVersionCallable() { + return stub.deleteApiVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching specs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
+   *   for (ApiSpec element : registryClient.listApiSpecs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of specs. Format: + * `projects/*/locations/*/apis/*/versions/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListApiSpecsPagedResponse listApiSpecs(ApiVersionName parent) { + ListApiSpecsRequest request = + ListApiSpecsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listApiSpecs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching specs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString();
+   *   for (ApiSpec element : registryClient.listApiSpecs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of specs. Format: + * `projects/*/locations/*/apis/*/versions/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListApiSpecsPagedResponse listApiSpecs(String parent) { + ListApiSpecsRequest request = ListApiSpecsRequest.newBuilder().setParent(parent).build(); + return listApiSpecs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching specs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiSpecsRequest request =
+   *       ListApiSpecsRequest.newBuilder()
+   *           .setParent(
+   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (ApiSpec element : registryClient.listApiSpecs(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 ListApiSpecsPagedResponse listApiSpecs(ListApiSpecsRequest request) { + return listApiSpecsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching specs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiSpecsRequest request =
+   *       ListApiSpecsRequest.newBuilder()
+   *           .setParent(
+   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future = registryClient.listApiSpecsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ApiSpec element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listApiSpecsPagedCallable() { + return stub.listApiSpecsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching specs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiSpecsRequest request =
+   *       ListApiSpecsRequest.newBuilder()
+   *           .setParent(
+   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListApiSpecsResponse response = registryClient.listApiSpecsCallable().call(request);
+   *     for (ApiSpec element : response.getApiSpecsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listApiSpecsCallable() { + return stub.listApiSpecsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
+   *   ApiSpec response = registryClient.getApiSpec(name);
+   * }
+   * }
+ * + * @param name Required. The name of the spec to retrieve. Format: + * `projects/*/locations/*/apis/*/versions/*/specs/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiSpec getApiSpec(ApiSpecName name) { + GetApiSpecRequest request = + GetApiSpecRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getApiSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name =
+   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString();
+   *   ApiSpec response = registryClient.getApiSpec(name);
+   * }
+   * }
+ * + * @param name Required. The name of the spec to retrieve. Format: + * `projects/*/locations/*/apis/*/versions/*/specs/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiSpec getApiSpec(String name) { + GetApiSpecRequest request = GetApiSpecRequest.newBuilder().setName(name).build(); + return getApiSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetApiSpecRequest request =
+   *       GetApiSpecRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .build();
+   *   ApiSpec response = registryClient.getApiSpec(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 ApiSpec getApiSpec(GetApiSpecRequest request) { + return getApiSpecCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetApiSpecRequest request =
+   *       GetApiSpecRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = registryClient.getApiSpecCallable().futureCall(request);
+   *   // Do something.
+   *   ApiSpec response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getApiSpecCallable() { + return stub.getApiSpecCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the contents of a specified spec. If specs are stored with GZip compression, the + * default behavior is to return the spec uncompressed (the mime_type response field indicates the + * exact format returned). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
+   *   HttpBody response = registryClient.getApiSpecContents(name);
+   * }
+   * }
+ * + * @param name Required. The name of the spec whose contents should be retrieved. Format: + * `projects/*/locations/*/apis/*/versions/*/specs/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HttpBody getApiSpecContents(ApiSpecName name) { + GetApiSpecContentsRequest request = + GetApiSpecContentsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getApiSpecContents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the contents of a specified spec. If specs are stored with GZip compression, the + * default behavior is to return the spec uncompressed (the mime_type response field indicates the + * exact format returned). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name =
+   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString();
+   *   HttpBody response = registryClient.getApiSpecContents(name);
+   * }
+   * }
+ * + * @param name Required. The name of the spec whose contents should be retrieved. Format: + * `projects/*/locations/*/apis/*/versions/*/specs/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HttpBody getApiSpecContents(String name) { + GetApiSpecContentsRequest request = + GetApiSpecContentsRequest.newBuilder().setName(name).build(); + return getApiSpecContents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the contents of a specified spec. If specs are stored with GZip compression, the + * default behavior is to return the spec uncompressed (the mime_type response field indicates the + * exact format returned). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetApiSpecContentsRequest request =
+   *       GetApiSpecContentsRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .build();
+   *   HttpBody response = registryClient.getApiSpecContents(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 HttpBody getApiSpecContents(GetApiSpecContentsRequest request) { + return getApiSpecContentsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the contents of a specified spec. If specs are stored with GZip compression, the + * default behavior is to return the spec uncompressed (the mime_type response field indicates the + * exact format returned). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetApiSpecContentsRequest request =
+   *       GetApiSpecContentsRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = registryClient.getApiSpecContentsCallable().futureCall(request);
+   *   // Do something.
+   *   HttpBody response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getApiSpecContentsCallable() { + return stub.getApiSpecContentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
+   *   ApiSpec apiSpec = ApiSpec.newBuilder().build();
+   *   String apiSpecId = "apiSpecId-421795600";
+   *   ApiSpec response = registryClient.createApiSpec(parent, apiSpec, apiSpecId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of specs. Format: + * `projects/*/locations/*/apis/*/versions/*` + * @param apiSpec Required. The spec to create. + * @param apiSpecId Required. The ID to use for the spec, which will become the final component of + * the spec's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiSpec createApiSpec(ApiVersionName parent, ApiSpec apiSpec, String apiSpecId) { + CreateApiSpecRequest request = + CreateApiSpecRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setApiSpec(apiSpec) + .setApiSpecId(apiSpecId) + .build(); + return createApiSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString();
+   *   ApiSpec apiSpec = ApiSpec.newBuilder().build();
+   *   String apiSpecId = "apiSpecId-421795600";
+   *   ApiSpec response = registryClient.createApiSpec(parent, apiSpec, apiSpecId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of specs. Format: + * `projects/*/locations/*/apis/*/versions/*` + * @param apiSpec Required. The spec to create. + * @param apiSpecId Required. The ID to use for the spec, which will become the final component of + * the spec's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiSpec createApiSpec(String parent, ApiSpec apiSpec, String apiSpecId) { + CreateApiSpecRequest request = + CreateApiSpecRequest.newBuilder() + .setParent(parent) + .setApiSpec(apiSpec) + .setApiSpecId(apiSpecId) + .build(); + return createApiSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   CreateApiSpecRequest request =
+   *       CreateApiSpecRequest.newBuilder()
+   *           .setParent(
+   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
+   *           .setApiSpec(ApiSpec.newBuilder().build())
+   *           .setApiSpecId("apiSpecId-421795600")
+   *           .build();
+   *   ApiSpec response = registryClient.createApiSpec(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 ApiSpec createApiSpec(CreateApiSpecRequest request) { + return createApiSpecCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   CreateApiSpecRequest request =
+   *       CreateApiSpecRequest.newBuilder()
+   *           .setParent(
+   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
+   *           .setApiSpec(ApiSpec.newBuilder().build())
+   *           .setApiSpecId("apiSpecId-421795600")
+   *           .build();
+   *   ApiFuture future = registryClient.createApiSpecCallable().futureCall(request);
+   *   // Do something.
+   *   ApiSpec response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createApiSpecCallable() { + return stub.createApiSpecCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiSpec apiSpec = ApiSpec.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ApiSpec response = registryClient.updateApiSpec(apiSpec, updateMask);
+   * }
+   * }
+ * + * @param apiSpec Required. The spec to update. + *

The `name` field is used to identify the spec to update. Format: + * `projects/*/locations/*/apis/*/versions/*/specs/*` + * @param updateMask The list of fields to be updated. If omitted, all fields are updated that are + * set in the request message (fields set to default values are ignored). If an asterisk + * "*" is specified, all fields are updated, including fields that are unspecified/default + * in the request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiSpec updateApiSpec(ApiSpec apiSpec, FieldMask updateMask) { + UpdateApiSpecRequest request = + UpdateApiSpecRequest.newBuilder().setApiSpec(apiSpec).setUpdateMask(updateMask).build(); + return updateApiSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   UpdateApiSpecRequest request =
+   *       UpdateApiSpecRequest.newBuilder()
+   *           .setApiSpec(ApiSpec.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiSpec response = registryClient.updateApiSpec(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 ApiSpec updateApiSpec(UpdateApiSpecRequest request) { + return updateApiSpecCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   UpdateApiSpecRequest request =
+   *       UpdateApiSpecRequest.newBuilder()
+   *           .setApiSpec(ApiSpec.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future = registryClient.updateApiSpecCallable().futureCall(request);
+   *   // Do something.
+   *   ApiSpec response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateApiSpecCallable() { + return stub.updateApiSpecCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified spec, all revisions, and all child resources (e.g., artifacts). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
+   *   registryClient.deleteApiSpec(name);
+   * }
+   * }
+ * + * @param name Required. The name of the spec to delete. Format: + * `projects/*/locations/*/apis/*/versions/*/specs/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApiSpec(ApiSpecName name) { + DeleteApiSpecRequest request = + DeleteApiSpecRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteApiSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified spec, all revisions, and all child resources (e.g., artifacts). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name =
+   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString();
+   *   registryClient.deleteApiSpec(name);
+   * }
+   * }
+ * + * @param name Required. The name of the spec to delete. Format: + * `projects/*/locations/*/apis/*/versions/*/specs/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApiSpec(String name) { + DeleteApiSpecRequest request = DeleteApiSpecRequest.newBuilder().setName(name).build(); + deleteApiSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified spec, all revisions, and all child resources (e.g., artifacts). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiSpecRequest request =
+   *       DeleteApiSpecRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   registryClient.deleteApiSpec(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 deleteApiSpec(DeleteApiSpecRequest request) { + deleteApiSpecCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified spec, all revisions, and all child resources (e.g., artifacts). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiSpecRequest request =
+   *       DeleteApiSpecRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = registryClient.deleteApiSpecCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteApiSpecCallable() { + return stub.deleteApiSpecCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a tag to a specified revision of a spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   TagApiSpecRevisionRequest request =
+   *       TagApiSpecRevisionRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .setTag("tag114586")
+   *           .build();
+   *   ApiSpec response = registryClient.tagApiSpecRevision(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 ApiSpec tagApiSpecRevision(TagApiSpecRevisionRequest request) { + return tagApiSpecRevisionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a tag to a specified revision of a spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   TagApiSpecRevisionRequest request =
+   *       TagApiSpecRevisionRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .setTag("tag114586")
+   *           .build();
+   *   ApiFuture future = registryClient.tagApiSpecRevisionCallable().futureCall(request);
+   *   // Do something.
+   *   ApiSpec response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable tagApiSpecRevisionCallable() { + return stub.tagApiSpecRevisionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all revisions of a spec. Revisions are returned in descending order of revision creation + * time. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiSpecRevisionsRequest request =
+   *       ListApiSpecRevisionsRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ApiSpec element : registryClient.listApiSpecRevisions(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 ListApiSpecRevisionsPagedResponse listApiSpecRevisions( + ListApiSpecRevisionsRequest request) { + return listApiSpecRevisionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all revisions of a spec. Revisions are returned in descending order of revision creation + * time. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiSpecRevisionsRequest request =
+   *       ListApiSpecRevisionsRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.listApiSpecRevisionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ApiSpec element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listApiSpecRevisionsPagedCallable() { + return stub.listApiSpecRevisionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all revisions of a spec. Revisions are returned in descending order of revision creation + * time. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiSpecRevisionsRequest request =
+   *       ListApiSpecRevisionsRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListApiSpecRevisionsResponse response =
+   *         registryClient.listApiSpecRevisionsCallable().call(request);
+   *     for (ApiSpec element : response.getApiSpecsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listApiSpecRevisionsCallable() { + return stub.listApiSpecRevisionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the current revision to a specified prior revision. Note that this creates a new revision + * with a new revision ID. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   RollbackApiSpecRequest request =
+   *       RollbackApiSpecRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .setRevisionId("revisionId-1507445162")
+   *           .build();
+   *   ApiSpec response = registryClient.rollbackApiSpec(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 ApiSpec rollbackApiSpec(RollbackApiSpecRequest request) { + return rollbackApiSpecCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the current revision to a specified prior revision. Note that this creates a new revision + * with a new revision ID. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   RollbackApiSpecRequest request =
+   *       RollbackApiSpecRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .setRevisionId("revisionId-1507445162")
+   *           .build();
+   *   ApiFuture future = registryClient.rollbackApiSpecCallable().futureCall(request);
+   *   // Do something.
+   *   ApiSpec response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable rollbackApiSpecCallable() { + return stub.rollbackApiSpecCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a revision of a spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
+   *   ApiSpec response = registryClient.deleteApiSpecRevision(name);
+   * }
+   * }
+ * + * @param name Required. The name of the spec revision to be deleted, with a revision ID + * explicitly included. + *

Example: + * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml{@literal @}c7cfa2a8` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiSpec deleteApiSpecRevision(ApiSpecName name) { + DeleteApiSpecRevisionRequest request = + DeleteApiSpecRevisionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteApiSpecRevision(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a revision of a spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name =
+   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString();
+   *   ApiSpec response = registryClient.deleteApiSpecRevision(name);
+   * }
+   * }
+ * + * @param name Required. The name of the spec revision to be deleted, with a revision ID + * explicitly included. + *

Example: + * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml{@literal @}c7cfa2a8` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiSpec deleteApiSpecRevision(String name) { + DeleteApiSpecRevisionRequest request = + DeleteApiSpecRevisionRequest.newBuilder().setName(name).build(); + return deleteApiSpecRevision(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a revision of a spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiSpecRevisionRequest request =
+   *       DeleteApiSpecRevisionRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .build();
+   *   ApiSpec response = registryClient.deleteApiSpecRevision(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 ApiSpec deleteApiSpecRevision(DeleteApiSpecRevisionRequest request) { + return deleteApiSpecRevisionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a revision of a spec. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiSpecRevisionRequest request =
+   *       DeleteApiSpecRevisionRequest.newBuilder()
+   *           .setName(
+   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.deleteApiSpecRevisionCallable().futureCall(request);
+   *   // Do something.
+   *   ApiSpec response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteApiSpecRevisionCallable() { + return stub.deleteApiSpecRevisionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching deployments. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
+   *   for (ApiDeployment element : registryClient.listApiDeployments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of deployments. Format: + * `projects/*/locations/*/apis/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListApiDeploymentsPagedResponse listApiDeployments(ApiName parent) { + ListApiDeploymentsRequest request = + ListApiDeploymentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listApiDeployments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching deployments. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
+   *   for (ApiDeployment element : registryClient.listApiDeployments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of deployments. Format: + * `projects/*/locations/*/apis/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListApiDeploymentsPagedResponse listApiDeployments(String parent) { + ListApiDeploymentsRequest request = + ListApiDeploymentsRequest.newBuilder().setParent(parent).build(); + return listApiDeployments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching deployments. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiDeploymentsRequest request =
+   *       ListApiDeploymentsRequest.newBuilder()
+   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (ApiDeployment element : registryClient.listApiDeployments(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 ListApiDeploymentsPagedResponse listApiDeployments( + ListApiDeploymentsRequest request) { + return listApiDeploymentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching deployments. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiDeploymentsRequest request =
+   *       ListApiDeploymentsRequest.newBuilder()
+   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.listApiDeploymentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ApiDeployment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listApiDeploymentsPagedCallable() { + return stub.listApiDeploymentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching deployments. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiDeploymentsRequest request =
+   *       ListApiDeploymentsRequest.newBuilder()
+   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListApiDeploymentsResponse response =
+   *         registryClient.listApiDeploymentsCallable().call(request);
+   *     for (ApiDeployment element : response.getApiDeploymentsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listApiDeploymentsCallable() { + return stub.listApiDeploymentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiDeploymentName name =
+   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]");
+   *   ApiDeployment response = registryClient.getApiDeployment(name);
+   * }
+   * }
+ * + * @param name Required. The name of the deployment to retrieve. Format: + * `projects/*/locations/*/apis/*/deployments/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiDeployment getApiDeployment(ApiDeploymentName name) { + GetApiDeploymentRequest request = + GetApiDeploymentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getApiDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name =
+   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString();
+   *   ApiDeployment response = registryClient.getApiDeployment(name);
+   * }
+   * }
+ * + * @param name Required. The name of the deployment to retrieve. Format: + * `projects/*/locations/*/apis/*/deployments/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiDeployment getApiDeployment(String name) { + GetApiDeploymentRequest request = GetApiDeploymentRequest.newBuilder().setName(name).build(); + return getApiDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetApiDeploymentRequest request =
+   *       GetApiDeploymentRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiDeployment response = registryClient.getApiDeployment(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 ApiDeployment getApiDeployment(GetApiDeploymentRequest request) { + return getApiDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetApiDeploymentRequest request =
+   *       GetApiDeploymentRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.getApiDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   ApiDeployment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getApiDeploymentCallable() { + return stub.getApiDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
+   *   ApiDeployment apiDeployment = ApiDeployment.newBuilder().build();
+   *   String apiDeploymentId = "apiDeploymentId-1299472902";
+   *   ApiDeployment response =
+   *       registryClient.createApiDeployment(parent, apiDeployment, apiDeploymentId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of deployments. Format: + * `projects/*/locations/*/apis/*` + * @param apiDeployment Required. The deployment to create. + * @param apiDeploymentId Required. The ID to use for the deployment, which will become the final + * component of the deployment's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiDeployment createApiDeployment( + ApiName parent, ApiDeployment apiDeployment, String apiDeploymentId) { + CreateApiDeploymentRequest request = + CreateApiDeploymentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setApiDeployment(apiDeployment) + .setApiDeploymentId(apiDeploymentId) + .build(); + return createApiDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
+   *   ApiDeployment apiDeployment = ApiDeployment.newBuilder().build();
+   *   String apiDeploymentId = "apiDeploymentId-1299472902";
+   *   ApiDeployment response =
+   *       registryClient.createApiDeployment(parent, apiDeployment, apiDeploymentId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of deployments. Format: + * `projects/*/locations/*/apis/*` + * @param apiDeployment Required. The deployment to create. + * @param apiDeploymentId Required. The ID to use for the deployment, which will become the final + * component of the deployment's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiDeployment createApiDeployment( + String parent, ApiDeployment apiDeployment, String apiDeploymentId) { + CreateApiDeploymentRequest request = + CreateApiDeploymentRequest.newBuilder() + .setParent(parent) + .setApiDeployment(apiDeployment) + .setApiDeploymentId(apiDeploymentId) + .build(); + return createApiDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   CreateApiDeploymentRequest request =
+   *       CreateApiDeploymentRequest.newBuilder()
+   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setApiDeployment(ApiDeployment.newBuilder().build())
+   *           .setApiDeploymentId("apiDeploymentId-1299472902")
+   *           .build();
+   *   ApiDeployment response = registryClient.createApiDeployment(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 ApiDeployment createApiDeployment(CreateApiDeploymentRequest request) { + return createApiDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   CreateApiDeploymentRequest request =
+   *       CreateApiDeploymentRequest.newBuilder()
+   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setApiDeployment(ApiDeployment.newBuilder().build())
+   *           .setApiDeploymentId("apiDeploymentId-1299472902")
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.createApiDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   ApiDeployment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createApiDeploymentCallable() { + return stub.createApiDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiDeployment apiDeployment = ApiDeployment.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ApiDeployment response = registryClient.updateApiDeployment(apiDeployment, updateMask);
+   * }
+   * }
+ * + * @param apiDeployment Required. The deployment to update. + *

The `name` field is used to identify the deployment to update. Format: + * `projects/*/locations/*/apis/*/deployments/*` + * @param updateMask The list of fields to be updated. If omitted, all fields are updated that are + * set in the request message (fields set to default values are ignored). If an asterisk + * "*" is specified, all fields are updated, including fields that are unspecified/default + * in the request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiDeployment updateApiDeployment( + ApiDeployment apiDeployment, FieldMask updateMask) { + UpdateApiDeploymentRequest request = + UpdateApiDeploymentRequest.newBuilder() + .setApiDeployment(apiDeployment) + .setUpdateMask(updateMask) + .build(); + return updateApiDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   UpdateApiDeploymentRequest request =
+   *       UpdateApiDeploymentRequest.newBuilder()
+   *           .setApiDeployment(ApiDeployment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiDeployment response = registryClient.updateApiDeployment(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 ApiDeployment updateApiDeployment(UpdateApiDeploymentRequest request) { + return updateApiDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to modify a specified deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   UpdateApiDeploymentRequest request =
+   *       UpdateApiDeploymentRequest.newBuilder()
+   *           .setApiDeployment(ApiDeployment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.updateApiDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   ApiDeployment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateApiDeploymentCallable() { + return stub.updateApiDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified deployment, all revisions, and all child resources (e.g., artifacts). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiDeploymentName name =
+   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]");
+   *   registryClient.deleteApiDeployment(name);
+   * }
+   * }
+ * + * @param name Required. The name of the deployment to delete. Format: + * `projects/*/locations/*/apis/*/deployments/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApiDeployment(ApiDeploymentName name) { + DeleteApiDeploymentRequest request = + DeleteApiDeploymentRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteApiDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified deployment, all revisions, and all child resources (e.g., artifacts). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name =
+   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString();
+   *   registryClient.deleteApiDeployment(name);
+   * }
+   * }
+ * + * @param name Required. The name of the deployment to delete. Format: + * `projects/*/locations/*/apis/*/deployments/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApiDeployment(String name) { + DeleteApiDeploymentRequest request = + DeleteApiDeploymentRequest.newBuilder().setName(name).build(); + deleteApiDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified deployment, all revisions, and all child resources (e.g., artifacts). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiDeploymentRequest request =
+   *       DeleteApiDeploymentRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   registryClient.deleteApiDeployment(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 deleteApiDeployment(DeleteApiDeploymentRequest request) { + deleteApiDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified deployment, all revisions, and all child resources (e.g., artifacts). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiDeploymentRequest request =
+   *       DeleteApiDeploymentRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = registryClient.deleteApiDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteApiDeploymentCallable() { + return stub.deleteApiDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a tag to a specified revision of a deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   TagApiDeploymentRevisionRequest request =
+   *       TagApiDeploymentRevisionRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setTag("tag114586")
+   *           .build();
+   *   ApiDeployment response = registryClient.tagApiDeploymentRevision(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 ApiDeployment tagApiDeploymentRevision(TagApiDeploymentRevisionRequest request) { + return tagApiDeploymentRevisionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a tag to a specified revision of a deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   TagApiDeploymentRevisionRequest request =
+   *       TagApiDeploymentRevisionRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setTag("tag114586")
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.tagApiDeploymentRevisionCallable().futureCall(request);
+   *   // Do something.
+   *   ApiDeployment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + tagApiDeploymentRevisionCallable() { + return stub.tagApiDeploymentRevisionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all revisions of a deployment. Revisions are returned in descending order of revision + * creation time. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiDeploymentRevisionsRequest request =
+   *       ListApiDeploymentRevisionsRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ApiDeployment element :
+   *       registryClient.listApiDeploymentRevisions(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 ListApiDeploymentRevisionsPagedResponse listApiDeploymentRevisions( + ListApiDeploymentRevisionsRequest request) { + return listApiDeploymentRevisionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all revisions of a deployment. Revisions are returned in descending order of revision + * creation time. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiDeploymentRevisionsRequest request =
+   *       ListApiDeploymentRevisionsRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.listApiDeploymentRevisionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ApiDeployment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsPagedResponse> + listApiDeploymentRevisionsPagedCallable() { + return stub.listApiDeploymentRevisionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all revisions of a deployment. Revisions are returned in descending order of revision + * creation time. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListApiDeploymentRevisionsRequest request =
+   *       ListApiDeploymentRevisionsRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListApiDeploymentRevisionsResponse response =
+   *         registryClient.listApiDeploymentRevisionsCallable().call(request);
+   *     for (ApiDeployment element : response.getApiDeploymentsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listApiDeploymentRevisionsCallable() { + return stub.listApiDeploymentRevisionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the current revision to a specified prior revision. Note that this creates a new revision + * with a new revision ID. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   RollbackApiDeploymentRequest request =
+   *       RollbackApiDeploymentRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setRevisionId("revisionId-1507445162")
+   *           .build();
+   *   ApiDeployment response = registryClient.rollbackApiDeployment(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 ApiDeployment rollbackApiDeployment(RollbackApiDeploymentRequest request) { + return rollbackApiDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the current revision to a specified prior revision. Note that this creates a new revision + * with a new revision ID. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   RollbackApiDeploymentRequest request =
+   *       RollbackApiDeploymentRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setRevisionId("revisionId-1507445162")
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.rollbackApiDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   ApiDeployment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + rollbackApiDeploymentCallable() { + return stub.rollbackApiDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a revision of a deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiDeploymentName name =
+   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]");
+   *   ApiDeployment response = registryClient.deleteApiDeploymentRevision(name);
+   * }
+   * }
+ * + * @param name Required. The name of the deployment revision to be deleted, with a revision ID + * explicitly included. + *

Example: + * `projects/sample/locations/global/apis/petstore/deployments/prod{@literal @}c7cfa2a8` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiDeployment deleteApiDeploymentRevision(ApiDeploymentName name) { + DeleteApiDeploymentRevisionRequest request = + DeleteApiDeploymentRevisionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteApiDeploymentRevision(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a revision of a deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name =
+   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString();
+   *   ApiDeployment response = registryClient.deleteApiDeploymentRevision(name);
+   * }
+   * }
+ * + * @param name Required. The name of the deployment revision to be deleted, with a revision ID + * explicitly included. + *

Example: + * `projects/sample/locations/global/apis/petstore/deployments/prod{@literal @}c7cfa2a8` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiDeployment deleteApiDeploymentRevision(String name) { + DeleteApiDeploymentRevisionRequest request = + DeleteApiDeploymentRevisionRequest.newBuilder().setName(name).build(); + return deleteApiDeploymentRevision(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a revision of a deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiDeploymentRevisionRequest request =
+   *       DeleteApiDeploymentRevisionRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiDeployment response = registryClient.deleteApiDeploymentRevision(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 ApiDeployment deleteApiDeploymentRevision( + DeleteApiDeploymentRevisionRequest request) { + return deleteApiDeploymentRevisionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a revision of a deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteApiDeploymentRevisionRequest request =
+   *       DeleteApiDeploymentRevisionRequest.newBuilder()
+   *           .setName(
+   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.deleteApiDeploymentRevisionCallable().futureCall(request);
+   *   // Do something.
+   *   ApiDeployment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteApiDeploymentRevisionCallable() { + return stub.deleteApiDeploymentRevisionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching artifacts. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiDeploymentName parent =
+   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]");
+   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListArtifactsPagedResponse listArtifacts(ApiDeploymentName parent) { + ListArtifactsRequest request = + ListArtifactsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listArtifacts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching artifacts. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
+   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListArtifactsPagedResponse listArtifacts(ApiName parent) { + ListArtifactsRequest request = + ListArtifactsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listArtifacts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching artifacts. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiSpecName parent =
+   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
+   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListArtifactsPagedResponse listArtifacts(ApiSpecName parent) { + ListArtifactsRequest request = + ListArtifactsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listArtifacts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching artifacts. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
+   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListArtifactsPagedResponse listArtifacts(ApiVersionName parent) { + ListArtifactsRequest request = + ListArtifactsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listArtifacts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching artifacts. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListArtifactsPagedResponse listArtifacts(LocationName parent) { + ListArtifactsRequest request = + ListArtifactsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listArtifacts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching artifacts. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListArtifactsPagedResponse listArtifacts(String parent) { + ListArtifactsRequest request = ListArtifactsRequest.newBuilder().setParent(parent).build(); + return listArtifacts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching artifacts. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListArtifactsRequest request =
+   *       ListArtifactsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Artifact element : registryClient.listArtifacts(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 ListArtifactsPagedResponse listArtifacts(ListArtifactsRequest request) { + return listArtifactsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching artifacts. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListArtifactsRequest request =
+   *       ListArtifactsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future = registryClient.listArtifactsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Artifact element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listArtifactsPagedCallable() { + return stub.listArtifactsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns matching artifacts. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListArtifactsRequest request =
+   *       ListArtifactsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListArtifactsResponse response = registryClient.listArtifactsCallable().call(request);
+   *     for (Artifact element : response.getArtifactsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listArtifactsCallable() { + return stub.listArtifactsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ArtifactName name =
+   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]");
+   *   Artifact response = registryClient.getArtifact(name);
+   * }
+   * }
+ * + * @param name Required. The name of the artifact to retrieve. Format: `{parent}/artifacts/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Artifact getArtifact(ArtifactName name) { + GetArtifactRequest request = + GetArtifactRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name =
+   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]")
+   *           .toString();
+   *   Artifact response = registryClient.getArtifact(name);
+   * }
+   * }
+ * + * @param name Required. The name of the artifact to retrieve. Format: `{parent}/artifacts/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Artifact getArtifact(String name) { + GetArtifactRequest request = GetArtifactRequest.newBuilder().setName(name).build(); + return getArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetArtifactRequest request =
+   *       GetArtifactRequest.newBuilder()
+   *           .setName(
+   *               ArtifactName.ofProjectLocationArtifactName(
+   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
+   *                   .toString())
+   *           .build();
+   *   Artifact response = registryClient.getArtifact(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 Artifact getArtifact(GetArtifactRequest request) { + return getArtifactCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetArtifactRequest request =
+   *       GetArtifactRequest.newBuilder()
+   *           .setName(
+   *               ArtifactName.ofProjectLocationArtifactName(
+   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = registryClient.getArtifactCallable().futureCall(request);
+   *   // Do something.
+   *   Artifact response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getArtifactCallable() { + return stub.getArtifactCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the contents of a specified artifact. If artifacts are stored with GZip compression, + * the default behavior is to return the artifact uncompressed (the mime_type response field + * indicates the exact format returned). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ArtifactName name =
+   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]");
+   *   HttpBody response = registryClient.getArtifactContents(name);
+   * }
+   * }
+ * + * @param name Required. The name of the artifact whose contents should be retrieved. Format: + * `{parent}/artifacts/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HttpBody getArtifactContents(ArtifactName name) { + GetArtifactContentsRequest request = + GetArtifactContentsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getArtifactContents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the contents of a specified artifact. If artifacts are stored with GZip compression, + * the default behavior is to return the artifact uncompressed (the mime_type response field + * indicates the exact format returned). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name =
+   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]")
+   *           .toString();
+   *   HttpBody response = registryClient.getArtifactContents(name);
+   * }
+   * }
+ * + * @param name Required. The name of the artifact whose contents should be retrieved. Format: + * `{parent}/artifacts/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HttpBody getArtifactContents(String name) { + GetArtifactContentsRequest request = + GetArtifactContentsRequest.newBuilder().setName(name).build(); + return getArtifactContents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the contents of a specified artifact. If artifacts are stored with GZip compression, + * the default behavior is to return the artifact uncompressed (the mime_type response field + * indicates the exact format returned). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetArtifactContentsRequest request =
+   *       GetArtifactContentsRequest.newBuilder()
+   *           .setName(
+   *               ArtifactName.ofProjectLocationArtifactName(
+   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
+   *                   .toString())
+   *           .build();
+   *   HttpBody response = registryClient.getArtifactContents(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 HttpBody getArtifactContents(GetArtifactContentsRequest request) { + return getArtifactContentsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the contents of a specified artifact. If artifacts are stored with GZip compression, + * the default behavior is to return the artifact uncompressed (the mime_type response field + * indicates the exact format returned). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetArtifactContentsRequest request =
+   *       GetArtifactContentsRequest.newBuilder()
+   *           .setName(
+   *               ArtifactName.ofProjectLocationArtifactName(
+   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = registryClient.getArtifactContentsCallable().futureCall(request);
+   *   // Do something.
+   *   HttpBody response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getArtifactContentsCallable() { + return stub.getArtifactContentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiDeploymentName parent =
+   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]");
+   *   Artifact artifact = Artifact.newBuilder().build();
+   *   String artifactId = "artifactId240640653";
+   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @param artifact Required. The artifact to create. + * @param artifactId Required. The ID to use for the artifact, which will become the final + * component of the artifact's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Artifact createArtifact( + ApiDeploymentName parent, Artifact artifact, String artifactId) { + CreateArtifactRequest request = + CreateArtifactRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setArtifact(artifact) + .setArtifactId(artifactId) + .build(); + return createArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
+   *   Artifact artifact = Artifact.newBuilder().build();
+   *   String artifactId = "artifactId240640653";
+   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @param artifact Required. The artifact to create. + * @param artifactId Required. The ID to use for the artifact, which will become the final + * component of the artifact's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Artifact createArtifact(ApiName parent, Artifact artifact, String artifactId) { + CreateArtifactRequest request = + CreateArtifactRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setArtifact(artifact) + .setArtifactId(artifactId) + .build(); + return createArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiSpecName parent =
+   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
+   *   Artifact artifact = Artifact.newBuilder().build();
+   *   String artifactId = "artifactId240640653";
+   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @param artifact Required. The artifact to create. + * @param artifactId Required. The ID to use for the artifact, which will become the final + * component of the artifact's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Artifact createArtifact(ApiSpecName parent, Artifact artifact, String artifactId) { + CreateArtifactRequest request = + CreateArtifactRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setArtifact(artifact) + .setArtifactId(artifactId) + .build(); + return createArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
+   *   Artifact artifact = Artifact.newBuilder().build();
+   *   String artifactId = "artifactId240640653";
+   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @param artifact Required. The artifact to create. + * @param artifactId Required. The ID to use for the artifact, which will become the final + * component of the artifact's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Artifact createArtifact( + ApiVersionName parent, Artifact artifact, String artifactId) { + CreateArtifactRequest request = + CreateArtifactRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setArtifact(artifact) + .setArtifactId(artifactId) + .build(); + return createArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Artifact artifact = Artifact.newBuilder().build();
+   *   String artifactId = "artifactId240640653";
+   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @param artifact Required. The artifact to create. + * @param artifactId Required. The ID to use for the artifact, which will become the final + * component of the artifact's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Artifact createArtifact(LocationName parent, Artifact artifact, String artifactId) { + CreateArtifactRequest request = + CreateArtifactRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setArtifact(artifact) + .setArtifactId(artifactId) + .build(); + return createArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Artifact artifact = Artifact.newBuilder().build();
+   *   String artifactId = "artifactId240640653";
+   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` + * @param artifact Required. The artifact to create. + * @param artifactId Required. The ID to use for the artifact, which will become the final + * component of the artifact's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Following AIP-162, IDs must not have the form of a UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Artifact createArtifact(String parent, Artifact artifact, String artifactId) { + CreateArtifactRequest request = + CreateArtifactRequest.newBuilder() + .setParent(parent) + .setArtifact(artifact) + .setArtifactId(artifactId) + .build(); + return createArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   CreateArtifactRequest request =
+   *       CreateArtifactRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setArtifact(Artifact.newBuilder().build())
+   *           .setArtifactId("artifactId240640653")
+   *           .build();
+   *   Artifact response = registryClient.createArtifact(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 Artifact createArtifact(CreateArtifactRequest request) { + return createArtifactCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   CreateArtifactRequest request =
+   *       CreateArtifactRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setArtifact(Artifact.newBuilder().build())
+   *           .setArtifactId("artifactId240640653")
+   *           .build();
+   *   ApiFuture future = registryClient.createArtifactCallable().futureCall(request);
+   *   // Do something.
+   *   Artifact response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createArtifactCallable() { + return stub.createArtifactCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to replace a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   Artifact artifact = Artifact.newBuilder().build();
+   *   Artifact response = registryClient.replaceArtifact(artifact);
+   * }
+   * }
+ * + * @param artifact Required. The artifact to replace. + *

The `name` field is used to identify the artifact to replace. Format: + * `{parent}/artifacts/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Artifact replaceArtifact(Artifact artifact) { + ReplaceArtifactRequest request = + ReplaceArtifactRequest.newBuilder().setArtifact(artifact).build(); + return replaceArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to replace a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ReplaceArtifactRequest request =
+   *       ReplaceArtifactRequest.newBuilder().setArtifact(Artifact.newBuilder().build()).build();
+   *   Artifact response = registryClient.replaceArtifact(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 Artifact replaceArtifact(ReplaceArtifactRequest request) { + return replaceArtifactCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Used to replace a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ReplaceArtifactRequest request =
+   *       ReplaceArtifactRequest.newBuilder().setArtifact(Artifact.newBuilder().build()).build();
+   *   ApiFuture future = registryClient.replaceArtifactCallable().futureCall(request);
+   *   // Do something.
+   *   Artifact response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable replaceArtifactCallable() { + return stub.replaceArtifactCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ArtifactName name =
+   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]");
+   *   registryClient.deleteArtifact(name);
+   * }
+   * }
+ * + * @param name Required. The name of the artifact to delete. Format: `{parent}/artifacts/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteArtifact(ArtifactName name) { + DeleteArtifactRequest request = + DeleteArtifactRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   String name =
+   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]")
+   *           .toString();
+   *   registryClient.deleteArtifact(name);
+   * }
+   * }
+ * + * @param name Required. The name of the artifact to delete. Format: `{parent}/artifacts/*` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteArtifact(String name) { + DeleteArtifactRequest request = DeleteArtifactRequest.newBuilder().setName(name).build(); + deleteArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteArtifactRequest request =
+   *       DeleteArtifactRequest.newBuilder()
+   *           .setName(
+   *               ArtifactName.ofProjectLocationArtifactName(
+   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
+   *                   .toString())
+   *           .build();
+   *   registryClient.deleteArtifact(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 deleteArtifact(DeleteArtifactRequest request) { + deleteArtifactCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a specified artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   DeleteArtifactRequest request =
+   *       DeleteArtifactRequest.newBuilder()
+   *           .setName(
+   *               ArtifactName.ofProjectLocationArtifactName(
+   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = registryClient.deleteArtifactCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteArtifactCallable() { + return stub.deleteArtifactCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : registryClient.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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = registryClient.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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = registryClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = registryClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = registryClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = registryClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = registryClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = registryClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = registryClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = registryClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (RegistryClient registryClient = RegistryClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       registryClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @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 ListApisPagedResponse + extends AbstractPagedListResponse< + ListApisRequest, ListApisResponse, Api, ListApisPage, ListApisFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListApisPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListApisPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListApisPagedResponse(ListApisPage page) { + super(page, ListApisFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListApisPage + extends AbstractPage { + + private ListApisPage( + PageContext context, ListApisResponse response) { + super(context, response); + } + + private static ListApisPage createEmptyPage() { + return new ListApisPage(null, null); + } + + @Override + protected ListApisPage createPage( + PageContext context, ListApisResponse response) { + return new ListApisPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListApisFixedSizeCollection + extends AbstractFixedSizeCollection< + ListApisRequest, ListApisResponse, Api, ListApisPage, ListApisFixedSizeCollection> { + + private ListApisFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListApisFixedSizeCollection createEmptyCollection() { + return new ListApisFixedSizeCollection(null, 0); + } + + @Override + protected ListApisFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListApisFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListApiVersionsPagedResponse + extends AbstractPagedListResponse< + ListApiVersionsRequest, ListApiVersionsResponse, ApiVersion, ListApiVersionsPage, + ListApiVersionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListApiVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListApiVersionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListApiVersionsPagedResponse(ListApiVersionsPage page) { + super(page, ListApiVersionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListApiVersionsPage + extends AbstractPage< + ListApiVersionsRequest, ListApiVersionsResponse, ApiVersion, ListApiVersionsPage> { + + private ListApiVersionsPage( + PageContext context, + ListApiVersionsResponse response) { + super(context, response); + } + + private static ListApiVersionsPage createEmptyPage() { + return new ListApiVersionsPage(null, null); + } + + @Override + protected ListApiVersionsPage createPage( + PageContext context, + ListApiVersionsResponse response) { + return new ListApiVersionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListApiVersionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListApiVersionsRequest, ListApiVersionsResponse, ApiVersion, ListApiVersionsPage, + ListApiVersionsFixedSizeCollection> { + + private ListApiVersionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListApiVersionsFixedSizeCollection createEmptyCollection() { + return new ListApiVersionsFixedSizeCollection(null, 0); + } + + @Override + protected ListApiVersionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListApiVersionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListApiSpecsPagedResponse + extends AbstractPagedListResponse< + ListApiSpecsRequest, ListApiSpecsResponse, ApiSpec, ListApiSpecsPage, + ListApiSpecsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListApiSpecsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListApiSpecsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListApiSpecsPagedResponse(ListApiSpecsPage page) { + super(page, ListApiSpecsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListApiSpecsPage + extends AbstractPage { + + private ListApiSpecsPage( + PageContext context, + ListApiSpecsResponse response) { + super(context, response); + } + + private static ListApiSpecsPage createEmptyPage() { + return new ListApiSpecsPage(null, null); + } + + @Override + protected ListApiSpecsPage createPage( + PageContext context, + ListApiSpecsResponse response) { + return new ListApiSpecsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListApiSpecsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListApiSpecsRequest, ListApiSpecsResponse, ApiSpec, ListApiSpecsPage, + ListApiSpecsFixedSizeCollection> { + + private ListApiSpecsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListApiSpecsFixedSizeCollection createEmptyCollection() { + return new ListApiSpecsFixedSizeCollection(null, 0); + } + + @Override + protected ListApiSpecsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListApiSpecsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListApiSpecRevisionsPagedResponse + extends AbstractPagedListResponse< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, ApiSpec, + ListApiSpecRevisionsPage, ListApiSpecRevisionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListApiSpecRevisionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListApiSpecRevisionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListApiSpecRevisionsPagedResponse(ListApiSpecRevisionsPage page) { + super(page, ListApiSpecRevisionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListApiSpecRevisionsPage + extends AbstractPage< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, ApiSpec, + ListApiSpecRevisionsPage> { + + private ListApiSpecRevisionsPage( + PageContext context, + ListApiSpecRevisionsResponse response) { + super(context, response); + } + + private static ListApiSpecRevisionsPage createEmptyPage() { + return new ListApiSpecRevisionsPage(null, null); + } + + @Override + protected ListApiSpecRevisionsPage createPage( + PageContext context, + ListApiSpecRevisionsResponse response) { + return new ListApiSpecRevisionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListApiSpecRevisionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, ApiSpec, + ListApiSpecRevisionsPage, ListApiSpecRevisionsFixedSizeCollection> { + + private ListApiSpecRevisionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListApiSpecRevisionsFixedSizeCollection createEmptyCollection() { + return new ListApiSpecRevisionsFixedSizeCollection(null, 0); + } + + @Override + protected ListApiSpecRevisionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListApiSpecRevisionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListApiDeploymentsPagedResponse + extends AbstractPagedListResponse< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ApiDeployment, + ListApiDeploymentsPage, ListApiDeploymentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListApiDeploymentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListApiDeploymentsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListApiDeploymentsPagedResponse(ListApiDeploymentsPage page) { + super(page, ListApiDeploymentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListApiDeploymentsPage + extends AbstractPage< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ApiDeployment, + ListApiDeploymentsPage> { + + private ListApiDeploymentsPage( + PageContext context, + ListApiDeploymentsResponse response) { + super(context, response); + } + + private static ListApiDeploymentsPage createEmptyPage() { + return new ListApiDeploymentsPage(null, null); + } + + @Override + protected ListApiDeploymentsPage createPage( + PageContext context, + ListApiDeploymentsResponse response) { + return new ListApiDeploymentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListApiDeploymentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ApiDeployment, + ListApiDeploymentsPage, ListApiDeploymentsFixedSizeCollection> { + + private ListApiDeploymentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListApiDeploymentsFixedSizeCollection createEmptyCollection() { + return new ListApiDeploymentsFixedSizeCollection(null, 0); + } + + @Override + protected ListApiDeploymentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListApiDeploymentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListApiDeploymentRevisionsPagedResponse + extends AbstractPagedListResponse< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, ApiDeployment, + ListApiDeploymentRevisionsPage, ListApiDeploymentRevisionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ApiDeployment> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListApiDeploymentRevisionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListApiDeploymentRevisionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListApiDeploymentRevisionsPagedResponse(ListApiDeploymentRevisionsPage page) { + super(page, ListApiDeploymentRevisionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListApiDeploymentRevisionsPage + extends AbstractPage< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, ApiDeployment, + ListApiDeploymentRevisionsPage> { + + private ListApiDeploymentRevisionsPage( + PageContext< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ApiDeployment> + context, + ListApiDeploymentRevisionsResponse response) { + super(context, response); + } + + private static ListApiDeploymentRevisionsPage createEmptyPage() { + return new ListApiDeploymentRevisionsPage(null, null); + } + + @Override + protected ListApiDeploymentRevisionsPage createPage( + PageContext< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ApiDeployment> + context, + ListApiDeploymentRevisionsResponse response) { + return new ListApiDeploymentRevisionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ApiDeployment> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListApiDeploymentRevisionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, ApiDeployment, + ListApiDeploymentRevisionsPage, ListApiDeploymentRevisionsFixedSizeCollection> { + + private ListApiDeploymentRevisionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListApiDeploymentRevisionsFixedSizeCollection createEmptyCollection() { + return new ListApiDeploymentRevisionsFixedSizeCollection(null, 0); + } + + @Override + protected ListApiDeploymentRevisionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListApiDeploymentRevisionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListArtifactsPagedResponse + extends AbstractPagedListResponse< + ListArtifactsRequest, ListArtifactsResponse, Artifact, ListArtifactsPage, + ListArtifactsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListArtifactsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListArtifactsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListArtifactsPagedResponse(ListArtifactsPage page) { + super(page, ListArtifactsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListArtifactsPage + extends AbstractPage< + ListArtifactsRequest, ListArtifactsResponse, Artifact, ListArtifactsPage> { + + private ListArtifactsPage( + PageContext context, + ListArtifactsResponse response) { + super(context, response); + } + + private static ListArtifactsPage createEmptyPage() { + return new ListArtifactsPage(null, null); + } + + @Override + protected ListArtifactsPage createPage( + PageContext context, + ListArtifactsResponse response) { + return new ListArtifactsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListArtifactsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListArtifactsRequest, ListArtifactsResponse, Artifact, ListArtifactsPage, + ListArtifactsFixedSizeCollection> { + + private ListArtifactsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListArtifactsFixedSizeCollection createEmptyCollection() { + return new ListArtifactsFixedSizeCollection(null, 0); + } + + @Override + protected ListArtifactsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListArtifactsFixedSizeCollection(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( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistrySettings.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistrySettings.java new file mode 100644 index 000000000000..10cb3014448b --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistrySettings.java @@ -0,0 +1,664 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1; + +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; + +import com.google.api.HttpBody; +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.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.apigeeregistry.v1.stub.RegistryStubSettings; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link RegistryClient}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * RegistrySettings.Builder registrySettingsBuilder = RegistrySettings.newBuilder();
+ * registrySettingsBuilder
+ *     .getApiSettings()
+ *     .setRetrySettings(
+ *         registrySettingsBuilder
+ *             .getApiSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * RegistrySettings registrySettings = registrySettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class RegistrySettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listApis. */ + public PagedCallSettings + listApisSettings() { + return ((RegistryStubSettings) getStubSettings()).listApisSettings(); + } + + /** Returns the object with the settings used for calls to getApi. */ + public UnaryCallSettings getApiSettings() { + return ((RegistryStubSettings) getStubSettings()).getApiSettings(); + } + + /** Returns the object with the settings used for calls to createApi. */ + public UnaryCallSettings createApiSettings() { + return ((RegistryStubSettings) getStubSettings()).createApiSettings(); + } + + /** Returns the object with the settings used for calls to updateApi. */ + public UnaryCallSettings updateApiSettings() { + return ((RegistryStubSettings) getStubSettings()).updateApiSettings(); + } + + /** Returns the object with the settings used for calls to deleteApi. */ + public UnaryCallSettings deleteApiSettings() { + return ((RegistryStubSettings) getStubSettings()).deleteApiSettings(); + } + + /** Returns the object with the settings used for calls to listApiVersions. */ + public PagedCallSettings< + ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> + listApiVersionsSettings() { + return ((RegistryStubSettings) getStubSettings()).listApiVersionsSettings(); + } + + /** Returns the object with the settings used for calls to getApiVersion. */ + public UnaryCallSettings getApiVersionSettings() { + return ((RegistryStubSettings) getStubSettings()).getApiVersionSettings(); + } + + /** Returns the object with the settings used for calls to createApiVersion. */ + public UnaryCallSettings createApiVersionSettings() { + return ((RegistryStubSettings) getStubSettings()).createApiVersionSettings(); + } + + /** Returns the object with the settings used for calls to updateApiVersion. */ + public UnaryCallSettings updateApiVersionSettings() { + return ((RegistryStubSettings) getStubSettings()).updateApiVersionSettings(); + } + + /** Returns the object with the settings used for calls to deleteApiVersion. */ + public UnaryCallSettings deleteApiVersionSettings() { + return ((RegistryStubSettings) getStubSettings()).deleteApiVersionSettings(); + } + + /** Returns the object with the settings used for calls to listApiSpecs. */ + public PagedCallSettings + listApiSpecsSettings() { + return ((RegistryStubSettings) getStubSettings()).listApiSpecsSettings(); + } + + /** Returns the object with the settings used for calls to getApiSpec. */ + public UnaryCallSettings getApiSpecSettings() { + return ((RegistryStubSettings) getStubSettings()).getApiSpecSettings(); + } + + /** Returns the object with the settings used for calls to getApiSpecContents. */ + public UnaryCallSettings getApiSpecContentsSettings() { + return ((RegistryStubSettings) getStubSettings()).getApiSpecContentsSettings(); + } + + /** Returns the object with the settings used for calls to createApiSpec. */ + public UnaryCallSettings createApiSpecSettings() { + return ((RegistryStubSettings) getStubSettings()).createApiSpecSettings(); + } + + /** Returns the object with the settings used for calls to updateApiSpec. */ + public UnaryCallSettings updateApiSpecSettings() { + return ((RegistryStubSettings) getStubSettings()).updateApiSpecSettings(); + } + + /** Returns the object with the settings used for calls to deleteApiSpec. */ + public UnaryCallSettings deleteApiSpecSettings() { + return ((RegistryStubSettings) getStubSettings()).deleteApiSpecSettings(); + } + + /** Returns the object with the settings used for calls to tagApiSpecRevision. */ + public UnaryCallSettings tagApiSpecRevisionSettings() { + return ((RegistryStubSettings) getStubSettings()).tagApiSpecRevisionSettings(); + } + + /** Returns the object with the settings used for calls to listApiSpecRevisions. */ + public PagedCallSettings< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, + ListApiSpecRevisionsPagedResponse> + listApiSpecRevisionsSettings() { + return ((RegistryStubSettings) getStubSettings()).listApiSpecRevisionsSettings(); + } + + /** Returns the object with the settings used for calls to rollbackApiSpec. */ + public UnaryCallSettings rollbackApiSpecSettings() { + return ((RegistryStubSettings) getStubSettings()).rollbackApiSpecSettings(); + } + + /** Returns the object with the settings used for calls to deleteApiSpecRevision. */ + public UnaryCallSettings deleteApiSpecRevisionSettings() { + return ((RegistryStubSettings) getStubSettings()).deleteApiSpecRevisionSettings(); + } + + /** Returns the object with the settings used for calls to listApiDeployments. */ + public PagedCallSettings< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> + listApiDeploymentsSettings() { + return ((RegistryStubSettings) getStubSettings()).listApiDeploymentsSettings(); + } + + /** Returns the object with the settings used for calls to getApiDeployment. */ + public UnaryCallSettings getApiDeploymentSettings() { + return ((RegistryStubSettings) getStubSettings()).getApiDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to createApiDeployment. */ + public UnaryCallSettings + createApiDeploymentSettings() { + return ((RegistryStubSettings) getStubSettings()).createApiDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to updateApiDeployment. */ + public UnaryCallSettings + updateApiDeploymentSettings() { + return ((RegistryStubSettings) getStubSettings()).updateApiDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to deleteApiDeployment. */ + public UnaryCallSettings deleteApiDeploymentSettings() { + return ((RegistryStubSettings) getStubSettings()).deleteApiDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to tagApiDeploymentRevision. */ + public UnaryCallSettings + tagApiDeploymentRevisionSettings() { + return ((RegistryStubSettings) getStubSettings()).tagApiDeploymentRevisionSettings(); + } + + /** Returns the object with the settings used for calls to listApiDeploymentRevisions. */ + public PagedCallSettings< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ListApiDeploymentRevisionsPagedResponse> + listApiDeploymentRevisionsSettings() { + return ((RegistryStubSettings) getStubSettings()).listApiDeploymentRevisionsSettings(); + } + + /** Returns the object with the settings used for calls to rollbackApiDeployment. */ + public UnaryCallSettings + rollbackApiDeploymentSettings() { + return ((RegistryStubSettings) getStubSettings()).rollbackApiDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to deleteApiDeploymentRevision. */ + public UnaryCallSettings + deleteApiDeploymentRevisionSettings() { + return ((RegistryStubSettings) getStubSettings()).deleteApiDeploymentRevisionSettings(); + } + + /** Returns the object with the settings used for calls to listArtifacts. */ + public PagedCallSettings + listArtifactsSettings() { + return ((RegistryStubSettings) getStubSettings()).listArtifactsSettings(); + } + + /** Returns the object with the settings used for calls to getArtifact. */ + public UnaryCallSettings getArtifactSettings() { + return ((RegistryStubSettings) getStubSettings()).getArtifactSettings(); + } + + /** Returns the object with the settings used for calls to getArtifactContents. */ + public UnaryCallSettings getArtifactContentsSettings() { + return ((RegistryStubSettings) getStubSettings()).getArtifactContentsSettings(); + } + + /** Returns the object with the settings used for calls to createArtifact. */ + public UnaryCallSettings createArtifactSettings() { + return ((RegistryStubSettings) getStubSettings()).createArtifactSettings(); + } + + /** Returns the object with the settings used for calls to replaceArtifact. */ + public UnaryCallSettings replaceArtifactSettings() { + return ((RegistryStubSettings) getStubSettings()).replaceArtifactSettings(); + } + + /** Returns the object with the settings used for calls to deleteArtifact. */ + public UnaryCallSettings deleteArtifactSettings() { + return ((RegistryStubSettings) getStubSettings()).deleteArtifactSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((RegistryStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((RegistryStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((RegistryStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((RegistryStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((RegistryStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final RegistrySettings create(RegistryStubSettings stub) throws IOException { + return new RegistrySettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return RegistryStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return RegistryStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return RegistryStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return RegistryStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return RegistryStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return RegistryStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return RegistryStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return RegistryStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(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 RegistrySettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for RegistrySettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(RegistryStubSettings.newBuilder(clientContext)); + } + + protected Builder(RegistrySettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(RegistryStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(RegistryStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(RegistryStubSettings.newHttpJsonBuilder()); + } + + public RegistryStubSettings.Builder getStubSettingsBuilder() { + return ((RegistryStubSettings.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 listApis. */ + public PagedCallSettings.Builder + listApisSettings() { + return getStubSettingsBuilder().listApisSettings(); + } + + /** Returns the builder for the settings used for calls to getApi. */ + public UnaryCallSettings.Builder getApiSettings() { + return getStubSettingsBuilder().getApiSettings(); + } + + /** Returns the builder for the settings used for calls to createApi. */ + public UnaryCallSettings.Builder createApiSettings() { + return getStubSettingsBuilder().createApiSettings(); + } + + /** Returns the builder for the settings used for calls to updateApi. */ + public UnaryCallSettings.Builder updateApiSettings() { + return getStubSettingsBuilder().updateApiSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApi. */ + public UnaryCallSettings.Builder deleteApiSettings() { + return getStubSettingsBuilder().deleteApiSettings(); + } + + /** Returns the builder for the settings used for calls to listApiVersions. */ + public PagedCallSettings.Builder< + ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> + listApiVersionsSettings() { + return getStubSettingsBuilder().listApiVersionsSettings(); + } + + /** Returns the builder for the settings used for calls to getApiVersion. */ + public UnaryCallSettings.Builder getApiVersionSettings() { + return getStubSettingsBuilder().getApiVersionSettings(); + } + + /** Returns the builder for the settings used for calls to createApiVersion. */ + public UnaryCallSettings.Builder + createApiVersionSettings() { + return getStubSettingsBuilder().createApiVersionSettings(); + } + + /** Returns the builder for the settings used for calls to updateApiVersion. */ + public UnaryCallSettings.Builder + updateApiVersionSettings() { + return getStubSettingsBuilder().updateApiVersionSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApiVersion. */ + public UnaryCallSettings.Builder deleteApiVersionSettings() { + return getStubSettingsBuilder().deleteApiVersionSettings(); + } + + /** Returns the builder for the settings used for calls to listApiSpecs. */ + public PagedCallSettings.Builder< + ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse> + listApiSpecsSettings() { + return getStubSettingsBuilder().listApiSpecsSettings(); + } + + /** Returns the builder for the settings used for calls to getApiSpec. */ + public UnaryCallSettings.Builder getApiSpecSettings() { + return getStubSettingsBuilder().getApiSpecSettings(); + } + + /** Returns the builder for the settings used for calls to getApiSpecContents. */ + public UnaryCallSettings.Builder + getApiSpecContentsSettings() { + return getStubSettingsBuilder().getApiSpecContentsSettings(); + } + + /** Returns the builder for the settings used for calls to createApiSpec. */ + public UnaryCallSettings.Builder createApiSpecSettings() { + return getStubSettingsBuilder().createApiSpecSettings(); + } + + /** Returns the builder for the settings used for calls to updateApiSpec. */ + public UnaryCallSettings.Builder updateApiSpecSettings() { + return getStubSettingsBuilder().updateApiSpecSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApiSpec. */ + public UnaryCallSettings.Builder deleteApiSpecSettings() { + return getStubSettingsBuilder().deleteApiSpecSettings(); + } + + /** Returns the builder for the settings used for calls to tagApiSpecRevision. */ + public UnaryCallSettings.Builder + tagApiSpecRevisionSettings() { + return getStubSettingsBuilder().tagApiSpecRevisionSettings(); + } + + /** Returns the builder for the settings used for calls to listApiSpecRevisions. */ + public PagedCallSettings.Builder< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, + ListApiSpecRevisionsPagedResponse> + listApiSpecRevisionsSettings() { + return getStubSettingsBuilder().listApiSpecRevisionsSettings(); + } + + /** Returns the builder for the settings used for calls to rollbackApiSpec. */ + public UnaryCallSettings.Builder rollbackApiSpecSettings() { + return getStubSettingsBuilder().rollbackApiSpecSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApiSpecRevision. */ + public UnaryCallSettings.Builder + deleteApiSpecRevisionSettings() { + return getStubSettingsBuilder().deleteApiSpecRevisionSettings(); + } + + /** Returns the builder for the settings used for calls to listApiDeployments. */ + public PagedCallSettings.Builder< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> + listApiDeploymentsSettings() { + return getStubSettingsBuilder().listApiDeploymentsSettings(); + } + + /** Returns the builder for the settings used for calls to getApiDeployment. */ + public UnaryCallSettings.Builder + getApiDeploymentSettings() { + return getStubSettingsBuilder().getApiDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to createApiDeployment. */ + public UnaryCallSettings.Builder + createApiDeploymentSettings() { + return getStubSettingsBuilder().createApiDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to updateApiDeployment. */ + public UnaryCallSettings.Builder + updateApiDeploymentSettings() { + return getStubSettingsBuilder().updateApiDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApiDeployment. */ + public UnaryCallSettings.Builder + deleteApiDeploymentSettings() { + return getStubSettingsBuilder().deleteApiDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to tagApiDeploymentRevision. */ + public UnaryCallSettings.Builder + tagApiDeploymentRevisionSettings() { + return getStubSettingsBuilder().tagApiDeploymentRevisionSettings(); + } + + /** Returns the builder for the settings used for calls to listApiDeploymentRevisions. */ + public PagedCallSettings.Builder< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ListApiDeploymentRevisionsPagedResponse> + listApiDeploymentRevisionsSettings() { + return getStubSettingsBuilder().listApiDeploymentRevisionsSettings(); + } + + /** Returns the builder for the settings used for calls to rollbackApiDeployment. */ + public UnaryCallSettings.Builder + rollbackApiDeploymentSettings() { + return getStubSettingsBuilder().rollbackApiDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApiDeploymentRevision. */ + public UnaryCallSettings.Builder + deleteApiDeploymentRevisionSettings() { + return getStubSettingsBuilder().deleteApiDeploymentRevisionSettings(); + } + + /** Returns the builder for the settings used for calls to listArtifacts. */ + public PagedCallSettings.Builder< + ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse> + listArtifactsSettings() { + return getStubSettingsBuilder().listArtifactsSettings(); + } + + /** Returns the builder for the settings used for calls to getArtifact. */ + public UnaryCallSettings.Builder getArtifactSettings() { + return getStubSettingsBuilder().getArtifactSettings(); + } + + /** Returns the builder for the settings used for calls to getArtifactContents. */ + public UnaryCallSettings.Builder + getArtifactContentsSettings() { + return getStubSettingsBuilder().getArtifactContentsSettings(); + } + + /** Returns the builder for the settings used for calls to createArtifact. */ + public UnaryCallSettings.Builder createArtifactSettings() { + return getStubSettingsBuilder().createArtifactSettings(); + } + + /** Returns the builder for the settings used for calls to replaceArtifact. */ + public UnaryCallSettings.Builder replaceArtifactSettings() { + return getStubSettingsBuilder().replaceArtifactSettings(); + } + + /** Returns the builder for the settings used for calls to deleteArtifact. */ + public UnaryCallSettings.Builder deleteArtifactSettings() { + return getStubSettingsBuilder().deleteArtifactSettings(); + } + + /** 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(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public RegistrySettings build() throws IOException { + return new RegistrySettings(this); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/gapic_metadata.json b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/gapic_metadata.json new file mode 100644 index 000000000000..bc8c07923bf7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/gapic_metadata.json @@ -0,0 +1,171 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.apigeeregistry.v1", + "libraryPackage": "com.google.cloud.apigeeregistry.v1", + "services": { + "Provisioning": { + "clients": { + "grpc": { + "libraryClient": "ProvisioningClient", + "rpcs": { + "CreateInstance": { + "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"] + }, + "DeleteInstance": { + "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetInstance": { + "methods": ["getInstance", "getInstance", "getInstance", "getInstanceCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + } + } + } + } + }, + "Registry": { + "clients": { + "grpc": { + "libraryClient": "RegistryClient", + "rpcs": { + "CreateApi": { + "methods": ["createApi", "createApi", "createApi", "createApiCallable"] + }, + "CreateApiDeployment": { + "methods": ["createApiDeployment", "createApiDeployment", "createApiDeployment", "createApiDeploymentCallable"] + }, + "CreateApiSpec": { + "methods": ["createApiSpec", "createApiSpec", "createApiSpec", "createApiSpecCallable"] + }, + "CreateApiVersion": { + "methods": ["createApiVersion", "createApiVersion", "createApiVersion", "createApiVersionCallable"] + }, + "CreateArtifact": { + "methods": ["createArtifact", "createArtifact", "createArtifact", "createArtifact", "createArtifact", "createArtifact", "createArtifact", "createArtifactCallable"] + }, + "DeleteApi": { + "methods": ["deleteApi", "deleteApi", "deleteApi", "deleteApiCallable"] + }, + "DeleteApiDeployment": { + "methods": ["deleteApiDeployment", "deleteApiDeployment", "deleteApiDeployment", "deleteApiDeploymentCallable"] + }, + "DeleteApiDeploymentRevision": { + "methods": ["deleteApiDeploymentRevision", "deleteApiDeploymentRevision", "deleteApiDeploymentRevision", "deleteApiDeploymentRevisionCallable"] + }, + "DeleteApiSpec": { + "methods": ["deleteApiSpec", "deleteApiSpec", "deleteApiSpec", "deleteApiSpecCallable"] + }, + "DeleteApiSpecRevision": { + "methods": ["deleteApiSpecRevision", "deleteApiSpecRevision", "deleteApiSpecRevision", "deleteApiSpecRevisionCallable"] + }, + "DeleteApiVersion": { + "methods": ["deleteApiVersion", "deleteApiVersion", "deleteApiVersion", "deleteApiVersionCallable"] + }, + "DeleteArtifact": { + "methods": ["deleteArtifact", "deleteArtifact", "deleteArtifact", "deleteArtifactCallable"] + }, + "GetApi": { + "methods": ["getApi", "getApi", "getApi", "getApiCallable"] + }, + "GetApiDeployment": { + "methods": ["getApiDeployment", "getApiDeployment", "getApiDeployment", "getApiDeploymentCallable"] + }, + "GetApiSpec": { + "methods": ["getApiSpec", "getApiSpec", "getApiSpec", "getApiSpecCallable"] + }, + "GetApiSpecContents": { + "methods": ["getApiSpecContents", "getApiSpecContents", "getApiSpecContents", "getApiSpecContentsCallable"] + }, + "GetApiVersion": { + "methods": ["getApiVersion", "getApiVersion", "getApiVersion", "getApiVersionCallable"] + }, + "GetArtifact": { + "methods": ["getArtifact", "getArtifact", "getArtifact", "getArtifactCallable"] + }, + "GetArtifactContents": { + "methods": ["getArtifactContents", "getArtifactContents", "getArtifactContents", "getArtifactContentsCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListApiDeploymentRevisions": { + "methods": ["listApiDeploymentRevisions", "listApiDeploymentRevisionsPagedCallable", "listApiDeploymentRevisionsCallable"] + }, + "ListApiDeployments": { + "methods": ["listApiDeployments", "listApiDeployments", "listApiDeployments", "listApiDeploymentsPagedCallable", "listApiDeploymentsCallable"] + }, + "ListApiSpecRevisions": { + "methods": ["listApiSpecRevisions", "listApiSpecRevisionsPagedCallable", "listApiSpecRevisionsCallable"] + }, + "ListApiSpecs": { + "methods": ["listApiSpecs", "listApiSpecs", "listApiSpecs", "listApiSpecsPagedCallable", "listApiSpecsCallable"] + }, + "ListApiVersions": { + "methods": ["listApiVersions", "listApiVersions", "listApiVersions", "listApiVersionsPagedCallable", "listApiVersionsCallable"] + }, + "ListApis": { + "methods": ["listApis", "listApis", "listApis", "listApisPagedCallable", "listApisCallable"] + }, + "ListArtifacts": { + "methods": ["listArtifacts", "listArtifacts", "listArtifacts", "listArtifacts", "listArtifacts", "listArtifacts", "listArtifacts", "listArtifactsPagedCallable", "listArtifactsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ReplaceArtifact": { + "methods": ["replaceArtifact", "replaceArtifact", "replaceArtifactCallable"] + }, + "RollbackApiDeployment": { + "methods": ["rollbackApiDeployment", "rollbackApiDeploymentCallable"] + }, + "RollbackApiSpec": { + "methods": ["rollbackApiSpec", "rollbackApiSpecCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TagApiDeploymentRevision": { + "methods": ["tagApiDeploymentRevision", "tagApiDeploymentRevisionCallable"] + }, + "TagApiSpecRevision": { + "methods": ["tagApiSpecRevision", "tagApiSpecRevisionCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateApi": { + "methods": ["updateApi", "updateApi", "updateApiCallable"] + }, + "UpdateApiDeployment": { + "methods": ["updateApiDeployment", "updateApiDeployment", "updateApiDeploymentCallable"] + }, + "UpdateApiSpec": { + "methods": ["updateApiSpec", "updateApiSpec", "updateApiSpecCallable"] + }, + "UpdateApiVersion": { + "methods": ["updateApiVersion", "updateApiVersion", "updateApiVersionCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/package-info.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/package-info.java new file mode 100644 index 000000000000..f3f75ba59638 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/package-info.java @@ -0,0 +1,56 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 Apigee Registry API + * + *

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

======================= ProvisioningClient ======================= + * + *

Service Description: The service that is used for managing the data plane provisioning of the + * Registry. + * + *

Sample for ProvisioningClient: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+ *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+ *   Instance response = provisioningClient.getInstance(name);
+ * }
+ * }
+ * + *

======================= RegistryClient ======================= + * + *

Service Description: The Registry service allows teams to manage descriptions of APIs. + * + *

Sample for RegistryClient: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (RegistryClient registryClient = RegistryClient.create()) {
+ *   ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
+ *   Api response = registryClient.getApi(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.apigeeregistry.v1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningCallableFactory.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningCallableFactory.java new file mode 100644 index 000000000000..78c4842045e4 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Provisioning service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcProvisioningCallableFactory 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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningStub.java new file mode 100644 index 000000000000..6661d8addb18 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningStub.java @@ -0,0 +1,419 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub; + +import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; + +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.UnaryCallable; +import com.google.cloud.apigeeregistry.v1.CreateInstanceRequest; +import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; +import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.OperationMetadata; +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.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Provisioning service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcProvisioningStub extends ProvisioningStub { + private static final MethodDescriptor + createInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/CreateInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/DeleteInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/GetInstance") + .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) + .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())) + .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())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable createInstanceCallable; + private final OperationCallable + createInstanceOperationCallable; + private final UnaryCallable deleteInstanceCallable; + private final OperationCallable + deleteInstanceOperationCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcProvisioningStub create(ProvisioningStubSettings settings) + throws IOException { + return new GrpcProvisioningStub(settings, ClientContext.create(settings)); + } + + public static final GrpcProvisioningStub create(ClientContext clientContext) throws IOException { + return new GrpcProvisioningStub(ProvisioningStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcProvisioningStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcProvisioningStub( + ProvisioningStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcProvisioningStub, 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 GrpcProvisioningStub(ProvisioningStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcProvisioningCallableFactory()); + } + + /** + * Constructs an instance of GrpcProvisioningStub, 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 GrpcProvisioningStub( + ProvisioningStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + + this.createInstanceCallable = + callableFactory.createUnaryCallable( + createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); + this.createInstanceOperationCallable = + callableFactory.createOperationCallable( + createInstanceTransportSettings, + settings.createInstanceOperationSettings(), + clientContext, + operationsStub); + this.deleteInstanceCallable = + callableFactory.createUnaryCallable( + deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); + this.deleteInstanceOperationCallable = + callableFactory.createOperationCallable( + deleteInstanceTransportSettings, + settings.deleteInstanceOperationSettings(), + clientContext, + operationsStub); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + 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.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createInstanceCallable() { + return createInstanceCallable; + } + + @Override + public OperationCallable + createInstanceOperationCallable() { + return createInstanceOperationCallable; + } + + @Override + public UnaryCallable deleteInstanceCallable() { + return deleteInstanceCallable; + } + + @Override + public OperationCallable + deleteInstanceOperationCallable() { + return deleteInstanceOperationCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryCallableFactory.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryCallableFactory.java new file mode 100644 index 000000000000..92e38e45e345 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Registry service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcRegistryCallableFactory 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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryStub.java new file mode 100644 index 000000000000..70303cad5f08 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryStub.java @@ -0,0 +1,1494 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub; + +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; + +import com.google.api.HttpBody; +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.UnaryCallable; +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; +import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.GetApiRequest; +import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; +import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; +import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApisRequest; +import com.google.cloud.apigeeregistry.v1.ListApisResponse; +import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; +import com.google.cloud.apigeeregistry.v1.ListArtifactsResponse; +import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; +import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; +import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; +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.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Registry service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcRegistryStub extends RegistryStub { + private static final MethodDescriptor + listApisMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApis") + .setRequestMarshaller(ProtoUtils.marshaller(ListApisRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListApisResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getApiMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApi") + .setRequestMarshaller(ProtoUtils.marshaller(GetApiRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Api.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createApiMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApi") + .setRequestMarshaller(ProtoUtils.marshaller(CreateApiRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Api.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateApiMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApi") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateApiRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Api.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteApiMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApi") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteApiRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listApiVersionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiVersions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListApiVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListApiVersionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getApiVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(GetApiVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiVersion.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createApiVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateApiVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiVersion.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateApiVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateApiVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiVersion.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteApiVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteApiVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listApiSpecsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiSpecs") + .setRequestMarshaller(ProtoUtils.marshaller(ListApiSpecsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListApiSpecsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getApiSpecMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiSpec") + .setRequestMarshaller(ProtoUtils.marshaller(GetApiSpecRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getApiSpecContentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiSpecContents") + .setRequestMarshaller( + ProtoUtils.marshaller(GetApiSpecContentsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(HttpBody.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createApiSpecMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiSpec") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateApiSpecRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateApiSpecMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiSpec") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateApiSpecRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteApiSpecMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiSpec") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteApiSpecRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + tagApiSpecRevisionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/TagApiSpecRevision") + .setRequestMarshaller( + ProtoUtils.marshaller(TagApiSpecRevisionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listApiSpecRevisionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiSpecRevisions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListApiSpecRevisionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListApiSpecRevisionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + rollbackApiSpecMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/RollbackApiSpec") + .setRequestMarshaller( + ProtoUtils.marshaller(RollbackApiSpecRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteApiSpecRevisionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiSpecRevision") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteApiSpecRevisionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listApiDeploymentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiDeployments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListApiDeploymentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListApiDeploymentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getApiDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(GetApiDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createApiDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateApiDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateApiDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateApiDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteApiDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteApiDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + tagApiDeploymentRevisionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/TagApiDeploymentRevision") + .setRequestMarshaller( + ProtoUtils.marshaller(TagApiDeploymentRevisionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse> + listApiDeploymentRevisionsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.apigeeregistry.v1.Registry/ListApiDeploymentRevisions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListApiDeploymentRevisionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListApiDeploymentRevisionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + rollbackApiDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/RollbackApiDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(RollbackApiDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteApiDeploymentRevisionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.apigeeregistry.v1.Registry/DeleteApiDeploymentRevision") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteApiDeploymentRevisionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listArtifactsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListArtifacts") + .setRequestMarshaller( + ProtoUtils.marshaller(ListArtifactsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListArtifactsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getArtifactMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetArtifact") + .setRequestMarshaller(ProtoUtils.marshaller(GetArtifactRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Artifact.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getArtifactContentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetArtifactContents") + .setRequestMarshaller( + ProtoUtils.marshaller(GetArtifactContentsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(HttpBody.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createArtifactMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateArtifact") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateArtifactRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Artifact.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + replaceArtifactMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ReplaceArtifact") + .setRequestMarshaller( + ProtoUtils.marshaller(ReplaceArtifactRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Artifact.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteArtifactMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteArtifact") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteArtifactRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .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())) + .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())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable listApisCallable; + private final UnaryCallable listApisPagedCallable; + private final UnaryCallable getApiCallable; + private final UnaryCallable createApiCallable; + private final UnaryCallable updateApiCallable; + private final UnaryCallable deleteApiCallable; + private final UnaryCallable + listApiVersionsCallable; + private final UnaryCallable + listApiVersionsPagedCallable; + private final UnaryCallable getApiVersionCallable; + private final UnaryCallable createApiVersionCallable; + private final UnaryCallable updateApiVersionCallable; + private final UnaryCallable deleteApiVersionCallable; + private final UnaryCallable listApiSpecsCallable; + private final UnaryCallable + listApiSpecsPagedCallable; + private final UnaryCallable getApiSpecCallable; + private final UnaryCallable getApiSpecContentsCallable; + private final UnaryCallable createApiSpecCallable; + private final UnaryCallable updateApiSpecCallable; + private final UnaryCallable deleteApiSpecCallable; + private final UnaryCallable tagApiSpecRevisionCallable; + private final UnaryCallable + listApiSpecRevisionsCallable; + private final UnaryCallable + listApiSpecRevisionsPagedCallable; + private final UnaryCallable rollbackApiSpecCallable; + private final UnaryCallable deleteApiSpecRevisionCallable; + private final UnaryCallable + listApiDeploymentsCallable; + private final UnaryCallable + listApiDeploymentsPagedCallable; + private final UnaryCallable getApiDeploymentCallable; + private final UnaryCallable + createApiDeploymentCallable; + private final UnaryCallable + updateApiDeploymentCallable; + private final UnaryCallable deleteApiDeploymentCallable; + private final UnaryCallable + tagApiDeploymentRevisionCallable; + private final UnaryCallable + listApiDeploymentRevisionsCallable; + private final UnaryCallable< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsPagedResponse> + listApiDeploymentRevisionsPagedCallable; + private final UnaryCallable + rollbackApiDeploymentCallable; + private final UnaryCallable + deleteApiDeploymentRevisionCallable; + private final UnaryCallable listArtifactsCallable; + private final UnaryCallable + listArtifactsPagedCallable; + private final UnaryCallable getArtifactCallable; + private final UnaryCallable getArtifactContentsCallable; + private final UnaryCallable createArtifactCallable; + private final UnaryCallable replaceArtifactCallable; + private final UnaryCallable deleteArtifactCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcRegistryStub create(RegistryStubSettings settings) throws IOException { + return new GrpcRegistryStub(settings, ClientContext.create(settings)); + } + + public static final GrpcRegistryStub create(ClientContext clientContext) throws IOException { + return new GrpcRegistryStub(RegistryStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcRegistryStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcRegistryStub( + RegistryStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcRegistryStub, 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 GrpcRegistryStub(RegistryStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcRegistryCallableFactory()); + } + + /** + * Constructs an instance of GrpcRegistryStub, 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 GrpcRegistryStub( + RegistryStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listApisTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listApisMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getApiTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getApiMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createApiTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createApiMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateApiTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateApiMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("api.name", String.valueOf(request.getApi().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteApiTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteApiMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listApiVersionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listApiVersionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getApiVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getApiVersionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createApiVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createApiVersionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateApiVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateApiVersionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("api_version.name", String.valueOf(request.getApiVersion().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteApiVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteApiVersionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listApiSpecsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listApiSpecsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getApiSpecTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getApiSpecMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getApiSpecContentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getApiSpecContentsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createApiSpecTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createApiSpecMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateApiSpecTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateApiSpecMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("api_spec.name", String.valueOf(request.getApiSpec().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteApiSpecTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteApiSpecMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings tagApiSpecRevisionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(tagApiSpecRevisionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listApiSpecRevisionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listApiSpecRevisionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings rollbackApiSpecTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rollbackApiSpecMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteApiSpecRevisionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteApiSpecRevisionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listApiDeploymentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listApiDeploymentsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getApiDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getApiDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + createApiDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createApiDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateApiDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateApiDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "api_deployment.name", + String.valueOf(request.getApiDeployment().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteApiDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteApiDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + tagApiDeploymentRevisionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(tagApiDeploymentRevisionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listApiDeploymentRevisionsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listApiDeploymentRevisionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + rollbackApiDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rollbackApiDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + deleteApiDeploymentRevisionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteApiDeploymentRevisionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listArtifactsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listArtifactsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getArtifactTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getArtifactMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getArtifactContentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getArtifactContentsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createArtifactTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createArtifactMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings replaceArtifactTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(replaceArtifactMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("artifact.name", String.valueOf(request.getArtifact().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteArtifactTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteArtifactMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + + this.listApisCallable = + callableFactory.createUnaryCallable( + listApisTransportSettings, settings.listApisSettings(), clientContext); + this.listApisPagedCallable = + callableFactory.createPagedCallable( + listApisTransportSettings, settings.listApisSettings(), clientContext); + this.getApiCallable = + callableFactory.createUnaryCallable( + getApiTransportSettings, settings.getApiSettings(), clientContext); + this.createApiCallable = + callableFactory.createUnaryCallable( + createApiTransportSettings, settings.createApiSettings(), clientContext); + this.updateApiCallable = + callableFactory.createUnaryCallable( + updateApiTransportSettings, settings.updateApiSettings(), clientContext); + this.deleteApiCallable = + callableFactory.createUnaryCallable( + deleteApiTransportSettings, settings.deleteApiSettings(), clientContext); + this.listApiVersionsCallable = + callableFactory.createUnaryCallable( + listApiVersionsTransportSettings, settings.listApiVersionsSettings(), clientContext); + this.listApiVersionsPagedCallable = + callableFactory.createPagedCallable( + listApiVersionsTransportSettings, settings.listApiVersionsSettings(), clientContext); + this.getApiVersionCallable = + callableFactory.createUnaryCallable( + getApiVersionTransportSettings, settings.getApiVersionSettings(), clientContext); + this.createApiVersionCallable = + callableFactory.createUnaryCallable( + createApiVersionTransportSettings, settings.createApiVersionSettings(), clientContext); + this.updateApiVersionCallable = + callableFactory.createUnaryCallable( + updateApiVersionTransportSettings, settings.updateApiVersionSettings(), clientContext); + this.deleteApiVersionCallable = + callableFactory.createUnaryCallable( + deleteApiVersionTransportSettings, settings.deleteApiVersionSettings(), clientContext); + this.listApiSpecsCallable = + callableFactory.createUnaryCallable( + listApiSpecsTransportSettings, settings.listApiSpecsSettings(), clientContext); + this.listApiSpecsPagedCallable = + callableFactory.createPagedCallable( + listApiSpecsTransportSettings, settings.listApiSpecsSettings(), clientContext); + this.getApiSpecCallable = + callableFactory.createUnaryCallable( + getApiSpecTransportSettings, settings.getApiSpecSettings(), clientContext); + this.getApiSpecContentsCallable = + callableFactory.createUnaryCallable( + getApiSpecContentsTransportSettings, + settings.getApiSpecContentsSettings(), + clientContext); + this.createApiSpecCallable = + callableFactory.createUnaryCallable( + createApiSpecTransportSettings, settings.createApiSpecSettings(), clientContext); + this.updateApiSpecCallable = + callableFactory.createUnaryCallable( + updateApiSpecTransportSettings, settings.updateApiSpecSettings(), clientContext); + this.deleteApiSpecCallable = + callableFactory.createUnaryCallable( + deleteApiSpecTransportSettings, settings.deleteApiSpecSettings(), clientContext); + this.tagApiSpecRevisionCallable = + callableFactory.createUnaryCallable( + tagApiSpecRevisionTransportSettings, + settings.tagApiSpecRevisionSettings(), + clientContext); + this.listApiSpecRevisionsCallable = + callableFactory.createUnaryCallable( + listApiSpecRevisionsTransportSettings, + settings.listApiSpecRevisionsSettings(), + clientContext); + this.listApiSpecRevisionsPagedCallable = + callableFactory.createPagedCallable( + listApiSpecRevisionsTransportSettings, + settings.listApiSpecRevisionsSettings(), + clientContext); + this.rollbackApiSpecCallable = + callableFactory.createUnaryCallable( + rollbackApiSpecTransportSettings, settings.rollbackApiSpecSettings(), clientContext); + this.deleteApiSpecRevisionCallable = + callableFactory.createUnaryCallable( + deleteApiSpecRevisionTransportSettings, + settings.deleteApiSpecRevisionSettings(), + clientContext); + this.listApiDeploymentsCallable = + callableFactory.createUnaryCallable( + listApiDeploymentsTransportSettings, + settings.listApiDeploymentsSettings(), + clientContext); + this.listApiDeploymentsPagedCallable = + callableFactory.createPagedCallable( + listApiDeploymentsTransportSettings, + settings.listApiDeploymentsSettings(), + clientContext); + this.getApiDeploymentCallable = + callableFactory.createUnaryCallable( + getApiDeploymentTransportSettings, settings.getApiDeploymentSettings(), clientContext); + this.createApiDeploymentCallable = + callableFactory.createUnaryCallable( + createApiDeploymentTransportSettings, + settings.createApiDeploymentSettings(), + clientContext); + this.updateApiDeploymentCallable = + callableFactory.createUnaryCallable( + updateApiDeploymentTransportSettings, + settings.updateApiDeploymentSettings(), + clientContext); + this.deleteApiDeploymentCallable = + callableFactory.createUnaryCallable( + deleteApiDeploymentTransportSettings, + settings.deleteApiDeploymentSettings(), + clientContext); + this.tagApiDeploymentRevisionCallable = + callableFactory.createUnaryCallable( + tagApiDeploymentRevisionTransportSettings, + settings.tagApiDeploymentRevisionSettings(), + clientContext); + this.listApiDeploymentRevisionsCallable = + callableFactory.createUnaryCallable( + listApiDeploymentRevisionsTransportSettings, + settings.listApiDeploymentRevisionsSettings(), + clientContext); + this.listApiDeploymentRevisionsPagedCallable = + callableFactory.createPagedCallable( + listApiDeploymentRevisionsTransportSettings, + settings.listApiDeploymentRevisionsSettings(), + clientContext); + this.rollbackApiDeploymentCallable = + callableFactory.createUnaryCallable( + rollbackApiDeploymentTransportSettings, + settings.rollbackApiDeploymentSettings(), + clientContext); + this.deleteApiDeploymentRevisionCallable = + callableFactory.createUnaryCallable( + deleteApiDeploymentRevisionTransportSettings, + settings.deleteApiDeploymentRevisionSettings(), + clientContext); + this.listArtifactsCallable = + callableFactory.createUnaryCallable( + listArtifactsTransportSettings, settings.listArtifactsSettings(), clientContext); + this.listArtifactsPagedCallable = + callableFactory.createPagedCallable( + listArtifactsTransportSettings, settings.listArtifactsSettings(), clientContext); + this.getArtifactCallable = + callableFactory.createUnaryCallable( + getArtifactTransportSettings, settings.getArtifactSettings(), clientContext); + this.getArtifactContentsCallable = + callableFactory.createUnaryCallable( + getArtifactContentsTransportSettings, + settings.getArtifactContentsSettings(), + clientContext); + this.createArtifactCallable = + callableFactory.createUnaryCallable( + createArtifactTransportSettings, settings.createArtifactSettings(), clientContext); + this.replaceArtifactCallable = + callableFactory.createUnaryCallable( + replaceArtifactTransportSettings, settings.replaceArtifactSettings(), clientContext); + this.deleteArtifactCallable = + callableFactory.createUnaryCallable( + deleteArtifactTransportSettings, settings.deleteArtifactSettings(), clientContext); + 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.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listApisCallable() { + return listApisCallable; + } + + @Override + public UnaryCallable listApisPagedCallable() { + return listApisPagedCallable; + } + + @Override + public UnaryCallable getApiCallable() { + return getApiCallable; + } + + @Override + public UnaryCallable createApiCallable() { + return createApiCallable; + } + + @Override + public UnaryCallable updateApiCallable() { + return updateApiCallable; + } + + @Override + public UnaryCallable deleteApiCallable() { + return deleteApiCallable; + } + + @Override + public UnaryCallable listApiVersionsCallable() { + return listApiVersionsCallable; + } + + @Override + public UnaryCallable + listApiVersionsPagedCallable() { + return listApiVersionsPagedCallable; + } + + @Override + public UnaryCallable getApiVersionCallable() { + return getApiVersionCallable; + } + + @Override + public UnaryCallable createApiVersionCallable() { + return createApiVersionCallable; + } + + @Override + public UnaryCallable updateApiVersionCallable() { + return updateApiVersionCallable; + } + + @Override + public UnaryCallable deleteApiVersionCallable() { + return deleteApiVersionCallable; + } + + @Override + public UnaryCallable listApiSpecsCallable() { + return listApiSpecsCallable; + } + + @Override + public UnaryCallable listApiSpecsPagedCallable() { + return listApiSpecsPagedCallable; + } + + @Override + public UnaryCallable getApiSpecCallable() { + return getApiSpecCallable; + } + + @Override + public UnaryCallable getApiSpecContentsCallable() { + return getApiSpecContentsCallable; + } + + @Override + public UnaryCallable createApiSpecCallable() { + return createApiSpecCallable; + } + + @Override + public UnaryCallable updateApiSpecCallable() { + return updateApiSpecCallable; + } + + @Override + public UnaryCallable deleteApiSpecCallable() { + return deleteApiSpecCallable; + } + + @Override + public UnaryCallable tagApiSpecRevisionCallable() { + return tagApiSpecRevisionCallable; + } + + @Override + public UnaryCallable + listApiSpecRevisionsCallable() { + return listApiSpecRevisionsCallable; + } + + @Override + public UnaryCallable + listApiSpecRevisionsPagedCallable() { + return listApiSpecRevisionsPagedCallable; + } + + @Override + public UnaryCallable rollbackApiSpecCallable() { + return rollbackApiSpecCallable; + } + + @Override + public UnaryCallable deleteApiSpecRevisionCallable() { + return deleteApiSpecRevisionCallable; + } + + @Override + public UnaryCallable + listApiDeploymentsCallable() { + return listApiDeploymentsCallable; + } + + @Override + public UnaryCallable + listApiDeploymentsPagedCallable() { + return listApiDeploymentsPagedCallable; + } + + @Override + public UnaryCallable getApiDeploymentCallable() { + return getApiDeploymentCallable; + } + + @Override + public UnaryCallable createApiDeploymentCallable() { + return createApiDeploymentCallable; + } + + @Override + public UnaryCallable updateApiDeploymentCallable() { + return updateApiDeploymentCallable; + } + + @Override + public UnaryCallable deleteApiDeploymentCallable() { + return deleteApiDeploymentCallable; + } + + @Override + public UnaryCallable + tagApiDeploymentRevisionCallable() { + return tagApiDeploymentRevisionCallable; + } + + @Override + public UnaryCallable + listApiDeploymentRevisionsCallable() { + return listApiDeploymentRevisionsCallable; + } + + @Override + public UnaryCallable + listApiDeploymentRevisionsPagedCallable() { + return listApiDeploymentRevisionsPagedCallable; + } + + @Override + public UnaryCallable + rollbackApiDeploymentCallable() { + return rollbackApiDeploymentCallable; + } + + @Override + public UnaryCallable + deleteApiDeploymentRevisionCallable() { + return deleteApiDeploymentRevisionCallable; + } + + @Override + public UnaryCallable listArtifactsCallable() { + return listArtifactsCallable; + } + + @Override + public UnaryCallable + listArtifactsPagedCallable() { + return listArtifactsPagedCallable; + } + + @Override + public UnaryCallable getArtifactCallable() { + return getArtifactCallable; + } + + @Override + public UnaryCallable getArtifactContentsCallable() { + return getArtifactContentsCallable; + } + + @Override + public UnaryCallable createArtifactCallable() { + return createArtifactCallable; + } + + @Override + public UnaryCallable replaceArtifactCallable() { + return replaceArtifactCallable; + } + + @Override + public UnaryCallable deleteArtifactCallable() { + return deleteArtifactCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningCallableFactory.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningCallableFactory.java new file mode 100644 index 000000000000..26803e1608ec --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub; + +import com.google.api.core.BetaApi; +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Provisioning service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonProvisioningCallableFactory + 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); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningStub.java new file mode 100644 index 000000000000..80808275bc07 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningStub.java @@ -0,0 +1,650 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub; + +import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +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.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apigeeregistry.v1.CreateInstanceRequest; +import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; +import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.OperationMetadata; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Provisioning service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonProvisioningStub extends ProvisioningStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(Instance.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/CreateInstance") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/instances", + 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, "instanceId", request.getInstanceId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("instance", request.getInstance())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/DeleteInstance") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/instances/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/GetInstance") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/instances/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Instance.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .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; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + 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; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/apis/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/artifacts/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/runtime}:setIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/apis/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/artifacts/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/runtime}:getIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/apis/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/artifacts/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/runtime}:testIamPermissions") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createInstanceCallable; + private final OperationCallable + createInstanceOperationCallable; + private final UnaryCallable deleteInstanceCallable; + private final OperationCallable + deleteInstanceOperationCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonProvisioningStub create(ProvisioningStubSettings settings) + throws IOException { + return new HttpJsonProvisioningStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonProvisioningStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonProvisioningStub( + ProvisioningStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonProvisioningStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonProvisioningStub( + ProvisioningStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonProvisioningStub, 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 HttpJsonProvisioningStub(ProvisioningStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonProvisioningCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonProvisioningStub, 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 HttpJsonProvisioningStub( + ProvisioningStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings createInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createInstanceCallable = + callableFactory.createUnaryCallable( + createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); + this.createInstanceOperationCallable = + callableFactory.createOperationCallable( + createInstanceTransportSettings, + settings.createInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteInstanceCallable = + callableFactory.createUnaryCallable( + deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); + this.deleteInstanceOperationCallable = + callableFactory.createOperationCallable( + deleteInstanceTransportSettings, + settings.deleteInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + 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.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createInstanceMethodDescriptor); + methodDescriptors.add(deleteInstanceMethodDescriptor); + methodDescriptors.add(getInstanceMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createInstanceCallable() { + return createInstanceCallable; + } + + @Override + public OperationCallable + createInstanceOperationCallable() { + return createInstanceOperationCallable; + } + + @Override + public UnaryCallable deleteInstanceCallable() { + return deleteInstanceCallable; + } + + @Override + public OperationCallable + deleteInstanceOperationCallable() { + return deleteInstanceOperationCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryCallableFactory.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryCallableFactory.java new file mode 100644 index 000000000000..40fc50fcf989 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub; + +import com.google.api.core.BetaApi; +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Registry service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonRegistryCallableFactory + 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); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryStub.java new file mode 100644 index 000000000000..3c94c2264980 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryStub.java @@ -0,0 +1,2428 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub; + +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; + +import com.google.api.HttpBody; +import com.google.api.core.BetaApi; +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.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.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; +import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.GetApiRequest; +import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; +import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; +import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApisRequest; +import com.google.cloud.apigeeregistry.v1.ListApisResponse; +import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; +import com.google.cloud.apigeeregistry.v1.ListArtifactsResponse; +import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; +import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; +import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Registry service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonRegistryStub extends RegistryStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + listApisMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApis") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/apis", + 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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListApisResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getApiMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApi") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Api.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor createApiMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApi") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/apis", + 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, "apiId", request.getApiId()); + return fields; + }) + .setRequestBodyExtractor( + request -> ProtoRestSerializer.create().toBody("api", request.getApi())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Api.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateApiMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApi") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{api.name=projects/*/locations/*/apis/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "api.name", request.getApi().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> ProtoRestSerializer.create().toBody("api", request.getApi())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Api.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor deleteApiMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApi") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*}", + 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, "force", request.getForce()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listApiVersionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiVersions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/apis/*}/versions", + 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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListApiVersionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getApiVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiVersion") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/versions/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiVersion.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createApiVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiVersion") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/apis/*}/versions", + 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, "apiVersionId", request.getApiVersionId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("apiVersion", request.getApiVersion())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiVersion.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateApiVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiVersion") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{apiVersion.name=projects/*/locations/*/apis/*/versions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "apiVersion.name", request.getApiVersion().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("apiVersion", request.getApiVersion())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiVersion.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteApiVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiVersion") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/versions/*}", + 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, "force", request.getForce()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listApiSpecsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiSpecs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs", + 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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListApiSpecsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getApiSpecMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiSpec") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiSpec.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getApiSpecContentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiSpecContents") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:getContents", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(HttpBody.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createApiSpecMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiSpec") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs", + 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, "apiSpecId", request.getApiSpecId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("apiSpec", request.getApiSpec())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiSpec.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateApiSpecMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiSpec") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{apiSpec.name=projects/*/locations/*/apis/*/versions/*/specs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "apiSpec.name", request.getApiSpec().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("apiSpec", request.getApiSpec())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiSpec.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteApiSpecMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiSpec") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}", + 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, "force", request.getForce()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + tagApiSpecRevisionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/TagApiSpecRevision") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiSpec.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse> + listApiSpecRevisionsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiSpecRevisions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:listRevisions", + 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, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListApiSpecRevisionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + rollbackApiSpecMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/RollbackApiSpec") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:rollback", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiSpec.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteApiSpecRevisionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiSpecRevision") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiSpec.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listApiDeploymentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiDeployments") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/apis/*}/deployments", + 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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListApiDeploymentsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getApiDeploymentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiDeployment") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/deployments/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiDeployment.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createApiDeploymentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiDeployment") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/apis/*}/deployments", + 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, "apiDeploymentId", request.getApiDeploymentId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("apiDeployment", request.getApiDeployment())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiDeployment.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateApiDeploymentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiDeployment") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{apiDeployment.name=projects/*/locations/*/apis/*/deployments/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "apiDeployment.name", request.getApiDeployment().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("apiDeployment", request.getApiDeployment())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiDeployment.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteApiDeploymentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiDeployment") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/deployments/*}", + 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, "force", request.getForce()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + tagApiDeploymentRevisionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/TagApiDeploymentRevision") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:tagRevision", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiDeployment.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse> + listApiDeploymentRevisionsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.apigeeregistry.v1.Registry/ListApiDeploymentRevisions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:listRevisions", + 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, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListApiDeploymentRevisionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + rollbackApiDeploymentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/RollbackApiDeployment") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:rollback", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiDeployment.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteApiDeploymentRevisionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.apigeeregistry.v1.Registry/DeleteApiDeploymentRevision") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiDeployment.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listArtifactsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListArtifacts") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/artifacts", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1/{parent=projects/*/locations/*/apis/*}/artifacts", + "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts", + "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts", + "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListArtifactsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getArtifactMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetArtifact") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/artifacts/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}", + "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}", + "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}", + "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Artifact.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getArtifactContentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetArtifactContents") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/artifacts/*}:getContents", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}:getContents", + "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getContents", + "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getContents", + "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:getContents") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(HttpBody.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createArtifactMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateArtifact") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/artifacts", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1/{parent=projects/*/locations/*/apis/*}/artifacts", + "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts", + "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts", + "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "artifactId", request.getArtifactId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("artifact", request.getArtifact())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Artifact.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + replaceArtifactMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ReplaceArtifact") + .setHttpMethod("PUT") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{artifact.name=projects/*/locations/*/artifacts/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "artifact.name", request.getArtifact().getName()); + return fields; + }) + .setAdditionalPaths( + "/v1/{artifact.name=projects/*/locations/*/apis/*/artifacts/*}", + "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/artifacts/*}", + "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}", + "/v1/{artifact.name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("artifact", request.getArtifact())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Artifact.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteArtifactMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteArtifact") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/artifacts/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}", + "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}", + "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}", + "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .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; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + 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; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/apis/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/artifacts/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/runtime}:setIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/apis/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/artifacts/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/runtime}:getIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/apis/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/artifacts/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/runtime}:testIamPermissions") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listApisCallable; + private final UnaryCallable listApisPagedCallable; + private final UnaryCallable getApiCallable; + private final UnaryCallable createApiCallable; + private final UnaryCallable updateApiCallable; + private final UnaryCallable deleteApiCallable; + private final UnaryCallable + listApiVersionsCallable; + private final UnaryCallable + listApiVersionsPagedCallable; + private final UnaryCallable getApiVersionCallable; + private final UnaryCallable createApiVersionCallable; + private final UnaryCallable updateApiVersionCallable; + private final UnaryCallable deleteApiVersionCallable; + private final UnaryCallable listApiSpecsCallable; + private final UnaryCallable + listApiSpecsPagedCallable; + private final UnaryCallable getApiSpecCallable; + private final UnaryCallable getApiSpecContentsCallable; + private final UnaryCallable createApiSpecCallable; + private final UnaryCallable updateApiSpecCallable; + private final UnaryCallable deleteApiSpecCallable; + private final UnaryCallable tagApiSpecRevisionCallable; + private final UnaryCallable + listApiSpecRevisionsCallable; + private final UnaryCallable + listApiSpecRevisionsPagedCallable; + private final UnaryCallable rollbackApiSpecCallable; + private final UnaryCallable deleteApiSpecRevisionCallable; + private final UnaryCallable + listApiDeploymentsCallable; + private final UnaryCallable + listApiDeploymentsPagedCallable; + private final UnaryCallable getApiDeploymentCallable; + private final UnaryCallable + createApiDeploymentCallable; + private final UnaryCallable + updateApiDeploymentCallable; + private final UnaryCallable deleteApiDeploymentCallable; + private final UnaryCallable + tagApiDeploymentRevisionCallable; + private final UnaryCallable + listApiDeploymentRevisionsCallable; + private final UnaryCallable< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsPagedResponse> + listApiDeploymentRevisionsPagedCallable; + private final UnaryCallable + rollbackApiDeploymentCallable; + private final UnaryCallable + deleteApiDeploymentRevisionCallable; + private final UnaryCallable listArtifactsCallable; + private final UnaryCallable + listArtifactsPagedCallable; + private final UnaryCallable getArtifactCallable; + private final UnaryCallable getArtifactContentsCallable; + private final UnaryCallable createArtifactCallable; + private final UnaryCallable replaceArtifactCallable; + private final UnaryCallable deleteArtifactCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonRegistryStub create(RegistryStubSettings settings) + throws IOException { + return new HttpJsonRegistryStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonRegistryStub create(ClientContext clientContext) throws IOException { + return new HttpJsonRegistryStub( + RegistryStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonRegistryStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonRegistryStub( + RegistryStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonRegistryStub, 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 HttpJsonRegistryStub(RegistryStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonRegistryCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonRegistryStub, 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 HttpJsonRegistryStub( + RegistryStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings listApisTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listApisMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getApiTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getApiMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createApiTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createApiMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateApiTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateApiMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteApiTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteApiMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listApiVersionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listApiVersionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getApiVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getApiVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createApiVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createApiVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateApiVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateApiVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteApiVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteApiVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listApiSpecsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listApiSpecsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getApiSpecTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getApiSpecMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getApiSpecContentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getApiSpecContentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createApiSpecTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createApiSpecMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateApiSpecTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateApiSpecMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteApiSpecTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteApiSpecMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings tagApiSpecRevisionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(tagApiSpecRevisionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listApiSpecRevisionsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listApiSpecRevisionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings rollbackApiSpecTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(rollbackApiSpecMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + deleteApiSpecRevisionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteApiSpecRevisionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listApiDeploymentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listApiDeploymentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getApiDeploymentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getApiDeploymentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createApiDeploymentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createApiDeploymentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateApiDeploymentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateApiDeploymentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteApiDeploymentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteApiDeploymentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + tagApiDeploymentRevisionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(tagApiDeploymentRevisionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listApiDeploymentRevisionsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listApiDeploymentRevisionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + rollbackApiDeploymentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(rollbackApiDeploymentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + deleteApiDeploymentRevisionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteApiDeploymentRevisionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listArtifactsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listArtifactsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getArtifactTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getArtifactMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getArtifactContentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getArtifactContentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createArtifactTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createArtifactMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings replaceArtifactTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(replaceArtifactMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteArtifactTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteArtifactMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.listApisCallable = + callableFactory.createUnaryCallable( + listApisTransportSettings, settings.listApisSettings(), clientContext); + this.listApisPagedCallable = + callableFactory.createPagedCallable( + listApisTransportSettings, settings.listApisSettings(), clientContext); + this.getApiCallable = + callableFactory.createUnaryCallable( + getApiTransportSettings, settings.getApiSettings(), clientContext); + this.createApiCallable = + callableFactory.createUnaryCallable( + createApiTransportSettings, settings.createApiSettings(), clientContext); + this.updateApiCallable = + callableFactory.createUnaryCallable( + updateApiTransportSettings, settings.updateApiSettings(), clientContext); + this.deleteApiCallable = + callableFactory.createUnaryCallable( + deleteApiTransportSettings, settings.deleteApiSettings(), clientContext); + this.listApiVersionsCallable = + callableFactory.createUnaryCallable( + listApiVersionsTransportSettings, settings.listApiVersionsSettings(), clientContext); + this.listApiVersionsPagedCallable = + callableFactory.createPagedCallable( + listApiVersionsTransportSettings, settings.listApiVersionsSettings(), clientContext); + this.getApiVersionCallable = + callableFactory.createUnaryCallable( + getApiVersionTransportSettings, settings.getApiVersionSettings(), clientContext); + this.createApiVersionCallable = + callableFactory.createUnaryCallable( + createApiVersionTransportSettings, settings.createApiVersionSettings(), clientContext); + this.updateApiVersionCallable = + callableFactory.createUnaryCallable( + updateApiVersionTransportSettings, settings.updateApiVersionSettings(), clientContext); + this.deleteApiVersionCallable = + callableFactory.createUnaryCallable( + deleteApiVersionTransportSettings, settings.deleteApiVersionSettings(), clientContext); + this.listApiSpecsCallable = + callableFactory.createUnaryCallable( + listApiSpecsTransportSettings, settings.listApiSpecsSettings(), clientContext); + this.listApiSpecsPagedCallable = + callableFactory.createPagedCallable( + listApiSpecsTransportSettings, settings.listApiSpecsSettings(), clientContext); + this.getApiSpecCallable = + callableFactory.createUnaryCallable( + getApiSpecTransportSettings, settings.getApiSpecSettings(), clientContext); + this.getApiSpecContentsCallable = + callableFactory.createUnaryCallable( + getApiSpecContentsTransportSettings, + settings.getApiSpecContentsSettings(), + clientContext); + this.createApiSpecCallable = + callableFactory.createUnaryCallable( + createApiSpecTransportSettings, settings.createApiSpecSettings(), clientContext); + this.updateApiSpecCallable = + callableFactory.createUnaryCallable( + updateApiSpecTransportSettings, settings.updateApiSpecSettings(), clientContext); + this.deleteApiSpecCallable = + callableFactory.createUnaryCallable( + deleteApiSpecTransportSettings, settings.deleteApiSpecSettings(), clientContext); + this.tagApiSpecRevisionCallable = + callableFactory.createUnaryCallable( + tagApiSpecRevisionTransportSettings, + settings.tagApiSpecRevisionSettings(), + clientContext); + this.listApiSpecRevisionsCallable = + callableFactory.createUnaryCallable( + listApiSpecRevisionsTransportSettings, + settings.listApiSpecRevisionsSettings(), + clientContext); + this.listApiSpecRevisionsPagedCallable = + callableFactory.createPagedCallable( + listApiSpecRevisionsTransportSettings, + settings.listApiSpecRevisionsSettings(), + clientContext); + this.rollbackApiSpecCallable = + callableFactory.createUnaryCallable( + rollbackApiSpecTransportSettings, settings.rollbackApiSpecSettings(), clientContext); + this.deleteApiSpecRevisionCallable = + callableFactory.createUnaryCallable( + deleteApiSpecRevisionTransportSettings, + settings.deleteApiSpecRevisionSettings(), + clientContext); + this.listApiDeploymentsCallable = + callableFactory.createUnaryCallable( + listApiDeploymentsTransportSettings, + settings.listApiDeploymentsSettings(), + clientContext); + this.listApiDeploymentsPagedCallable = + callableFactory.createPagedCallable( + listApiDeploymentsTransportSettings, + settings.listApiDeploymentsSettings(), + clientContext); + this.getApiDeploymentCallable = + callableFactory.createUnaryCallable( + getApiDeploymentTransportSettings, settings.getApiDeploymentSettings(), clientContext); + this.createApiDeploymentCallable = + callableFactory.createUnaryCallable( + createApiDeploymentTransportSettings, + settings.createApiDeploymentSettings(), + clientContext); + this.updateApiDeploymentCallable = + callableFactory.createUnaryCallable( + updateApiDeploymentTransportSettings, + settings.updateApiDeploymentSettings(), + clientContext); + this.deleteApiDeploymentCallable = + callableFactory.createUnaryCallable( + deleteApiDeploymentTransportSettings, + settings.deleteApiDeploymentSettings(), + clientContext); + this.tagApiDeploymentRevisionCallable = + callableFactory.createUnaryCallable( + tagApiDeploymentRevisionTransportSettings, + settings.tagApiDeploymentRevisionSettings(), + clientContext); + this.listApiDeploymentRevisionsCallable = + callableFactory.createUnaryCallable( + listApiDeploymentRevisionsTransportSettings, + settings.listApiDeploymentRevisionsSettings(), + clientContext); + this.listApiDeploymentRevisionsPagedCallable = + callableFactory.createPagedCallable( + listApiDeploymentRevisionsTransportSettings, + settings.listApiDeploymentRevisionsSettings(), + clientContext); + this.rollbackApiDeploymentCallable = + callableFactory.createUnaryCallable( + rollbackApiDeploymentTransportSettings, + settings.rollbackApiDeploymentSettings(), + clientContext); + this.deleteApiDeploymentRevisionCallable = + callableFactory.createUnaryCallable( + deleteApiDeploymentRevisionTransportSettings, + settings.deleteApiDeploymentRevisionSettings(), + clientContext); + this.listArtifactsCallable = + callableFactory.createUnaryCallable( + listArtifactsTransportSettings, settings.listArtifactsSettings(), clientContext); + this.listArtifactsPagedCallable = + callableFactory.createPagedCallable( + listArtifactsTransportSettings, settings.listArtifactsSettings(), clientContext); + this.getArtifactCallable = + callableFactory.createUnaryCallable( + getArtifactTransportSettings, settings.getArtifactSettings(), clientContext); + this.getArtifactContentsCallable = + callableFactory.createUnaryCallable( + getArtifactContentsTransportSettings, + settings.getArtifactContentsSettings(), + clientContext); + this.createArtifactCallable = + callableFactory.createUnaryCallable( + createArtifactTransportSettings, settings.createArtifactSettings(), clientContext); + this.replaceArtifactCallable = + callableFactory.createUnaryCallable( + replaceArtifactTransportSettings, settings.replaceArtifactSettings(), clientContext); + this.deleteArtifactCallable = + callableFactory.createUnaryCallable( + deleteArtifactTransportSettings, settings.deleteArtifactSettings(), clientContext); + 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.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listApisMethodDescriptor); + methodDescriptors.add(getApiMethodDescriptor); + methodDescriptors.add(createApiMethodDescriptor); + methodDescriptors.add(updateApiMethodDescriptor); + methodDescriptors.add(deleteApiMethodDescriptor); + methodDescriptors.add(listApiVersionsMethodDescriptor); + methodDescriptors.add(getApiVersionMethodDescriptor); + methodDescriptors.add(createApiVersionMethodDescriptor); + methodDescriptors.add(updateApiVersionMethodDescriptor); + methodDescriptors.add(deleteApiVersionMethodDescriptor); + methodDescriptors.add(listApiSpecsMethodDescriptor); + methodDescriptors.add(getApiSpecMethodDescriptor); + methodDescriptors.add(getApiSpecContentsMethodDescriptor); + methodDescriptors.add(createApiSpecMethodDescriptor); + methodDescriptors.add(updateApiSpecMethodDescriptor); + methodDescriptors.add(deleteApiSpecMethodDescriptor); + methodDescriptors.add(tagApiSpecRevisionMethodDescriptor); + methodDescriptors.add(listApiSpecRevisionsMethodDescriptor); + methodDescriptors.add(rollbackApiSpecMethodDescriptor); + methodDescriptors.add(deleteApiSpecRevisionMethodDescriptor); + methodDescriptors.add(listApiDeploymentsMethodDescriptor); + methodDescriptors.add(getApiDeploymentMethodDescriptor); + methodDescriptors.add(createApiDeploymentMethodDescriptor); + methodDescriptors.add(updateApiDeploymentMethodDescriptor); + methodDescriptors.add(deleteApiDeploymentMethodDescriptor); + methodDescriptors.add(tagApiDeploymentRevisionMethodDescriptor); + methodDescriptors.add(listApiDeploymentRevisionsMethodDescriptor); + methodDescriptors.add(rollbackApiDeploymentMethodDescriptor); + methodDescriptors.add(deleteApiDeploymentRevisionMethodDescriptor); + methodDescriptors.add(listArtifactsMethodDescriptor); + methodDescriptors.add(getArtifactMethodDescriptor); + methodDescriptors.add(getArtifactContentsMethodDescriptor); + methodDescriptors.add(createArtifactMethodDescriptor); + methodDescriptors.add(replaceArtifactMethodDescriptor); + methodDescriptors.add(deleteArtifactMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable listApisCallable() { + return listApisCallable; + } + + @Override + public UnaryCallable listApisPagedCallable() { + return listApisPagedCallable; + } + + @Override + public UnaryCallable getApiCallable() { + return getApiCallable; + } + + @Override + public UnaryCallable createApiCallable() { + return createApiCallable; + } + + @Override + public UnaryCallable updateApiCallable() { + return updateApiCallable; + } + + @Override + public UnaryCallable deleteApiCallable() { + return deleteApiCallable; + } + + @Override + public UnaryCallable listApiVersionsCallable() { + return listApiVersionsCallable; + } + + @Override + public UnaryCallable + listApiVersionsPagedCallable() { + return listApiVersionsPagedCallable; + } + + @Override + public UnaryCallable getApiVersionCallable() { + return getApiVersionCallable; + } + + @Override + public UnaryCallable createApiVersionCallable() { + return createApiVersionCallable; + } + + @Override + public UnaryCallable updateApiVersionCallable() { + return updateApiVersionCallable; + } + + @Override + public UnaryCallable deleteApiVersionCallable() { + return deleteApiVersionCallable; + } + + @Override + public UnaryCallable listApiSpecsCallable() { + return listApiSpecsCallable; + } + + @Override + public UnaryCallable listApiSpecsPagedCallable() { + return listApiSpecsPagedCallable; + } + + @Override + public UnaryCallable getApiSpecCallable() { + return getApiSpecCallable; + } + + @Override + public UnaryCallable getApiSpecContentsCallable() { + return getApiSpecContentsCallable; + } + + @Override + public UnaryCallable createApiSpecCallable() { + return createApiSpecCallable; + } + + @Override + public UnaryCallable updateApiSpecCallable() { + return updateApiSpecCallable; + } + + @Override + public UnaryCallable deleteApiSpecCallable() { + return deleteApiSpecCallable; + } + + @Override + public UnaryCallable tagApiSpecRevisionCallable() { + return tagApiSpecRevisionCallable; + } + + @Override + public UnaryCallable + listApiSpecRevisionsCallable() { + return listApiSpecRevisionsCallable; + } + + @Override + public UnaryCallable + listApiSpecRevisionsPagedCallable() { + return listApiSpecRevisionsPagedCallable; + } + + @Override + public UnaryCallable rollbackApiSpecCallable() { + return rollbackApiSpecCallable; + } + + @Override + public UnaryCallable deleteApiSpecRevisionCallable() { + return deleteApiSpecRevisionCallable; + } + + @Override + public UnaryCallable + listApiDeploymentsCallable() { + return listApiDeploymentsCallable; + } + + @Override + public UnaryCallable + listApiDeploymentsPagedCallable() { + return listApiDeploymentsPagedCallable; + } + + @Override + public UnaryCallable getApiDeploymentCallable() { + return getApiDeploymentCallable; + } + + @Override + public UnaryCallable createApiDeploymentCallable() { + return createApiDeploymentCallable; + } + + @Override + public UnaryCallable updateApiDeploymentCallable() { + return updateApiDeploymentCallable; + } + + @Override + public UnaryCallable deleteApiDeploymentCallable() { + return deleteApiDeploymentCallable; + } + + @Override + public UnaryCallable + tagApiDeploymentRevisionCallable() { + return tagApiDeploymentRevisionCallable; + } + + @Override + public UnaryCallable + listApiDeploymentRevisionsCallable() { + return listApiDeploymentRevisionsCallable; + } + + @Override + public UnaryCallable + listApiDeploymentRevisionsPagedCallable() { + return listApiDeploymentRevisionsPagedCallable; + } + + @Override + public UnaryCallable + rollbackApiDeploymentCallable() { + return rollbackApiDeploymentCallable; + } + + @Override + public UnaryCallable + deleteApiDeploymentRevisionCallable() { + return deleteApiDeploymentRevisionCallable; + } + + @Override + public UnaryCallable listArtifactsCallable() { + return listArtifactsCallable; + } + + @Override + public UnaryCallable + listArtifactsPagedCallable() { + return listArtifactsPagedCallable; + } + + @Override + public UnaryCallable getArtifactCallable() { + return getArtifactCallable; + } + + @Override + public UnaryCallable getArtifactContentsCallable() { + return getArtifactContentsCallable; + } + + @Override + public UnaryCallable createArtifactCallable() { + return createArtifactCallable; + } + + @Override + public UnaryCallable replaceArtifactCallable() { + return replaceArtifactCallable; + } + + @Override + public UnaryCallable deleteArtifactCallable() { + return deleteArtifactCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStub.java new file mode 100644 index 000000000000..83ea3a6c9735 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStub.java @@ -0,0 +1,110 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub; + +import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; + +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.apigeeregistry.v1.CreateInstanceRequest; +import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; +import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.OperationMetadata; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Provisioning service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ProvisioningStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + createInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createInstanceOperationCallable()"); + } + + public UnaryCallable createInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: createInstanceCallable()"); + } + + public OperationCallable + deleteInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceOperationCallable()"); + } + + public UnaryCallable deleteInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()"); + } + + public UnaryCallable getInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); + } + + 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()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStubSettings.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStubSettings.java new file mode 100644 index 000000000000..429412baeef4 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStubSettings.java @@ -0,0 +1,651 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub; + +import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +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.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.apigeeregistry.v1.CreateInstanceRequest; +import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; +import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.OperationMetadata; +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.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProvisioningStub}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ProvisioningStubSettings.Builder provisioningSettingsBuilder =
+ *     ProvisioningStubSettings.newBuilder();
+ * provisioningSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         provisioningSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ProvisioningStubSettings provisioningSettings = provisioningSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ProvisioningStubSettings 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 createInstanceSettings; + private final OperationCallSettings + createInstanceOperationSettings; + private final UnaryCallSettings deleteInstanceSettings; + private final OperationCallSettings + deleteInstanceOperationSettings; + private final UnaryCallSettings getInstanceSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + 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() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + 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 createInstance. */ + public UnaryCallSettings createInstanceSettings() { + return createInstanceSettings; + } + + /** Returns the object with the settings used for calls to createInstance. */ + public OperationCallSettings + createInstanceOperationSettings() { + return createInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return getInstanceSettings; + } + + /** 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; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public ProvisioningStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcProvisioningStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonProvisioningStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "apigeeregistry.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "apigeeregistry.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(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProvisioningStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProvisioningStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProvisioningStubSettings.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(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 ProvisioningStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createInstanceSettings = settingsBuilder.createInstanceSettings().build(); + createInstanceOperationSettings = settingsBuilder.createInstanceOperationSettings().build(); + deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); + deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); + getInstanceSettings = settingsBuilder.getInstanceSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for ProvisioningStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createInstanceSettings; + private final OperationCallSettings.Builder + createInstanceOperationSettings; + private final UnaryCallSettings.Builder + deleteInstanceSettings; + private final OperationCallSettings.Builder + deleteInstanceOperationSettings; + private final UnaryCallSettings.Builder getInstanceSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + 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().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstanceOperationSettings = OperationCallSettings.newBuilder(); + deleteInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); + getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createInstanceSettings, + deleteInstanceSettings, + getInstanceSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(ProvisioningStubSettings settings) { + super(settings); + + createInstanceSettings = settings.createInstanceSettings.toBuilder(); + createInstanceOperationSettings = settings.createInstanceOperationSettings.toBuilder(); + deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); + deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); + getInstanceSettings = settings.getInstanceSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createInstanceSettings, + deleteInstanceSettings, + getInstanceSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + 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.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .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 createInstance. */ + public UnaryCallSettings.Builder createInstanceSettings() { + return createInstanceSettings; + } + + /** Returns the builder for the settings used for calls to createInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createInstanceOperationSettings() { + return createInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getInstanceSettings; + } + + /** 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; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public ProvisioningStubSettings build() throws IOException { + return new ProvisioningStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStub.java new file mode 100644 index 000000000000..3e10ebb03af4 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStub.java @@ -0,0 +1,309 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub; + +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; + +import com.google.api.HttpBody; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; +import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.GetApiRequest; +import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; +import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; +import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApisRequest; +import com.google.cloud.apigeeregistry.v1.ListApisResponse; +import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; +import com.google.cloud.apigeeregistry.v1.ListArtifactsResponse; +import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; +import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; +import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Registry service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class RegistryStub implements BackgroundResource { + + public UnaryCallable listApisPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listApisPagedCallable()"); + } + + public UnaryCallable listApisCallable() { + throw new UnsupportedOperationException("Not implemented: listApisCallable()"); + } + + public UnaryCallable getApiCallable() { + throw new UnsupportedOperationException("Not implemented: getApiCallable()"); + } + + public UnaryCallable createApiCallable() { + throw new UnsupportedOperationException("Not implemented: createApiCallable()"); + } + + public UnaryCallable updateApiCallable() { + throw new UnsupportedOperationException("Not implemented: updateApiCallable()"); + } + + public UnaryCallable deleteApiCallable() { + throw new UnsupportedOperationException("Not implemented: deleteApiCallable()"); + } + + public UnaryCallable + listApiVersionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listApiVersionsPagedCallable()"); + } + + public UnaryCallable listApiVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: listApiVersionsCallable()"); + } + + public UnaryCallable getApiVersionCallable() { + throw new UnsupportedOperationException("Not implemented: getApiVersionCallable()"); + } + + public UnaryCallable createApiVersionCallable() { + throw new UnsupportedOperationException("Not implemented: createApiVersionCallable()"); + } + + public UnaryCallable updateApiVersionCallable() { + throw new UnsupportedOperationException("Not implemented: updateApiVersionCallable()"); + } + + public UnaryCallable deleteApiVersionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteApiVersionCallable()"); + } + + public UnaryCallable listApiSpecsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listApiSpecsPagedCallable()"); + } + + public UnaryCallable listApiSpecsCallable() { + throw new UnsupportedOperationException("Not implemented: listApiSpecsCallable()"); + } + + public UnaryCallable getApiSpecCallable() { + throw new UnsupportedOperationException("Not implemented: getApiSpecCallable()"); + } + + public UnaryCallable getApiSpecContentsCallable() { + throw new UnsupportedOperationException("Not implemented: getApiSpecContentsCallable()"); + } + + public UnaryCallable createApiSpecCallable() { + throw new UnsupportedOperationException("Not implemented: createApiSpecCallable()"); + } + + public UnaryCallable updateApiSpecCallable() { + throw new UnsupportedOperationException("Not implemented: updateApiSpecCallable()"); + } + + public UnaryCallable deleteApiSpecCallable() { + throw new UnsupportedOperationException("Not implemented: deleteApiSpecCallable()"); + } + + public UnaryCallable tagApiSpecRevisionCallable() { + throw new UnsupportedOperationException("Not implemented: tagApiSpecRevisionCallable()"); + } + + public UnaryCallable + listApiSpecRevisionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listApiSpecRevisionsPagedCallable()"); + } + + public UnaryCallable + listApiSpecRevisionsCallable() { + throw new UnsupportedOperationException("Not implemented: listApiSpecRevisionsCallable()"); + } + + public UnaryCallable rollbackApiSpecCallable() { + throw new UnsupportedOperationException("Not implemented: rollbackApiSpecCallable()"); + } + + public UnaryCallable deleteApiSpecRevisionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteApiSpecRevisionCallable()"); + } + + public UnaryCallable + listApiDeploymentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listApiDeploymentsPagedCallable()"); + } + + public UnaryCallable + listApiDeploymentsCallable() { + throw new UnsupportedOperationException("Not implemented: listApiDeploymentsCallable()"); + } + + public UnaryCallable getApiDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: getApiDeploymentCallable()"); + } + + public UnaryCallable createApiDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: createApiDeploymentCallable()"); + } + + public UnaryCallable updateApiDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: updateApiDeploymentCallable()"); + } + + public UnaryCallable deleteApiDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: deleteApiDeploymentCallable()"); + } + + public UnaryCallable + tagApiDeploymentRevisionCallable() { + throw new UnsupportedOperationException("Not implemented: tagApiDeploymentRevisionCallable()"); + } + + public UnaryCallable + listApiDeploymentRevisionsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listApiDeploymentRevisionsPagedCallable()"); + } + + public UnaryCallable + listApiDeploymentRevisionsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listApiDeploymentRevisionsCallable()"); + } + + public UnaryCallable + rollbackApiDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: rollbackApiDeploymentCallable()"); + } + + public UnaryCallable + deleteApiDeploymentRevisionCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteApiDeploymentRevisionCallable()"); + } + + public UnaryCallable + listArtifactsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listArtifactsPagedCallable()"); + } + + public UnaryCallable listArtifactsCallable() { + throw new UnsupportedOperationException("Not implemented: listArtifactsCallable()"); + } + + public UnaryCallable getArtifactCallable() { + throw new UnsupportedOperationException("Not implemented: getArtifactCallable()"); + } + + public UnaryCallable getArtifactContentsCallable() { + throw new UnsupportedOperationException("Not implemented: getArtifactContentsCallable()"); + } + + public UnaryCallable createArtifactCallable() { + throw new UnsupportedOperationException("Not implemented: createArtifactCallable()"); + } + + public UnaryCallable replaceArtifactCallable() { + throw new UnsupportedOperationException("Not implemented: replaceArtifactCallable()"); + } + + public UnaryCallable deleteArtifactCallable() { + throw new UnsupportedOperationException("Not implemented: deleteArtifactCallable()"); + } + + 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()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java new file mode 100644 index 000000000000..f99fd2a37da9 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java @@ -0,0 +1,1844 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub; + +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; + +import com.google.api.HttpBody; +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.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.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; +import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.GetApiRequest; +import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; +import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; +import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse; +import com.google.cloud.apigeeregistry.v1.ListApisRequest; +import com.google.cloud.apigeeregistry.v1.ListApisResponse; +import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; +import com.google.cloud.apigeeregistry.v1.ListArtifactsResponse; +import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; +import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; +import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; +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.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link RegistryStub}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * RegistryStubSettings.Builder registrySettingsBuilder = RegistryStubSettings.newBuilder();
+ * registrySettingsBuilder
+ *     .getApiSettings()
+ *     .setRetrySettings(
+ *         registrySettingsBuilder
+ *             .getApiSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * RegistryStubSettings registrySettings = registrySettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class RegistryStubSettings 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 PagedCallSettings + listApisSettings; + private final UnaryCallSettings getApiSettings; + private final UnaryCallSettings createApiSettings; + private final UnaryCallSettings updateApiSettings; + private final UnaryCallSettings deleteApiSettings; + private final PagedCallSettings< + ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> + listApiVersionsSettings; + private final UnaryCallSettings getApiVersionSettings; + private final UnaryCallSettings createApiVersionSettings; + private final UnaryCallSettings updateApiVersionSettings; + private final UnaryCallSettings deleteApiVersionSettings; + private final PagedCallSettings< + ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse> + listApiSpecsSettings; + private final UnaryCallSettings getApiSpecSettings; + private final UnaryCallSettings getApiSpecContentsSettings; + private final UnaryCallSettings createApiSpecSettings; + private final UnaryCallSettings updateApiSpecSettings; + private final UnaryCallSettings deleteApiSpecSettings; + private final UnaryCallSettings tagApiSpecRevisionSettings; + private final PagedCallSettings< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, + ListApiSpecRevisionsPagedResponse> + listApiSpecRevisionsSettings; + private final UnaryCallSettings rollbackApiSpecSettings; + private final UnaryCallSettings + deleteApiSpecRevisionSettings; + private final PagedCallSettings< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> + listApiDeploymentsSettings; + private final UnaryCallSettings getApiDeploymentSettings; + private final UnaryCallSettings + createApiDeploymentSettings; + private final UnaryCallSettings + updateApiDeploymentSettings; + private final UnaryCallSettings deleteApiDeploymentSettings; + private final UnaryCallSettings + tagApiDeploymentRevisionSettings; + private final PagedCallSettings< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ListApiDeploymentRevisionsPagedResponse> + listApiDeploymentRevisionsSettings; + private final UnaryCallSettings + rollbackApiDeploymentSettings; + private final UnaryCallSettings + deleteApiDeploymentRevisionSettings; + private final PagedCallSettings< + ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse> + listArtifactsSettings; + private final UnaryCallSettings getArtifactSettings; + private final UnaryCallSettings getArtifactContentsSettings; + private final UnaryCallSettings createArtifactSettings; + private final UnaryCallSettings replaceArtifactSettings; + private final UnaryCallSettings deleteArtifactSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_APIS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListApisRequest injectToken(ListApisRequest payload, String token) { + return ListApisRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListApisRequest injectPageSize(ListApisRequest payload, int pageSize) { + return ListApisRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListApisRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListApisResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListApisResponse payload) { + return payload.getApisList() == null + ? ImmutableList.of() + : payload.getApisList(); + } + }; + + private static final PagedListDescriptor< + ListApiVersionsRequest, ListApiVersionsResponse, ApiVersion> + LIST_API_VERSIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListApiVersionsRequest injectToken( + ListApiVersionsRequest payload, String token) { + return ListApiVersionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListApiVersionsRequest injectPageSize( + ListApiVersionsRequest payload, int pageSize) { + return ListApiVersionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListApiVersionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListApiVersionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListApiVersionsResponse payload) { + return payload.getApiVersionsList() == null + ? ImmutableList.of() + : payload.getApiVersionsList(); + } + }; + + private static final PagedListDescriptor + LIST_API_SPECS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListApiSpecsRequest injectToken(ListApiSpecsRequest payload, String token) { + return ListApiSpecsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListApiSpecsRequest injectPageSize(ListApiSpecsRequest payload, int pageSize) { + return ListApiSpecsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListApiSpecsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListApiSpecsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListApiSpecsResponse payload) { + return payload.getApiSpecsList() == null + ? ImmutableList.of() + : payload.getApiSpecsList(); + } + }; + + private static final PagedListDescriptor< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, ApiSpec> + LIST_API_SPEC_REVISIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, ApiSpec>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListApiSpecRevisionsRequest injectToken( + ListApiSpecRevisionsRequest payload, String token) { + return ListApiSpecRevisionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListApiSpecRevisionsRequest injectPageSize( + ListApiSpecRevisionsRequest payload, int pageSize) { + return ListApiSpecRevisionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListApiSpecRevisionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListApiSpecRevisionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListApiSpecRevisionsResponse payload) { + return payload.getApiSpecsList() == null + ? ImmutableList.of() + : payload.getApiSpecsList(); + } + }; + + private static final PagedListDescriptor< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ApiDeployment> + LIST_API_DEPLOYMENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ApiDeployment>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListApiDeploymentsRequest injectToken( + ListApiDeploymentsRequest payload, String token) { + return ListApiDeploymentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListApiDeploymentsRequest injectPageSize( + ListApiDeploymentsRequest payload, int pageSize) { + return ListApiDeploymentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListApiDeploymentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListApiDeploymentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListApiDeploymentsResponse payload) { + return payload.getApiDeploymentsList() == null + ? ImmutableList.of() + : payload.getApiDeploymentsList(); + } + }; + + private static final PagedListDescriptor< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, ApiDeployment> + LIST_API_DEPLOYMENT_REVISIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ApiDeployment>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListApiDeploymentRevisionsRequest injectToken( + ListApiDeploymentRevisionsRequest payload, String token) { + return ListApiDeploymentRevisionsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListApiDeploymentRevisionsRequest injectPageSize( + ListApiDeploymentRevisionsRequest payload, int pageSize) { + return ListApiDeploymentRevisionsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListApiDeploymentRevisionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListApiDeploymentRevisionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListApiDeploymentRevisionsResponse payload) { + return payload.getApiDeploymentsList() == null + ? ImmutableList.of() + : payload.getApiDeploymentsList(); + } + }; + + private static final PagedListDescriptor + LIST_ARTIFACTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListArtifactsRequest injectToken(ListArtifactsRequest payload, String token) { + return ListArtifactsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListArtifactsRequest injectPageSize(ListArtifactsRequest payload, int pageSize) { + return ListArtifactsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListArtifactsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListArtifactsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListArtifactsResponse payload) { + return payload.getArtifactsList() == null + ? ImmutableList.of() + : payload.getArtifactsList(); + } + }; + + 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() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListApisRequest, ListApisResponse, ListApisPagedResponse> + LIST_APIS_PAGE_STR_FACT = + new PagedListResponseFactory() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListApisRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_APIS_PAGE_STR_DESC, request, context); + return ListApisPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> + LIST_API_VERSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListApiVersionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_API_VERSIONS_PAGE_STR_DESC, request, context); + return ListApiVersionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse> + LIST_API_SPECS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListApiSpecsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_API_SPECS_PAGE_STR_DESC, request, context); + return ListApiSpecsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, + ListApiSpecRevisionsPagedResponse> + LIST_API_SPEC_REVISIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, + ListApiSpecRevisionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListApiSpecRevisionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_API_SPEC_REVISIONS_PAGE_STR_DESC, request, context); + return ListApiSpecRevisionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> + LIST_API_DEPLOYMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, + ListApiDeploymentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListApiDeploymentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_API_DEPLOYMENTS_PAGE_STR_DESC, request, context); + return ListApiDeploymentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ListApiDeploymentRevisionsPagedResponse> + LIST_API_DEPLOYMENT_REVISIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ListApiDeploymentRevisionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListApiDeploymentRevisionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ApiDeployment> + pageContext = + PageContext.create( + callable, LIST_API_DEPLOYMENT_REVISIONS_PAGE_STR_DESC, request, context); + return ListApiDeploymentRevisionsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse> + LIST_ARTIFACTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListArtifactsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ARTIFACTS_PAGE_STR_DESC, request, context); + return ListArtifactsPagedResponse.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 listApis. */ + public PagedCallSettings + listApisSettings() { + return listApisSettings; + } + + /** Returns the object with the settings used for calls to getApi. */ + public UnaryCallSettings getApiSettings() { + return getApiSettings; + } + + /** Returns the object with the settings used for calls to createApi. */ + public UnaryCallSettings createApiSettings() { + return createApiSettings; + } + + /** Returns the object with the settings used for calls to updateApi. */ + public UnaryCallSettings updateApiSettings() { + return updateApiSettings; + } + + /** Returns the object with the settings used for calls to deleteApi. */ + public UnaryCallSettings deleteApiSettings() { + return deleteApiSettings; + } + + /** Returns the object with the settings used for calls to listApiVersions. */ + public PagedCallSettings< + ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> + listApiVersionsSettings() { + return listApiVersionsSettings; + } + + /** Returns the object with the settings used for calls to getApiVersion. */ + public UnaryCallSettings getApiVersionSettings() { + return getApiVersionSettings; + } + + /** Returns the object with the settings used for calls to createApiVersion. */ + public UnaryCallSettings createApiVersionSettings() { + return createApiVersionSettings; + } + + /** Returns the object with the settings used for calls to updateApiVersion. */ + public UnaryCallSettings updateApiVersionSettings() { + return updateApiVersionSettings; + } + + /** Returns the object with the settings used for calls to deleteApiVersion. */ + public UnaryCallSettings deleteApiVersionSettings() { + return deleteApiVersionSettings; + } + + /** Returns the object with the settings used for calls to listApiSpecs. */ + public PagedCallSettings + listApiSpecsSettings() { + return listApiSpecsSettings; + } + + /** Returns the object with the settings used for calls to getApiSpec. */ + public UnaryCallSettings getApiSpecSettings() { + return getApiSpecSettings; + } + + /** Returns the object with the settings used for calls to getApiSpecContents. */ + public UnaryCallSettings getApiSpecContentsSettings() { + return getApiSpecContentsSettings; + } + + /** Returns the object with the settings used for calls to createApiSpec. */ + public UnaryCallSettings createApiSpecSettings() { + return createApiSpecSettings; + } + + /** Returns the object with the settings used for calls to updateApiSpec. */ + public UnaryCallSettings updateApiSpecSettings() { + return updateApiSpecSettings; + } + + /** Returns the object with the settings used for calls to deleteApiSpec. */ + public UnaryCallSettings deleteApiSpecSettings() { + return deleteApiSpecSettings; + } + + /** Returns the object with the settings used for calls to tagApiSpecRevision. */ + public UnaryCallSettings tagApiSpecRevisionSettings() { + return tagApiSpecRevisionSettings; + } + + /** Returns the object with the settings used for calls to listApiSpecRevisions. */ + public PagedCallSettings< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, + ListApiSpecRevisionsPagedResponse> + listApiSpecRevisionsSettings() { + return listApiSpecRevisionsSettings; + } + + /** Returns the object with the settings used for calls to rollbackApiSpec. */ + public UnaryCallSettings rollbackApiSpecSettings() { + return rollbackApiSpecSettings; + } + + /** Returns the object with the settings used for calls to deleteApiSpecRevision. */ + public UnaryCallSettings deleteApiSpecRevisionSettings() { + return deleteApiSpecRevisionSettings; + } + + /** Returns the object with the settings used for calls to listApiDeployments. */ + public PagedCallSettings< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> + listApiDeploymentsSettings() { + return listApiDeploymentsSettings; + } + + /** Returns the object with the settings used for calls to getApiDeployment. */ + public UnaryCallSettings getApiDeploymentSettings() { + return getApiDeploymentSettings; + } + + /** Returns the object with the settings used for calls to createApiDeployment. */ + public UnaryCallSettings + createApiDeploymentSettings() { + return createApiDeploymentSettings; + } + + /** Returns the object with the settings used for calls to updateApiDeployment. */ + public UnaryCallSettings + updateApiDeploymentSettings() { + return updateApiDeploymentSettings; + } + + /** Returns the object with the settings used for calls to deleteApiDeployment. */ + public UnaryCallSettings deleteApiDeploymentSettings() { + return deleteApiDeploymentSettings; + } + + /** Returns the object with the settings used for calls to tagApiDeploymentRevision. */ + public UnaryCallSettings + tagApiDeploymentRevisionSettings() { + return tagApiDeploymentRevisionSettings; + } + + /** Returns the object with the settings used for calls to listApiDeploymentRevisions. */ + public PagedCallSettings< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ListApiDeploymentRevisionsPagedResponse> + listApiDeploymentRevisionsSettings() { + return listApiDeploymentRevisionsSettings; + } + + /** Returns the object with the settings used for calls to rollbackApiDeployment. */ + public UnaryCallSettings + rollbackApiDeploymentSettings() { + return rollbackApiDeploymentSettings; + } + + /** Returns the object with the settings used for calls to deleteApiDeploymentRevision. */ + public UnaryCallSettings + deleteApiDeploymentRevisionSettings() { + return deleteApiDeploymentRevisionSettings; + } + + /** Returns the object with the settings used for calls to listArtifacts. */ + public PagedCallSettings + listArtifactsSettings() { + return listArtifactsSettings; + } + + /** Returns the object with the settings used for calls to getArtifact. */ + public UnaryCallSettings getArtifactSettings() { + return getArtifactSettings; + } + + /** Returns the object with the settings used for calls to getArtifactContents. */ + public UnaryCallSettings getArtifactContentsSettings() { + return getArtifactContentsSettings; + } + + /** Returns the object with the settings used for calls to createArtifact. */ + public UnaryCallSettings createArtifactSettings() { + return createArtifactSettings; + } + + /** Returns the object with the settings used for calls to replaceArtifact. */ + public UnaryCallSettings replaceArtifactSettings() { + return replaceArtifactSettings; + } + + /** Returns the object with the settings used for calls to deleteArtifact. */ + public UnaryCallSettings deleteArtifactSettings() { + return deleteArtifactSettings; + } + + /** 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; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public RegistryStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcRegistryStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonRegistryStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "apigeeregistry.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "apigeeregistry.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(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(RegistryStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(RegistryStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return RegistryStubSettings.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(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 RegistryStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listApisSettings = settingsBuilder.listApisSettings().build(); + getApiSettings = settingsBuilder.getApiSettings().build(); + createApiSettings = settingsBuilder.createApiSettings().build(); + updateApiSettings = settingsBuilder.updateApiSettings().build(); + deleteApiSettings = settingsBuilder.deleteApiSettings().build(); + listApiVersionsSettings = settingsBuilder.listApiVersionsSettings().build(); + getApiVersionSettings = settingsBuilder.getApiVersionSettings().build(); + createApiVersionSettings = settingsBuilder.createApiVersionSettings().build(); + updateApiVersionSettings = settingsBuilder.updateApiVersionSettings().build(); + deleteApiVersionSettings = settingsBuilder.deleteApiVersionSettings().build(); + listApiSpecsSettings = settingsBuilder.listApiSpecsSettings().build(); + getApiSpecSettings = settingsBuilder.getApiSpecSettings().build(); + getApiSpecContentsSettings = settingsBuilder.getApiSpecContentsSettings().build(); + createApiSpecSettings = settingsBuilder.createApiSpecSettings().build(); + updateApiSpecSettings = settingsBuilder.updateApiSpecSettings().build(); + deleteApiSpecSettings = settingsBuilder.deleteApiSpecSettings().build(); + tagApiSpecRevisionSettings = settingsBuilder.tagApiSpecRevisionSettings().build(); + listApiSpecRevisionsSettings = settingsBuilder.listApiSpecRevisionsSettings().build(); + rollbackApiSpecSettings = settingsBuilder.rollbackApiSpecSettings().build(); + deleteApiSpecRevisionSettings = settingsBuilder.deleteApiSpecRevisionSettings().build(); + listApiDeploymentsSettings = settingsBuilder.listApiDeploymentsSettings().build(); + getApiDeploymentSettings = settingsBuilder.getApiDeploymentSettings().build(); + createApiDeploymentSettings = settingsBuilder.createApiDeploymentSettings().build(); + updateApiDeploymentSettings = settingsBuilder.updateApiDeploymentSettings().build(); + deleteApiDeploymentSettings = settingsBuilder.deleteApiDeploymentSettings().build(); + tagApiDeploymentRevisionSettings = settingsBuilder.tagApiDeploymentRevisionSettings().build(); + listApiDeploymentRevisionsSettings = + settingsBuilder.listApiDeploymentRevisionsSettings().build(); + rollbackApiDeploymentSettings = settingsBuilder.rollbackApiDeploymentSettings().build(); + deleteApiDeploymentRevisionSettings = + settingsBuilder.deleteApiDeploymentRevisionSettings().build(); + listArtifactsSettings = settingsBuilder.listArtifactsSettings().build(); + getArtifactSettings = settingsBuilder.getArtifactSettings().build(); + getArtifactContentsSettings = settingsBuilder.getArtifactContentsSettings().build(); + createArtifactSettings = settingsBuilder.createArtifactSettings().build(); + replaceArtifactSettings = settingsBuilder.replaceArtifactSettings().build(); + deleteArtifactSettings = settingsBuilder.deleteArtifactSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for RegistryStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListApisRequest, ListApisResponse, ListApisPagedResponse> + listApisSettings; + private final UnaryCallSettings.Builder getApiSettings; + private final UnaryCallSettings.Builder createApiSettings; + private final UnaryCallSettings.Builder updateApiSettings; + private final UnaryCallSettings.Builder deleteApiSettings; + private final PagedCallSettings.Builder< + ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> + listApiVersionsSettings; + private final UnaryCallSettings.Builder getApiVersionSettings; + private final UnaryCallSettings.Builder + createApiVersionSettings; + private final UnaryCallSettings.Builder + updateApiVersionSettings; + private final UnaryCallSettings.Builder + deleteApiVersionSettings; + private final PagedCallSettings.Builder< + ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse> + listApiSpecsSettings; + private final UnaryCallSettings.Builder getApiSpecSettings; + private final UnaryCallSettings.Builder + getApiSpecContentsSettings; + private final UnaryCallSettings.Builder createApiSpecSettings; + private final UnaryCallSettings.Builder updateApiSpecSettings; + private final UnaryCallSettings.Builder deleteApiSpecSettings; + private final UnaryCallSettings.Builder + tagApiSpecRevisionSettings; + private final PagedCallSettings.Builder< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, + ListApiSpecRevisionsPagedResponse> + listApiSpecRevisionsSettings; + private final UnaryCallSettings.Builder + rollbackApiSpecSettings; + private final UnaryCallSettings.Builder + deleteApiSpecRevisionSettings; + private final PagedCallSettings.Builder< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> + listApiDeploymentsSettings; + private final UnaryCallSettings.Builder + getApiDeploymentSettings; + private final UnaryCallSettings.Builder + createApiDeploymentSettings; + private final UnaryCallSettings.Builder + updateApiDeploymentSettings; + private final UnaryCallSettings.Builder + deleteApiDeploymentSettings; + private final UnaryCallSettings.Builder + tagApiDeploymentRevisionSettings; + private final PagedCallSettings.Builder< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ListApiDeploymentRevisionsPagedResponse> + listApiDeploymentRevisionsSettings; + private final UnaryCallSettings.Builder + rollbackApiDeploymentSettings; + private final UnaryCallSettings.Builder + deleteApiDeploymentRevisionSettings; + private final PagedCallSettings.Builder< + ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse> + listArtifactsSettings; + private final UnaryCallSettings.Builder getArtifactSettings; + private final UnaryCallSettings.Builder + getArtifactContentsSettings; + private final UnaryCallSettings.Builder createArtifactSettings; + private final UnaryCallSettings.Builder + replaceArtifactSettings; + private final UnaryCallSettings.Builder deleteArtifactSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + 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.ABORTED, + StatusCode.Code.CANCELLED, + StatusCode.Code.DEADLINE_EXCEEDED, + 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() + .setInitialRetryDelay(Duration.ofMillis(200L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(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(ClientContext clientContext) { + super(clientContext); + + listApisSettings = PagedCallSettings.newBuilder(LIST_APIS_PAGE_STR_FACT); + getApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listApiVersionsSettings = PagedCallSettings.newBuilder(LIST_API_VERSIONS_PAGE_STR_FACT); + getApiVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createApiVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateApiVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteApiVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listApiSpecsSettings = PagedCallSettings.newBuilder(LIST_API_SPECS_PAGE_STR_FACT); + getApiSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getApiSpecContentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createApiSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateApiSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteApiSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + tagApiSpecRevisionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listApiSpecRevisionsSettings = + PagedCallSettings.newBuilder(LIST_API_SPEC_REVISIONS_PAGE_STR_FACT); + rollbackApiSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteApiSpecRevisionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listApiDeploymentsSettings = PagedCallSettings.newBuilder(LIST_API_DEPLOYMENTS_PAGE_STR_FACT); + getApiDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createApiDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateApiDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteApiDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + tagApiDeploymentRevisionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listApiDeploymentRevisionsSettings = + PagedCallSettings.newBuilder(LIST_API_DEPLOYMENT_REVISIONS_PAGE_STR_FACT); + rollbackApiDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteApiDeploymentRevisionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listArtifactsSettings = PagedCallSettings.newBuilder(LIST_ARTIFACTS_PAGE_STR_FACT); + getArtifactSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getArtifactContentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createArtifactSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + replaceArtifactSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteArtifactSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listApisSettings, + getApiSettings, + createApiSettings, + updateApiSettings, + deleteApiSettings, + listApiVersionsSettings, + getApiVersionSettings, + createApiVersionSettings, + updateApiVersionSettings, + deleteApiVersionSettings, + listApiSpecsSettings, + getApiSpecSettings, + getApiSpecContentsSettings, + createApiSpecSettings, + updateApiSpecSettings, + deleteApiSpecSettings, + tagApiSpecRevisionSettings, + listApiSpecRevisionsSettings, + rollbackApiSpecSettings, + deleteApiSpecRevisionSettings, + listApiDeploymentsSettings, + getApiDeploymentSettings, + createApiDeploymentSettings, + updateApiDeploymentSettings, + deleteApiDeploymentSettings, + tagApiDeploymentRevisionSettings, + listApiDeploymentRevisionsSettings, + rollbackApiDeploymentSettings, + deleteApiDeploymentRevisionSettings, + listArtifactsSettings, + getArtifactSettings, + getArtifactContentsSettings, + createArtifactSettings, + replaceArtifactSettings, + deleteArtifactSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(RegistryStubSettings settings) { + super(settings); + + listApisSettings = settings.listApisSettings.toBuilder(); + getApiSettings = settings.getApiSettings.toBuilder(); + createApiSettings = settings.createApiSettings.toBuilder(); + updateApiSettings = settings.updateApiSettings.toBuilder(); + deleteApiSettings = settings.deleteApiSettings.toBuilder(); + listApiVersionsSettings = settings.listApiVersionsSettings.toBuilder(); + getApiVersionSettings = settings.getApiVersionSettings.toBuilder(); + createApiVersionSettings = settings.createApiVersionSettings.toBuilder(); + updateApiVersionSettings = settings.updateApiVersionSettings.toBuilder(); + deleteApiVersionSettings = settings.deleteApiVersionSettings.toBuilder(); + listApiSpecsSettings = settings.listApiSpecsSettings.toBuilder(); + getApiSpecSettings = settings.getApiSpecSettings.toBuilder(); + getApiSpecContentsSettings = settings.getApiSpecContentsSettings.toBuilder(); + createApiSpecSettings = settings.createApiSpecSettings.toBuilder(); + updateApiSpecSettings = settings.updateApiSpecSettings.toBuilder(); + deleteApiSpecSettings = settings.deleteApiSpecSettings.toBuilder(); + tagApiSpecRevisionSettings = settings.tagApiSpecRevisionSettings.toBuilder(); + listApiSpecRevisionsSettings = settings.listApiSpecRevisionsSettings.toBuilder(); + rollbackApiSpecSettings = settings.rollbackApiSpecSettings.toBuilder(); + deleteApiSpecRevisionSettings = settings.deleteApiSpecRevisionSettings.toBuilder(); + listApiDeploymentsSettings = settings.listApiDeploymentsSettings.toBuilder(); + getApiDeploymentSettings = settings.getApiDeploymentSettings.toBuilder(); + createApiDeploymentSettings = settings.createApiDeploymentSettings.toBuilder(); + updateApiDeploymentSettings = settings.updateApiDeploymentSettings.toBuilder(); + deleteApiDeploymentSettings = settings.deleteApiDeploymentSettings.toBuilder(); + tagApiDeploymentRevisionSettings = settings.tagApiDeploymentRevisionSettings.toBuilder(); + listApiDeploymentRevisionsSettings = settings.listApiDeploymentRevisionsSettings.toBuilder(); + rollbackApiDeploymentSettings = settings.rollbackApiDeploymentSettings.toBuilder(); + deleteApiDeploymentRevisionSettings = + settings.deleteApiDeploymentRevisionSettings.toBuilder(); + listArtifactsSettings = settings.listArtifactsSettings.toBuilder(); + getArtifactSettings = settings.getArtifactSettings.toBuilder(); + getArtifactContentsSettings = settings.getArtifactContentsSettings.toBuilder(); + createArtifactSettings = settings.createArtifactSettings.toBuilder(); + replaceArtifactSettings = settings.replaceArtifactSettings.toBuilder(); + deleteArtifactSettings = settings.deleteArtifactSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listApisSettings, + getApiSettings, + createApiSettings, + updateApiSettings, + deleteApiSettings, + listApiVersionsSettings, + getApiVersionSettings, + createApiVersionSettings, + updateApiVersionSettings, + deleteApiVersionSettings, + listApiSpecsSettings, + getApiSpecSettings, + getApiSpecContentsSettings, + createApiSpecSettings, + updateApiSpecSettings, + deleteApiSpecSettings, + tagApiSpecRevisionSettings, + listApiSpecRevisionsSettings, + rollbackApiSpecSettings, + deleteApiSpecRevisionSettings, + listApiDeploymentsSettings, + getApiDeploymentSettings, + createApiDeploymentSettings, + updateApiDeploymentSettings, + deleteApiDeploymentSettings, + tagApiDeploymentRevisionSettings, + listApiDeploymentRevisionsSettings, + rollbackApiDeploymentSettings, + deleteApiDeploymentRevisionSettings, + listArtifactsSettings, + getArtifactSettings, + getArtifactContentsSettings, + createArtifactSettings, + replaceArtifactSettings, + deleteArtifactSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + 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.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listApisSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getApiSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createApiSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateApiSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteApiSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listApiVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getApiVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createApiVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateApiVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteApiVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listApiSpecsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getApiSpecSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getApiSpecContentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createApiSpecSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateApiSpecSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteApiSpecSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .tagApiSpecRevisionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listApiSpecRevisionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .rollbackApiSpecSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteApiSpecRevisionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listApiDeploymentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getApiDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createApiDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateApiDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteApiDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .tagApiDeploymentRevisionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listApiDeploymentRevisionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .rollbackApiDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteApiDeploymentRevisionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listArtifactsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getArtifactSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getArtifactContentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createArtifactSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .replaceArtifactSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteArtifactSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_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 + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + 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 listApis. */ + public PagedCallSettings.Builder + listApisSettings() { + return listApisSettings; + } + + /** Returns the builder for the settings used for calls to getApi. */ + public UnaryCallSettings.Builder getApiSettings() { + return getApiSettings; + } + + /** Returns the builder for the settings used for calls to createApi. */ + public UnaryCallSettings.Builder createApiSettings() { + return createApiSettings; + } + + /** Returns the builder for the settings used for calls to updateApi. */ + public UnaryCallSettings.Builder updateApiSettings() { + return updateApiSettings; + } + + /** Returns the builder for the settings used for calls to deleteApi. */ + public UnaryCallSettings.Builder deleteApiSettings() { + return deleteApiSettings; + } + + /** Returns the builder for the settings used for calls to listApiVersions. */ + public PagedCallSettings.Builder< + ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> + listApiVersionsSettings() { + return listApiVersionsSettings; + } + + /** Returns the builder for the settings used for calls to getApiVersion. */ + public UnaryCallSettings.Builder getApiVersionSettings() { + return getApiVersionSettings; + } + + /** Returns the builder for the settings used for calls to createApiVersion. */ + public UnaryCallSettings.Builder + createApiVersionSettings() { + return createApiVersionSettings; + } + + /** Returns the builder for the settings used for calls to updateApiVersion. */ + public UnaryCallSettings.Builder + updateApiVersionSettings() { + return updateApiVersionSettings; + } + + /** Returns the builder for the settings used for calls to deleteApiVersion. */ + public UnaryCallSettings.Builder deleteApiVersionSettings() { + return deleteApiVersionSettings; + } + + /** Returns the builder for the settings used for calls to listApiSpecs. */ + public PagedCallSettings.Builder< + ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse> + listApiSpecsSettings() { + return listApiSpecsSettings; + } + + /** Returns the builder for the settings used for calls to getApiSpec. */ + public UnaryCallSettings.Builder getApiSpecSettings() { + return getApiSpecSettings; + } + + /** Returns the builder for the settings used for calls to getApiSpecContents. */ + public UnaryCallSettings.Builder + getApiSpecContentsSettings() { + return getApiSpecContentsSettings; + } + + /** Returns the builder for the settings used for calls to createApiSpec. */ + public UnaryCallSettings.Builder createApiSpecSettings() { + return createApiSpecSettings; + } + + /** Returns the builder for the settings used for calls to updateApiSpec. */ + public UnaryCallSettings.Builder updateApiSpecSettings() { + return updateApiSpecSettings; + } + + /** Returns the builder for the settings used for calls to deleteApiSpec. */ + public UnaryCallSettings.Builder deleteApiSpecSettings() { + return deleteApiSpecSettings; + } + + /** Returns the builder for the settings used for calls to tagApiSpecRevision. */ + public UnaryCallSettings.Builder + tagApiSpecRevisionSettings() { + return tagApiSpecRevisionSettings; + } + + /** Returns the builder for the settings used for calls to listApiSpecRevisions. */ + public PagedCallSettings.Builder< + ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, + ListApiSpecRevisionsPagedResponse> + listApiSpecRevisionsSettings() { + return listApiSpecRevisionsSettings; + } + + /** Returns the builder for the settings used for calls to rollbackApiSpec. */ + public UnaryCallSettings.Builder rollbackApiSpecSettings() { + return rollbackApiSpecSettings; + } + + /** Returns the builder for the settings used for calls to deleteApiSpecRevision. */ + public UnaryCallSettings.Builder + deleteApiSpecRevisionSettings() { + return deleteApiSpecRevisionSettings; + } + + /** Returns the builder for the settings used for calls to listApiDeployments. */ + public PagedCallSettings.Builder< + ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> + listApiDeploymentsSettings() { + return listApiDeploymentsSettings; + } + + /** Returns the builder for the settings used for calls to getApiDeployment. */ + public UnaryCallSettings.Builder + getApiDeploymentSettings() { + return getApiDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to createApiDeployment. */ + public UnaryCallSettings.Builder + createApiDeploymentSettings() { + return createApiDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to updateApiDeployment. */ + public UnaryCallSettings.Builder + updateApiDeploymentSettings() { + return updateApiDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to deleteApiDeployment. */ + public UnaryCallSettings.Builder + deleteApiDeploymentSettings() { + return deleteApiDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to tagApiDeploymentRevision. */ + public UnaryCallSettings.Builder + tagApiDeploymentRevisionSettings() { + return tagApiDeploymentRevisionSettings; + } + + /** Returns the builder for the settings used for calls to listApiDeploymentRevisions. */ + public PagedCallSettings.Builder< + ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, + ListApiDeploymentRevisionsPagedResponse> + listApiDeploymentRevisionsSettings() { + return listApiDeploymentRevisionsSettings; + } + + /** Returns the builder for the settings used for calls to rollbackApiDeployment. */ + public UnaryCallSettings.Builder + rollbackApiDeploymentSettings() { + return rollbackApiDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to deleteApiDeploymentRevision. */ + public UnaryCallSettings.Builder + deleteApiDeploymentRevisionSettings() { + return deleteApiDeploymentRevisionSettings; + } + + /** Returns the builder for the settings used for calls to listArtifacts. */ + public PagedCallSettings.Builder< + ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse> + listArtifactsSettings() { + return listArtifactsSettings; + } + + /** Returns the builder for the settings used for calls to getArtifact. */ + public UnaryCallSettings.Builder getArtifactSettings() { + return getArtifactSettings; + } + + /** Returns the builder for the settings used for calls to getArtifactContents. */ + public UnaryCallSettings.Builder + getArtifactContentsSettings() { + return getArtifactContentsSettings; + } + + /** Returns the builder for the settings used for calls to createArtifact. */ + public UnaryCallSettings.Builder createArtifactSettings() { + return createArtifactSettings; + } + + /** Returns the builder for the settings used for calls to replaceArtifact. */ + public UnaryCallSettings.Builder replaceArtifactSettings() { + return replaceArtifactSettings; + } + + /** Returns the builder for the settings used for calls to deleteArtifact. */ + public UnaryCallSettings.Builder deleteArtifactSettings() { + return deleteArtifactSettings; + } + + /** 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; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public RegistryStubSettings build() throws IOException { + return new RegistryStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicy.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicy.java new file mode 100644 index 000000000000..d595f2852bc2 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicy.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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 MockIAMPolicy implements MockGrpcService { + private final MockIAMPolicyImpl serviceImpl; + + public MockIAMPolicy() { + serviceImpl = new MockIAMPolicyImpl(); + } + + @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicyImpl.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicyImpl.java new file mode 100644 index 000000000000..0bde64f38778 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicyImpl.java @@ -0,0 +1,127 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1; + +import com.google.api.core.BetaApi; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 MockIAMPolicyImpl extends IAMPolicyImplBase { + private List requests; + private Queue responses; + + public MockIAMPolicyImpl() { + 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 testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext(((TestIamPermissionsResponse) 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 TestIamPermissions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocations.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocations.java new file mode 100644 index 000000000000..ab1c8bccba3c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocationsImpl.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..c1a4a118cf3c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioning.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioning.java new file mode 100644 index 000000000000..1842a3b83bd1 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioning.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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 MockProvisioning implements MockGrpcService { + private final MockProvisioningImpl serviceImpl; + + public MockProvisioning() { + serviceImpl = new MockProvisioningImpl(); + } + + @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioningImpl.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioningImpl.java new file mode 100644 index 000000000000..1e47e0e9f49b --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioningImpl.java @@ -0,0 +1,123 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.apigeeregistry.v1.ProvisioningGrpc.ProvisioningImplBase; +import com.google.longrunning.Operation; +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 MockProvisioningImpl extends ProvisioningImplBase { + private List requests; + private Queue responses; + + public MockProvisioningImpl() { + 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 createInstance( + CreateInstanceRequest 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 CreateInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteInstance( + DeleteInstanceRequest 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 DeleteInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Instance) { + requests.add(request); + responseObserver.onNext(((Instance) 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 GetInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Instance.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistry.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistry.java new file mode 100644 index 000000000000..a142c9c90b6d --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistry.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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 MockRegistry implements MockGrpcService { + private final MockRegistryImpl serviceImpl; + + public MockRegistry() { + serviceImpl = new MockRegistryImpl(); + } + + @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistryImpl.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistryImpl.java new file mode 100644 index 000000000000..8aabf892bbe8 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistryImpl.java @@ -0,0 +1,792 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1; + +import com.google.api.HttpBody; +import com.google.api.core.BetaApi; +import com.google.cloud.apigeeregistry.v1.RegistryGrpc.RegistryImplBase; +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 MockRegistryImpl extends RegistryImplBase { + private List requests; + private Queue responses; + + public MockRegistryImpl() { + 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 listApis(ListApisRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListApisResponse) { + requests.add(request); + responseObserver.onNext(((ListApisResponse) 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 ListApis, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListApisResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getApi(GetApiRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Api) { + requests.add(request); + responseObserver.onNext(((Api) 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 GetApi, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Api.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createApi(CreateApiRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Api) { + requests.add(request); + responseObserver.onNext(((Api) 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 CreateApi, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Api.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateApi(UpdateApiRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Api) { + requests.add(request); + responseObserver.onNext(((Api) 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 UpdateApi, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Api.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteApi(DeleteApiRequest 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 DeleteApi, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listApiVersions( + ListApiVersionsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListApiVersionsResponse) { + requests.add(request); + responseObserver.onNext(((ListApiVersionsResponse) 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 ListApiVersions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListApiVersionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getApiVersion( + GetApiVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiVersion) { + requests.add(request); + responseObserver.onNext(((ApiVersion) 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 GetApiVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiVersion.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createApiVersion( + CreateApiVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiVersion) { + requests.add(request); + responseObserver.onNext(((ApiVersion) 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 CreateApiVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiVersion.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateApiVersion( + UpdateApiVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiVersion) { + requests.add(request); + responseObserver.onNext(((ApiVersion) 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 UpdateApiVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiVersion.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteApiVersion( + DeleteApiVersionRequest 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 DeleteApiVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listApiSpecs( + ListApiSpecsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListApiSpecsResponse) { + requests.add(request); + responseObserver.onNext(((ListApiSpecsResponse) 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 ListApiSpecs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListApiSpecsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getApiSpec(GetApiSpecRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiSpec) { + requests.add(request); + responseObserver.onNext(((ApiSpec) 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 GetApiSpec, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiSpec.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getApiSpecContents( + GetApiSpecContentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof HttpBody) { + requests.add(request); + responseObserver.onNext(((HttpBody) 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 GetApiSpecContents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + HttpBody.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createApiSpec( + CreateApiSpecRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiSpec) { + requests.add(request); + responseObserver.onNext(((ApiSpec) 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 CreateApiSpec, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiSpec.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateApiSpec( + UpdateApiSpecRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiSpec) { + requests.add(request); + responseObserver.onNext(((ApiSpec) 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 UpdateApiSpec, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiSpec.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteApiSpec(DeleteApiSpecRequest 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 DeleteApiSpec, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void tagApiSpecRevision( + TagApiSpecRevisionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiSpec) { + requests.add(request); + responseObserver.onNext(((ApiSpec) 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 TagApiSpecRevision, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiSpec.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listApiSpecRevisions( + ListApiSpecRevisionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListApiSpecRevisionsResponse) { + requests.add(request); + responseObserver.onNext(((ListApiSpecRevisionsResponse) 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 ListApiSpecRevisions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListApiSpecRevisionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void rollbackApiSpec( + RollbackApiSpecRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiSpec) { + requests.add(request); + responseObserver.onNext(((ApiSpec) 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 RollbackApiSpec, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiSpec.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteApiSpecRevision( + DeleteApiSpecRevisionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiSpec) { + requests.add(request); + responseObserver.onNext(((ApiSpec) 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 DeleteApiSpecRevision, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiSpec.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listApiDeployments( + ListApiDeploymentsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListApiDeploymentsResponse) { + requests.add(request); + responseObserver.onNext(((ListApiDeploymentsResponse) 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 ListApiDeployments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListApiDeploymentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getApiDeployment( + GetApiDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiDeployment) { + requests.add(request); + responseObserver.onNext(((ApiDeployment) 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 GetApiDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiDeployment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createApiDeployment( + CreateApiDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiDeployment) { + requests.add(request); + responseObserver.onNext(((ApiDeployment) 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 CreateApiDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiDeployment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateApiDeployment( + UpdateApiDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiDeployment) { + requests.add(request); + responseObserver.onNext(((ApiDeployment) 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 UpdateApiDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiDeployment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteApiDeployment( + DeleteApiDeploymentRequest 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 DeleteApiDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void tagApiDeploymentRevision( + TagApiDeploymentRevisionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiDeployment) { + requests.add(request); + responseObserver.onNext(((ApiDeployment) 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 TagApiDeploymentRevision, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiDeployment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listApiDeploymentRevisions( + ListApiDeploymentRevisionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListApiDeploymentRevisionsResponse) { + requests.add(request); + responseObserver.onNext(((ListApiDeploymentRevisionsResponse) 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 ListApiDeploymentRevisions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListApiDeploymentRevisionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void rollbackApiDeployment( + RollbackApiDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiDeployment) { + requests.add(request); + responseObserver.onNext(((ApiDeployment) 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 RollbackApiDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiDeployment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteApiDeploymentRevision( + DeleteApiDeploymentRevisionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApiDeployment) { + requests.add(request); + responseObserver.onNext(((ApiDeployment) 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 DeleteApiDeploymentRevision, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApiDeployment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listArtifacts( + ListArtifactsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListArtifactsResponse) { + requests.add(request); + responseObserver.onNext(((ListArtifactsResponse) 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 ListArtifacts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListArtifactsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getArtifact(GetArtifactRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Artifact) { + requests.add(request); + responseObserver.onNext(((Artifact) 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 GetArtifact, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Artifact.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getArtifactContents( + GetArtifactContentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof HttpBody) { + requests.add(request); + responseObserver.onNext(((HttpBody) 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 GetArtifactContents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + HttpBody.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createArtifact( + CreateArtifactRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Artifact) { + requests.add(request); + responseObserver.onNext(((Artifact) 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 CreateArtifact, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Artifact.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void replaceArtifact( + ReplaceArtifactRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Artifact) { + requests.add(request); + responseObserver.onNext(((Artifact) 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 ReplaceArtifact, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Artifact.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteArtifact( + DeleteArtifactRequest 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 DeleteArtifact, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientHttpJsonTest.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientHttpJsonTest.java new file mode 100644 index 000000000000..59069ef222ae --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientHttpJsonTest.java @@ -0,0 +1,676 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1; + +import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; + +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.apigeeregistry.v1.stub.HttpJsonProvisioningStub; +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.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +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 ProvisioningClientHttpJsonTest { + private static MockHttpService mockService; + private static ProvisioningClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonProvisioningStub.getMethodDescriptors(), + ProvisioningSettings.getDefaultEndpoint()); + ProvisioningSettings settings = + ProvisioningSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ProvisioningSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProvisioningClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setConfig(Instance.Config.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + + Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).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 createInstanceExceptionTest() 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]"); + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setConfig(Instance.Config.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + + Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).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 createInstanceExceptionTest2() 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"; + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteInstanceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + client.deleteInstanceAsync(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 deleteInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.deleteInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteInstanceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + + client.deleteInstanceAsync(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 deleteInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + client.deleteInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setConfig(Instance.Config.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.getInstance(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 getInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setConfig(Instance.Config.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + + Instance actualResponse = client.getInstance(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 getInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @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. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(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 setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(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 getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(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 testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientTest.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientTest.java new file mode 100644 index 000000000000..72022cc687a3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientTest.java @@ -0,0 +1,636 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1; + +import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; + +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.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +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 ProvisioningClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockProvisioning mockProvisioning; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ProvisioningClient client; + + @BeforeClass + public static void startStaticServer() { + mockProvisioning = new MockProvisioning(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockProvisioning, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ProvisioningSettings settings = + ProvisioningSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProvisioningClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setConfig(Instance.Config.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProvisioning.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + + Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProvisioning.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(instanceId, actualRequest.getInstanceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProvisioning.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + client.createInstanceAsync(parent, instance, instanceId).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 createInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setConfig(Instance.Config.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProvisioning.addResponse(resultOperation); + + String parent = "parent-995424086"; + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + + Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProvisioning.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(instanceId, actualRequest.getInstanceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInstanceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProvisioning.addException(exception); + + try { + String parent = "parent-995424086"; + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + client.createInstanceAsync(parent, instance, instanceId).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 deleteInstanceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProvisioning.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + client.deleteInstanceAsync(name).get(); + + List actualRequests = mockProvisioning.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProvisioning.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.deleteInstanceAsync(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 deleteInstanceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProvisioning.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteInstanceAsync(name).get(); + + List actualRequests = mockProvisioning.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstanceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProvisioning.addException(exception); + + try { + String name = "name3373707"; + client.deleteInstanceAsync(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 getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setConfig(Instance.Config.newBuilder().build()) + .build(); + mockProvisioning.addResponse(expectedResponse); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProvisioning.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProvisioning.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setConfig(Instance.Config.newBuilder().build()) + .build(); + mockProvisioning.addResponse(expectedResponse); + + String name = "name3373707"; + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProvisioning.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProvisioning.addException(exception); + + try { + String name = "name3373707"; + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @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. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientHttpJsonTest.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientHttpJsonTest.java new file mode 100644 index 000000000000..1f0e27cf8004 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientHttpJsonTest.java @@ -0,0 +1,4162 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1; + +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; + +import com.google.api.HttpBody; +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.apigeeregistry.v1.stub.HttpJsonRegistryStub; +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.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +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 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 RegistryClientHttpJsonTest { + private static MockHttpService mockService; + private static RegistryClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonRegistryStub.getMethodDescriptors(), RegistrySettings.getDefaultEndpoint()); + RegistrySettings settings = + RegistrySettings.newHttpJsonBuilder() + .setTransportChannelProvider( + RegistrySettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = RegistryClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listApisTest() throws Exception { + Api responsesElement = Api.newBuilder().build(); + ListApisResponse expectedResponse = + ListApisResponse.newBuilder() + .setNextPageToken("") + .addAllApis(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListApisPagedResponse pagedListResponse = client.listApis(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApisList().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 listApisExceptionTest() 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.listApis(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApisTest2() throws Exception { + Api responsesElement = Api.newBuilder().build(); + ListApisResponse expectedResponse = + ListApisResponse.newBuilder() + .setNextPageToken("") + .addAllApis(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListApisPagedResponse pagedListResponse = client.listApis(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApisList().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 listApisExceptionTest2() 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.listApis(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiTest() throws Exception { + Api expectedResponse = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + + Api actualResponse = client.getApi(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 getApiExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + client.getApi(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiTest2() throws Exception { + Api expectedResponse = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3607/locations/location-3607/apis/api-3607"; + + Api actualResponse = client.getApi(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 getApiExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3607/locations/location-3607/apis/api-3607"; + client.getApi(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiTest() throws Exception { + Api expectedResponse = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Api api = Api.newBuilder().build(); + String apiId = "apiId93021397"; + + Api actualResponse = client.createApi(parent, api, apiId); + 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 createApiExceptionTest() 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]"); + Api api = Api.newBuilder().build(); + String apiId = "apiId93021397"; + client.createApi(parent, api, apiId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiTest2() throws Exception { + Api expectedResponse = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + Api api = Api.newBuilder().build(); + String apiId = "apiId93021397"; + + Api actualResponse = client.createApi(parent, api, apiId); + 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 createApiExceptionTest2() 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"; + Api api = Api.newBuilder().build(); + String apiId = "apiId93021397"; + client.createApi(parent, api, apiId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateApiTest() throws Exception { + Api expectedResponse = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + Api api = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Api actualResponse = client.updateApi(api, 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 updateApiExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Api api = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateApi(api, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + + client.deleteApi(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 deleteApiExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + client.deleteApi(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3607/locations/location-3607/apis/api-3607"; + + client.deleteApi(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 deleteApiExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3607/locations/location-3607/apis/api-3607"; + client.deleteApi(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiVersionsTest() throws Exception { + ApiVersion responsesElement = ApiVersion.newBuilder().build(); + ListApiVersionsResponse expectedResponse = + ListApiVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllApiVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + + ListApiVersionsPagedResponse pagedListResponse = client.listApiVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiVersionsList().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 listApiVersionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + client.listApiVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiVersionsTest2() throws Exception { + ApiVersion responsesElement = ApiVersion.newBuilder().build(); + ListApiVersionsResponse expectedResponse = + ListApiVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllApiVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; + + ListApiVersionsPagedResponse pagedListResponse = client.listApiVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiVersionsList().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 listApiVersionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; + client.listApiVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiVersionTest() throws Exception { + ApiVersion expectedResponse = + ApiVersion.newBuilder() + .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + + ApiVersion actualResponse = client.getApiVersion(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 getApiVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + client.getApiVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiVersionTest2() throws Exception { + ApiVersion expectedResponse = + ApiVersion.newBuilder() + .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6412/locations/location-6412/apis/api-6412/versions/version-6412"; + + ApiVersion actualResponse = client.getApiVersion(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 getApiVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6412/locations/location-6412/apis/api-6412/versions/version-6412"; + client.getApiVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiVersionTest() throws Exception { + ApiVersion expectedResponse = + ApiVersion.newBuilder() + .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + String apiVersionId = "apiVersionId1678816025"; + + ApiVersion actualResponse = client.createApiVersion(parent, apiVersion, apiVersionId); + 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 createApiVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + String apiVersionId = "apiVersionId1678816025"; + client.createApiVersion(parent, apiVersion, apiVersionId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiVersionTest2() throws Exception { + ApiVersion expectedResponse = + ApiVersion.newBuilder() + .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + String apiVersionId = "apiVersionId1678816025"; + + ApiVersion actualResponse = client.createApiVersion(parent, apiVersion, apiVersionId); + 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 createApiVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + String apiVersionId = "apiVersionId1678816025"; + client.createApiVersion(parent, apiVersion, apiVersionId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateApiVersionTest() throws Exception { + ApiVersion expectedResponse = + ApiVersion.newBuilder() + .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiVersion apiVersion = + ApiVersion.newBuilder() + .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ApiVersion actualResponse = client.updateApiVersion(apiVersion, 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 updateApiVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiVersion apiVersion = + ApiVersion.newBuilder() + .setName( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateApiVersion(apiVersion, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiVersionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + + client.deleteApiVersion(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 deleteApiVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + client.deleteApiVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiVersionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6412/locations/location-6412/apis/api-6412/versions/version-6412"; + + client.deleteApiVersion(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 deleteApiVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6412/locations/location-6412/apis/api-6412/versions/version-6412"; + client.deleteApiVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiSpecsTest() throws Exception { + ApiSpec responsesElement = ApiSpec.newBuilder().build(); + ListApiSpecsResponse expectedResponse = + ListApiSpecsResponse.newBuilder() + .setNextPageToken("") + .addAllApiSpecs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + + ListApiSpecsPagedResponse pagedListResponse = client.listApiSpecs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiSpecsList().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 listApiSpecsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + client.listApiSpecs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiSpecsTest2() throws Exception { + ApiSpec responsesElement = ApiSpec.newBuilder().build(); + ListApiSpecsResponse expectedResponse = + ListApiSpecsResponse.newBuilder() + .setNextPageToken("") + .addAllApiSpecs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-1179/locations/location-1179/apis/api-1179/versions/version-1179"; + + ListApiSpecsPagedResponse pagedListResponse = client.listApiSpecs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiSpecsList().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 listApiSpecsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-1179/locations/location-1179/apis/api-1179/versions/version-1179"; + client.listApiSpecs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiSpecTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + + ApiSpec actualResponse = client.getApiSpec(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 getApiSpecExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + client.getApiSpec(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiSpecTest2() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; + + ApiSpec actualResponse = client.getApiSpec(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 getApiSpecExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; + client.getApiSpec(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiSpecContentsTest() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + + HttpBody actualResponse = client.getApiSpecContents(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 getApiSpecContentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + client.getApiSpecContents(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiSpecContentsTest2() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; + + HttpBody actualResponse = client.getApiSpecContents(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 getApiSpecContentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; + client.getApiSpecContents(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiSpecTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + String apiSpecId = "apiSpecId-421795600"; + + ApiSpec actualResponse = client.createApiSpec(parent, apiSpec, apiSpecId); + 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 createApiSpecExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + String apiSpecId = "apiSpecId-421795600"; + client.createApiSpec(parent, apiSpec, apiSpecId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiSpecTest2() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-1179/locations/location-1179/apis/api-1179/versions/version-1179"; + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + String apiSpecId = "apiSpecId-421795600"; + + ApiSpec actualResponse = client.createApiSpec(parent, apiSpec, apiSpecId); + 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 createApiSpecExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-1179/locations/location-1179/apis/api-1179/versions/version-1179"; + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + String apiSpecId = "apiSpecId-421795600"; + client.createApiSpec(parent, apiSpec, apiSpecId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateApiSpecTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiSpec apiSpec = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ApiSpec actualResponse = client.updateApiSpec(apiSpec, 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 updateApiSpecExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiSpec apiSpec = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateApiSpec(apiSpec, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiSpecTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + + client.deleteApiSpec(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 deleteApiSpecExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + client.deleteApiSpec(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiSpecTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; + + client.deleteApiSpec(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 deleteApiSpecExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; + client.deleteApiSpec(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void tagApiSpecRevisionTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + TagApiSpecRevisionRequest request = + TagApiSpecRevisionRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setTag("tag114586") + .build(); + + ApiSpec actualResponse = client.tagApiSpecRevision(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 tagApiSpecRevisionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TagApiSpecRevisionRequest request = + TagApiSpecRevisionRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setTag("tag114586") + .build(); + client.tagApiSpecRevision(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiSpecRevisionsTest() throws Exception { + ApiSpec responsesElement = ApiSpec.newBuilder().build(); + ListApiSpecRevisionsResponse expectedResponse = + ListApiSpecRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllApiSpecs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListApiSpecRevisionsRequest request = + ListApiSpecRevisionsRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListApiSpecRevisionsPagedResponse pagedListResponse = client.listApiSpecRevisions(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiSpecsList().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 listApiSpecRevisionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListApiSpecRevisionsRequest request = + ListApiSpecRevisionsRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listApiSpecRevisions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void rollbackApiSpecTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + RollbackApiSpecRequest request = + RollbackApiSpecRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setRevisionId("revisionId-1507445162") + .build(); + + ApiSpec actualResponse = client.rollbackApiSpec(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 rollbackApiSpecExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RollbackApiSpecRequest request = + RollbackApiSpecRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setRevisionId("revisionId-1507445162") + .build(); + client.rollbackApiSpec(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiSpecRevisionTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + + ApiSpec actualResponse = client.deleteApiSpecRevision(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 deleteApiSpecRevisionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + client.deleteApiSpecRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiSpecRevisionTest2() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; + + ApiSpec actualResponse = client.deleteApiSpecRevision(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 deleteApiSpecRevisionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; + client.deleteApiSpecRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiDeploymentsTest() throws Exception { + ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); + ListApiDeploymentsResponse expectedResponse = + ListApiDeploymentsResponse.newBuilder() + .setNextPageToken("") + .addAllApiDeployments(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + + ListApiDeploymentsPagedResponse pagedListResponse = client.listApiDeployments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiDeploymentsList().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 listApiDeploymentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + client.listApiDeployments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiDeploymentsTest2() throws Exception { + ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); + ListApiDeploymentsResponse expectedResponse = + ListApiDeploymentsResponse.newBuilder() + .setNextPageToken("") + .addAllApiDeployments(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; + + ListApiDeploymentsPagedResponse pagedListResponse = client.listApiDeployments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiDeploymentsList().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 listApiDeploymentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; + client.listApiDeployments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiDeploymentTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + + ApiDeployment actualResponse = client.getApiDeployment(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 getApiDeploymentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + client.getApiDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiDeploymentTest2() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; + + ApiDeployment actualResponse = client.getApiDeployment(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 getApiDeploymentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; + client.getApiDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiDeploymentTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + String apiDeploymentId = "apiDeploymentId-1299472902"; + + ApiDeployment actualResponse = + client.createApiDeployment(parent, apiDeployment, apiDeploymentId); + 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 createApiDeploymentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + String apiDeploymentId = "apiDeploymentId-1299472902"; + client.createApiDeployment(parent, apiDeployment, apiDeploymentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiDeploymentTest2() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + String apiDeploymentId = "apiDeploymentId-1299472902"; + + ApiDeployment actualResponse = + client.createApiDeployment(parent, apiDeployment, apiDeploymentId); + 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 createApiDeploymentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + String apiDeploymentId = "apiDeploymentId-1299472902"; + client.createApiDeployment(parent, apiDeployment, apiDeploymentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateApiDeploymentTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiDeployment apiDeployment = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ApiDeployment actualResponse = client.updateApiDeployment(apiDeployment, 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 updateApiDeploymentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiDeployment apiDeployment = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateApiDeployment(apiDeployment, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiDeploymentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + + client.deleteApiDeployment(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 deleteApiDeploymentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + client.deleteApiDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiDeploymentTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; + + client.deleteApiDeployment(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 deleteApiDeploymentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; + client.deleteApiDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void tagApiDeploymentRevisionTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + TagApiDeploymentRevisionRequest request = + TagApiDeploymentRevisionRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setTag("tag114586") + .build(); + + ApiDeployment actualResponse = client.tagApiDeploymentRevision(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 tagApiDeploymentRevisionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TagApiDeploymentRevisionRequest request = + TagApiDeploymentRevisionRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setTag("tag114586") + .build(); + client.tagApiDeploymentRevision(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiDeploymentRevisionsTest() throws Exception { + ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); + ListApiDeploymentRevisionsResponse expectedResponse = + ListApiDeploymentRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllApiDeployments(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListApiDeploymentRevisionsRequest request = + ListApiDeploymentRevisionsRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListApiDeploymentRevisionsPagedResponse pagedListResponse = + client.listApiDeploymentRevisions(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiDeploymentsList().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 listApiDeploymentRevisionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListApiDeploymentRevisionsRequest request = + ListApiDeploymentRevisionsRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listApiDeploymentRevisions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void rollbackApiDeploymentTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + RollbackApiDeploymentRequest request = + RollbackApiDeploymentRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setRevisionId("revisionId-1507445162") + .build(); + + ApiDeployment actualResponse = client.rollbackApiDeployment(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 rollbackApiDeploymentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RollbackApiDeploymentRequest request = + RollbackApiDeploymentRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setRevisionId("revisionId-1507445162") + .build(); + client.rollbackApiDeployment(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiDeploymentRevisionTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + + ApiDeployment actualResponse = client.deleteApiDeploymentRevision(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 deleteApiDeploymentRevisionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + client.deleteApiDeploymentRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiDeploymentRevisionTest2() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; + + ApiDeployment actualResponse = client.deleteApiDeploymentRevision(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 deleteApiDeploymentRevisionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; + client.deleteApiDeploymentRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ApiDeploymentName parent = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiDeploymentName parent = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + client.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest2() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + client.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest3() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ApiSpecName parent = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiSpecName parent = + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + client.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest4() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + client.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest5() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest5() 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.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest6() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest6() 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.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getArtifactTest() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + + Artifact actualResponse = client.getArtifact(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 getArtifactExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + client.getArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getArtifactTest2() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; + + Artifact actualResponse = client.getArtifact(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 getArtifactExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; + client.getArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getArtifactContentsTest() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + + HttpBody actualResponse = client.getArtifactContents(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 getArtifactContentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + client.getArtifactContents(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getArtifactContentsTest2() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; + + HttpBody actualResponse = client.getArtifactContents(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 getArtifactContentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; + client.getArtifactContents(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + ApiDeploymentName parent = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + 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 createArtifactExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiDeploymentName parent = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest2() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + 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 createArtifactExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest3() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + ApiSpecName parent = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + 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 createArtifactExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiSpecName parent = + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest4() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + 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 createArtifactExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest5() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + 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 createArtifactExceptionTest5() 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]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest6() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + 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 createArtifactExceptionTest6() 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"; + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void replaceArtifactTest() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + Artifact artifact = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + + Artifact actualResponse = client.replaceArtifact(artifact); + 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 replaceArtifactExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Artifact artifact = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName( + "[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + client.replaceArtifact(artifact); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteArtifactTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + + client.deleteArtifact(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 deleteArtifactExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + client.deleteArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteArtifactTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; + + client.deleteArtifact(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 deleteArtifactExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; + client.deleteArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @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. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(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 setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(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 getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(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 testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientTest.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientTest.java new file mode 100644 index 000000000000..f03663ff94b9 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientTest.java @@ -0,0 +1,3618 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1; + +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; +import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; + +import com.google.api.HttpBody; +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.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.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +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 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 RegistryClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockRegistry mockRegistry; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private RegistryClient client; + + @BeforeClass + public static void startStaticServer() { + mockRegistry = new MockRegistry(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockRegistry, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + RegistrySettings settings = + RegistrySettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = RegistryClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listApisTest() throws Exception { + Api responsesElement = Api.newBuilder().build(); + ListApisResponse expectedResponse = + ListApisResponse.newBuilder() + .setNextPageToken("") + .addAllApis(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListApisPagedResponse pagedListResponse = client.listApis(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApisList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApisRequest actualRequest = ((ListApisRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApisExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listApis(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApisTest2() throws Exception { + Api responsesElement = Api.newBuilder().build(); + ListApisResponse expectedResponse = + ListApisResponse.newBuilder() + .setNextPageToken("") + .addAllApis(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListApisPagedResponse pagedListResponse = client.listApis(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApisList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApisRequest actualRequest = ((ListApisRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApisExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listApis(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiTest() throws Exception { + Api expectedResponse = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + + Api actualResponse = client.getApi(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApiRequest actualRequest = ((GetApiRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApiExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + client.getApi(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiTest2() throws Exception { + Api expectedResponse = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + Api actualResponse = client.getApi(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApiRequest actualRequest = ((GetApiRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApiExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getApi(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiTest() throws Exception { + Api expectedResponse = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Api api = Api.newBuilder().build(); + String apiId = "apiId93021397"; + + Api actualResponse = client.createApi(parent, api, apiId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApiRequest actualRequest = ((CreateApiRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(api, actualRequest.getApi()); + Assert.assertEquals(apiId, actualRequest.getApiId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApiExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Api api = Api.newBuilder().build(); + String apiId = "apiId93021397"; + client.createApi(parent, api, apiId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiTest2() throws Exception { + Api expectedResponse = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Api api = Api.newBuilder().build(); + String apiId = "apiId93021397"; + + Api actualResponse = client.createApi(parent, api, apiId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApiRequest actualRequest = ((CreateApiRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(api, actualRequest.getApi()); + Assert.assertEquals(apiId, actualRequest.getApiId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApiExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + Api api = Api.newBuilder().build(); + String apiId = "apiId93021397"; + client.createApi(parent, api, apiId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateApiTest() throws Exception { + Api expectedResponse = + Api.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAvailability("availability1997542747") + .setRecommendedVersion( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setRecommendedDeployment( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + Api api = Api.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Api actualResponse = client.updateApi(api, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateApiRequest actualRequest = ((UpdateApiRequest) actualRequests.get(0)); + + Assert.assertEquals(api, actualRequest.getApi()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateApiExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + Api api = Api.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateApi(api, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRegistry.addResponse(expectedResponse); + + ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + + client.deleteApi(name); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiRequest actualRequest = ((DeleteApiRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + client.deleteApi(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteApi(name); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiRequest actualRequest = ((DeleteApiRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteApi(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiVersionsTest() throws Exception { + ApiVersion responsesElement = ApiVersion.newBuilder().build(); + ListApiVersionsResponse expectedResponse = + ListApiVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllApiVersions(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + + ListApiVersionsPagedResponse pagedListResponse = client.listApiVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiVersionsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApiVersionsRequest actualRequest = ((ListApiVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApiVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + client.listApiVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiVersionsTest2() throws Exception { + ApiVersion responsesElement = ApiVersion.newBuilder().build(); + ListApiVersionsResponse expectedResponse = + ListApiVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllApiVersions(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListApiVersionsPagedResponse pagedListResponse = client.listApiVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiVersionsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApiVersionsRequest actualRequest = ((ListApiVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApiVersionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listApiVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiVersionTest() throws Exception { + ApiVersion expectedResponse = + ApiVersion.newBuilder() + .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + + ApiVersion actualResponse = client.getApiVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApiVersionRequest actualRequest = ((GetApiVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApiVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + client.getApiVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiVersionTest2() throws Exception { + ApiVersion expectedResponse = + ApiVersion.newBuilder() + .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + ApiVersion actualResponse = client.getApiVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApiVersionRequest actualRequest = ((GetApiVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApiVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getApiVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiVersionTest() throws Exception { + ApiVersion expectedResponse = + ApiVersion.newBuilder() + .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + String apiVersionId = "apiVersionId1678816025"; + + ApiVersion actualResponse = client.createApiVersion(parent, apiVersion, apiVersionId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApiVersionRequest actualRequest = ((CreateApiVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(apiVersion, actualRequest.getApiVersion()); + Assert.assertEquals(apiVersionId, actualRequest.getApiVersionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApiVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + String apiVersionId = "apiVersionId1678816025"; + client.createApiVersion(parent, apiVersion, apiVersionId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiVersionTest2() throws Exception { + ApiVersion expectedResponse = + ApiVersion.newBuilder() + .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + String apiVersionId = "apiVersionId1678816025"; + + ApiVersion actualResponse = client.createApiVersion(parent, apiVersion, apiVersionId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApiVersionRequest actualRequest = ((CreateApiVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(apiVersion, actualRequest.getApiVersion()); + Assert.assertEquals(apiVersionId, actualRequest.getApiVersionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApiVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + String apiVersionId = "apiVersionId1678816025"; + client.createApiVersion(parent, apiVersion, apiVersionId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateApiVersionTest() throws Exception { + ApiVersion expectedResponse = + ApiVersion.newBuilder() + .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setState("state109757585") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ApiVersion actualResponse = client.updateApiVersion(apiVersion, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateApiVersionRequest actualRequest = ((UpdateApiVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(apiVersion, actualRequest.getApiVersion()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateApiVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateApiVersion(apiVersion, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiVersionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRegistry.addResponse(expectedResponse); + + ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + + client.deleteApiVersion(name); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiVersionRequest actualRequest = ((DeleteApiVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + client.deleteApiVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiVersionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteApiVersion(name); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiVersionRequest actualRequest = ((DeleteApiVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteApiVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiSpecsTest() throws Exception { + ApiSpec responsesElement = ApiSpec.newBuilder().build(); + ListApiSpecsResponse expectedResponse = + ListApiSpecsResponse.newBuilder() + .setNextPageToken("") + .addAllApiSpecs(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + + ListApiSpecsPagedResponse pagedListResponse = client.listApiSpecs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiSpecsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApiSpecsRequest actualRequest = ((ListApiSpecsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApiSpecsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + client.listApiSpecs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiSpecsTest2() throws Exception { + ApiSpec responsesElement = ApiSpec.newBuilder().build(); + ListApiSpecsResponse expectedResponse = + ListApiSpecsResponse.newBuilder() + .setNextPageToken("") + .addAllApiSpecs(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListApiSpecsPagedResponse pagedListResponse = client.listApiSpecs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiSpecsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApiSpecsRequest actualRequest = ((ListApiSpecsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApiSpecsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listApiSpecs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiSpecTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + + ApiSpec actualResponse = client.getApiSpec(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApiSpecRequest actualRequest = ((GetApiSpecRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApiSpecExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + client.getApiSpec(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiSpecTest2() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + ApiSpec actualResponse = client.getApiSpec(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApiSpecRequest actualRequest = ((GetApiSpecRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApiSpecExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getApiSpec(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiSpecContentsTest() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + + HttpBody actualResponse = client.getApiSpecContents(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApiSpecContentsRequest actualRequest = ((GetApiSpecContentsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApiSpecContentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + client.getApiSpecContents(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiSpecContentsTest2() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + HttpBody actualResponse = client.getApiSpecContents(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApiSpecContentsRequest actualRequest = ((GetApiSpecContentsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApiSpecContentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getApiSpecContents(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiSpecTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + String apiSpecId = "apiSpecId-421795600"; + + ApiSpec actualResponse = client.createApiSpec(parent, apiSpec, apiSpecId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApiSpecRequest actualRequest = ((CreateApiSpecRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(apiSpec, actualRequest.getApiSpec()); + Assert.assertEquals(apiSpecId, actualRequest.getApiSpecId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApiSpecExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + String apiSpecId = "apiSpecId-421795600"; + client.createApiSpec(parent, apiSpec, apiSpecId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiSpecTest2() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + String apiSpecId = "apiSpecId-421795600"; + + ApiSpec actualResponse = client.createApiSpec(parent, apiSpec, apiSpecId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApiSpecRequest actualRequest = ((CreateApiSpecRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(apiSpec, actualRequest.getApiSpec()); + Assert.assertEquals(apiSpecId, actualRequest.getApiSpecId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApiSpecExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + String apiSpecId = "apiSpecId-421795600"; + client.createApiSpec(parent, apiSpec, apiSpecId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateApiSpecTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ApiSpec actualResponse = client.updateApiSpec(apiSpec, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateApiSpecRequest actualRequest = ((UpdateApiSpecRequest) actualRequests.get(0)); + + Assert.assertEquals(apiSpec, actualRequest.getApiSpec()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateApiSpecExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateApiSpec(apiSpec, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiSpecTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRegistry.addResponse(expectedResponse); + + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + + client.deleteApiSpec(name); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiSpecRequest actualRequest = ((DeleteApiSpecRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiSpecExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + client.deleteApiSpec(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiSpecTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteApiSpec(name); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiSpecRequest actualRequest = ((DeleteApiSpecRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiSpecExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteApiSpec(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void tagApiSpecRevisionTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + TagApiSpecRevisionRequest request = + TagApiSpecRevisionRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setTag("tag114586") + .build(); + + ApiSpec actualResponse = client.tagApiSpecRevision(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TagApiSpecRevisionRequest actualRequest = ((TagApiSpecRevisionRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getTag(), actualRequest.getTag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void tagApiSpecRevisionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + TagApiSpecRevisionRequest request = + TagApiSpecRevisionRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setTag("tag114586") + .build(); + client.tagApiSpecRevision(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiSpecRevisionsTest() throws Exception { + ApiSpec responsesElement = ApiSpec.newBuilder().build(); + ListApiSpecRevisionsResponse expectedResponse = + ListApiSpecRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllApiSpecs(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + ListApiSpecRevisionsRequest request = + ListApiSpecRevisionsRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListApiSpecRevisionsPagedResponse pagedListResponse = client.listApiSpecRevisions(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiSpecsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApiSpecRevisionsRequest actualRequest = + ((ListApiSpecRevisionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApiSpecRevisionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ListApiSpecRevisionsRequest request = + ListApiSpecRevisionsRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listApiSpecRevisions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void rollbackApiSpecTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + RollbackApiSpecRequest request = + RollbackApiSpecRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setRevisionId("revisionId-1507445162") + .build(); + + ApiSpec actualResponse = client.rollbackApiSpec(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RollbackApiSpecRequest actualRequest = ((RollbackApiSpecRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getRevisionId(), actualRequest.getRevisionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rollbackApiSpecExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + RollbackApiSpecRequest request = + RollbackApiSpecRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setRevisionId("revisionId-1507445162") + .build(); + client.rollbackApiSpec(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiSpecRevisionTest() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + + ApiSpec actualResponse = client.deleteApiSpecRevision(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiSpecRevisionRequest actualRequest = + ((DeleteApiSpecRevisionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiSpecRevisionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + client.deleteApiSpecRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiSpecRevisionTest2() throws Exception { + ApiSpec expectedResponse = + ApiSpec.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setFilename("filename-734768633") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setSourceUri("sourceUri-1698419887") + .setContents(ByteString.EMPTY) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + ApiSpec actualResponse = client.deleteApiSpecRevision(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiSpecRevisionRequest actualRequest = + ((DeleteApiSpecRevisionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiSpecRevisionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteApiSpecRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiDeploymentsTest() throws Exception { + ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); + ListApiDeploymentsResponse expectedResponse = + ListApiDeploymentsResponse.newBuilder() + .setNextPageToken("") + .addAllApiDeployments(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + + ListApiDeploymentsPagedResponse pagedListResponse = client.listApiDeployments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiDeploymentsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApiDeploymentsRequest actualRequest = ((ListApiDeploymentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApiDeploymentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + client.listApiDeployments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiDeploymentsTest2() throws Exception { + ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); + ListApiDeploymentsResponse expectedResponse = + ListApiDeploymentsResponse.newBuilder() + .setNextPageToken("") + .addAllApiDeployments(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListApiDeploymentsPagedResponse pagedListResponse = client.listApiDeployments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiDeploymentsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApiDeploymentsRequest actualRequest = ((ListApiDeploymentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApiDeploymentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listApiDeployments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiDeploymentTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + + ApiDeployment actualResponse = client.getApiDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApiDeploymentRequest actualRequest = ((GetApiDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApiDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + client.getApiDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApiDeploymentTest2() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + ApiDeployment actualResponse = client.getApiDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApiDeploymentRequest actualRequest = ((GetApiDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApiDeploymentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getApiDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiDeploymentTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + String apiDeploymentId = "apiDeploymentId-1299472902"; + + ApiDeployment actualResponse = + client.createApiDeployment(parent, apiDeployment, apiDeploymentId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApiDeploymentRequest actualRequest = ((CreateApiDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(apiDeployment, actualRequest.getApiDeployment()); + Assert.assertEquals(apiDeploymentId, actualRequest.getApiDeploymentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApiDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + String apiDeploymentId = "apiDeploymentId-1299472902"; + client.createApiDeployment(parent, apiDeployment, apiDeploymentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiDeploymentTest2() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + String apiDeploymentId = "apiDeploymentId-1299472902"; + + ApiDeployment actualResponse = + client.createApiDeployment(parent, apiDeployment, apiDeploymentId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApiDeploymentRequest actualRequest = ((CreateApiDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(apiDeployment, actualRequest.getApiDeployment()); + Assert.assertEquals(apiDeploymentId, actualRequest.getApiDeploymentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApiDeploymentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + String apiDeploymentId = "apiDeploymentId-1299472902"; + client.createApiDeployment(parent, apiDeployment, apiDeploymentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateApiDeploymentTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ApiDeployment actualResponse = client.updateApiDeployment(apiDeployment, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateApiDeploymentRequest actualRequest = ((UpdateApiDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(apiDeployment, actualRequest.getApiDeployment()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateApiDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateApiDeployment(apiDeployment, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiDeploymentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRegistry.addResponse(expectedResponse); + + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + + client.deleteApiDeployment(name); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiDeploymentRequest actualRequest = ((DeleteApiDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + client.deleteApiDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiDeploymentTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteApiDeployment(name); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiDeploymentRequest actualRequest = ((DeleteApiDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiDeploymentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteApiDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void tagApiDeploymentRevisionTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + TagApiDeploymentRevisionRequest request = + TagApiDeploymentRevisionRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setTag("tag114586") + .build(); + + ApiDeployment actualResponse = client.tagApiDeploymentRevision(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TagApiDeploymentRevisionRequest actualRequest = + ((TagApiDeploymentRevisionRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getTag(), actualRequest.getTag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void tagApiDeploymentRevisionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + TagApiDeploymentRevisionRequest request = + TagApiDeploymentRevisionRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setTag("tag114586") + .build(); + client.tagApiDeploymentRevision(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApiDeploymentRevisionsTest() throws Exception { + ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); + ListApiDeploymentRevisionsResponse expectedResponse = + ListApiDeploymentRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllApiDeployments(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + ListApiDeploymentRevisionsRequest request = + ListApiDeploymentRevisionsRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListApiDeploymentRevisionsPagedResponse pagedListResponse = + client.listApiDeploymentRevisions(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApiDeploymentsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApiDeploymentRevisionsRequest actualRequest = + ((ListApiDeploymentRevisionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApiDeploymentRevisionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ListApiDeploymentRevisionsRequest request = + ListApiDeploymentRevisionsRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listApiDeploymentRevisions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void rollbackApiDeploymentTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + RollbackApiDeploymentRequest request = + RollbackApiDeploymentRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setRevisionId("revisionId-1507445162") + .build(); + + ApiDeployment actualResponse = client.rollbackApiDeployment(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RollbackApiDeploymentRequest actualRequest = + ((RollbackApiDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getRevisionId(), actualRequest.getRevisionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rollbackApiDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + RollbackApiDeploymentRequest request = + RollbackApiDeploymentRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setRevisionId("revisionId-1507445162") + .build(); + client.rollbackApiDeployment(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiDeploymentRevisionTest() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + + ApiDeployment actualResponse = client.deleteApiDeploymentRevision(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiDeploymentRevisionRequest actualRequest = + ((DeleteApiDeploymentRevisionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiDeploymentRevisionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + client.deleteApiDeploymentRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiDeploymentRevisionTest2() throws Exception { + ApiDeployment expectedResponse = + ApiDeployment.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setCreateTime(Timestamp.newBuilder().build()) + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setRevisionUpdateTime(Timestamp.newBuilder().build()) + .setApiSpecRevision( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setEndpointUri("endpointUri-1135817833") + .setExternalChannelUri("externalChannelUri-697349228") + .setIntendedAudience("intendedAudience-1800551601") + .setAccessGuidance("accessGuidance-1763286820") + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + ApiDeployment actualResponse = client.deleteApiDeploymentRevision(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApiDeploymentRevisionRequest actualRequest = + ((DeleteApiDeploymentRevisionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApiDeploymentRevisionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteApiDeploymentRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiDeploymentName parent = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listArtifactsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiDeploymentName parent = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + client.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest2() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listArtifactsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + client.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest3() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiSpecName parent = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listArtifactsExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiSpecName parent = + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + client.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest4() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listArtifactsExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + client.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest5() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listArtifactsExceptionTest5() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listArtifactsTest6() throws Exception { + Artifact responsesElement = Artifact.newBuilder().build(); + ListArtifactsResponse expectedResponse = + ListArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllArtifacts(Arrays.asList(responsesElement)) + .build(); + mockRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listArtifactsExceptionTest6() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getArtifactTest() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockRegistry.addResponse(expectedResponse); + + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + + Artifact actualResponse = client.getArtifact(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetArtifactRequest actualRequest = ((GetArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getArtifactExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + client.getArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getArtifactTest2() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + Artifact actualResponse = client.getArtifact(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetArtifactRequest actualRequest = ((GetArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getArtifactExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getArtifactContentsTest() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockRegistry.addResponse(expectedResponse); + + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + + HttpBody actualResponse = client.getArtifactContents(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetArtifactContentsRequest actualRequest = ((GetArtifactContentsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getArtifactContentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + client.getArtifactContents(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getArtifactContentsTest2() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + HttpBody actualResponse = client.getArtifactContents(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetArtifactContentsRequest actualRequest = ((GetArtifactContentsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getArtifactContentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getArtifactContents(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiDeploymentName parent = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(artifact, actualRequest.getArtifact()); + Assert.assertEquals(artifactId, actualRequest.getArtifactId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createArtifactExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiDeploymentName parent = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest2() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(artifact, actualRequest.getArtifact()); + Assert.assertEquals(artifactId, actualRequest.getArtifactId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createArtifactExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest3() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiSpecName parent = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(artifact, actualRequest.getArtifact()); + Assert.assertEquals(artifactId, actualRequest.getArtifactId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createArtifactExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiSpecName parent = + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest4() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockRegistry.addResponse(expectedResponse); + + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(artifact, actualRequest.getArtifact()); + Assert.assertEquals(artifactId, actualRequest.getArtifactId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createArtifactExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest5() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(artifact, actualRequest.getArtifact()); + Assert.assertEquals(artifactId, actualRequest.getArtifactId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createArtifactExceptionTest5() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createArtifactTest6() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + + Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(artifact, actualRequest.getArtifact()); + Assert.assertEquals(artifactId, actualRequest.getArtifactId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createArtifactExceptionTest6() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + client.createArtifact(parent, artifact, artifactId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void replaceArtifactTest() throws Exception { + Artifact expectedResponse = + Artifact.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMimeType("mimeType-1392120434") + .setSizeBytes(-1796325715) + .setHash("hash3195150") + .setContents(ByteString.EMPTY) + .build(); + mockRegistry.addResponse(expectedResponse); + + Artifact artifact = Artifact.newBuilder().build(); + + Artifact actualResponse = client.replaceArtifact(artifact); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReplaceArtifactRequest actualRequest = ((ReplaceArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(artifact, actualRequest.getArtifact()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void replaceArtifactExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + Artifact artifact = Artifact.newBuilder().build(); + client.replaceArtifact(artifact); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteArtifactTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRegistry.addResponse(expectedResponse); + + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + + client.deleteArtifact(name); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteArtifactRequest actualRequest = ((DeleteArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteArtifactExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + client.deleteArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteArtifactTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteArtifact(name); + + List actualRequests = mockRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteArtifactRequest actualRequest = ((DeleteArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteArtifactExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @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. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningGrpc.java b/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningGrpc.java new file mode 100644 index 000000000000..ba2124b2235a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningGrpc.java @@ -0,0 +1,480 @@ +package com.google.cloud.apigeeregistry.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * The service that is used for managing the data plane provisioning of the
+ * Registry.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/apigeeregistry/v1/provisioning_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ProvisioningGrpc { + + private ProvisioningGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.apigeeregistry.v1.Provisioning"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getCreateInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateInstance", + requestType = com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateInstanceMethod() { + io.grpc.MethodDescriptor getCreateInstanceMethod; + if ((getCreateInstanceMethod = ProvisioningGrpc.getCreateInstanceMethod) == null) { + synchronized (ProvisioningGrpc.class) { + if ((getCreateInstanceMethod = ProvisioningGrpc.getCreateInstanceMethod) == null) { + ProvisioningGrpc.getCreateInstanceMethod = getCreateInstanceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ProvisioningMethodDescriptorSupplier("CreateInstance")) + .build(); + } + } + } + return getCreateInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteInstance", + requestType = com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteInstanceMethod() { + io.grpc.MethodDescriptor getDeleteInstanceMethod; + if ((getDeleteInstanceMethod = ProvisioningGrpc.getDeleteInstanceMethod) == null) { + synchronized (ProvisioningGrpc.class) { + if ((getDeleteInstanceMethod = ProvisioningGrpc.getDeleteInstanceMethod) == null) { + ProvisioningGrpc.getDeleteInstanceMethod = getDeleteInstanceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ProvisioningMethodDescriptorSupplier("DeleteInstance")) + .build(); + } + } + } + return getDeleteInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInstance", + requestType = com.google.cloud.apigeeregistry.v1.GetInstanceRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.Instance.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetInstanceMethod() { + io.grpc.MethodDescriptor getGetInstanceMethod; + if ((getGetInstanceMethod = ProvisioningGrpc.getGetInstanceMethod) == null) { + synchronized (ProvisioningGrpc.class) { + if ((getGetInstanceMethod = ProvisioningGrpc.getGetInstanceMethod) == null) { + ProvisioningGrpc.getGetInstanceMethod = getGetInstanceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance())) + .setSchemaDescriptor(new ProvisioningMethodDescriptorSupplier("GetInstance")) + .build(); + } + } + } + return getGetInstanceMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ProvisioningStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProvisioningStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProvisioningStub(channel, callOptions); + } + }; + return ProvisioningStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ProvisioningBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProvisioningBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProvisioningBlockingStub(channel, callOptions); + } + }; + return ProvisioningBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ProvisioningFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProvisioningFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProvisioningFutureStub(channel, callOptions); + } + }; + return ProvisioningFutureStub.newStub(factory, channel); + } + + /** + *
+   * The service that is used for managing the data plane provisioning of the
+   * Registry.
+   * 
+ */ + public static abstract class ProvisioningImplBase implements io.grpc.BindableService { + + /** + *
+     * Provisions instance resources for the Registry.
+     * 
+ */ + public void createInstance(com.google.cloud.apigeeregistry.v1.CreateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateInstanceMethod(), responseObserver); + } + + /** + *
+     * Deletes the Registry instance.
+     * 
+ */ + public void deleteInstance(com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteInstanceMethod(), responseObserver); + } + + /** + *
+     * Gets details of a single Instance.
+     * 
+ */ + public void getInstance(com.google.cloud.apigeeregistry.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstanceMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.CreateInstanceRequest, + com.google.longrunning.Operation>( + this, METHODID_CREATE_INSTANCE))) + .addMethod( + getDeleteInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest, + com.google.longrunning.Operation>( + this, METHODID_DELETE_INSTANCE))) + .addMethod( + getGetInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.GetInstanceRequest, + com.google.cloud.apigeeregistry.v1.Instance>( + this, METHODID_GET_INSTANCE))) + .build(); + } + } + + /** + *
+   * The service that is used for managing the data plane provisioning of the
+   * Registry.
+   * 
+ */ + public static final class ProvisioningStub extends io.grpc.stub.AbstractAsyncStub { + private ProvisioningStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProvisioningStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProvisioningStub(channel, callOptions); + } + + /** + *
+     * Provisions instance resources for the Registry.
+     * 
+ */ + public void createInstance(com.google.cloud.apigeeregistry.v1.CreateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes the Registry instance.
+     * 
+ */ + public void deleteInstance(com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets details of a single Instance.
+     * 
+ */ + public void getInstance(com.google.cloud.apigeeregistry.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * The service that is used for managing the data plane provisioning of the
+   * Registry.
+   * 
+ */ + public static final class ProvisioningBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ProvisioningBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProvisioningBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProvisioningBlockingStub(channel, callOptions); + } + + /** + *
+     * Provisions instance resources for the Registry.
+     * 
+ */ + public com.google.longrunning.Operation createInstance(com.google.cloud.apigeeregistry.v1.CreateInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateInstanceMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes the Registry instance.
+     * 
+ */ + public com.google.longrunning.Operation deleteInstance(com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets details of a single Instance.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.Instance getInstance(com.google.cloud.apigeeregistry.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); + } + } + + /** + *
+   * The service that is used for managing the data plane provisioning of the
+   * Registry.
+   * 
+ */ + public static final class ProvisioningFutureStub extends io.grpc.stub.AbstractFutureStub { + private ProvisioningFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProvisioningFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProvisioningFutureStub(channel, callOptions); + } + + /** + *
+     * Provisions instance resources for the Registry.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createInstance( + com.google.cloud.apigeeregistry.v1.CreateInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes the Registry instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteInstance( + com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets details of a single Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getInstance( + com.google.cloud.apigeeregistry.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_INSTANCE = 0; + private static final int METHODID_DELETE_INSTANCE = 1; + private static final int METHODID_GET_INSTANCE = 2; + + 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 ProvisioningImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ProvisioningImplBase 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_CREATE_INSTANCE: + serviceImpl.createInstance((com.google.cloud.apigeeregistry.v1.CreateInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INSTANCE: + serviceImpl.deleteInstance((com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INSTANCE: + serviceImpl.getInstance((com.google.cloud.apigeeregistry.v1.GetInstanceRequest) 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(); + } + } + } + + private static abstract class ProvisioningBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ProvisioningBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Provisioning"); + } + } + + private static final class ProvisioningFileDescriptorSupplier + extends ProvisioningBaseDescriptorSupplier { + ProvisioningFileDescriptorSupplier() {} + } + + private static final class ProvisioningMethodDescriptorSupplier + extends ProvisioningBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ProvisioningMethodDescriptorSupplier(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 (ProvisioningGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ProvisioningFileDescriptorSupplier()) + .addMethod(getCreateInstanceMethod()) + .addMethod(getDeleteInstanceMethod()) + .addMethod(getGetInstanceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryGrpc.java b/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryGrpc.java new file mode 100644 index 000000000000..c8ce679258f8 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryGrpc.java @@ -0,0 +1,3287 @@ +package com.google.cloud.apigeeregistry.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * The Registry service allows teams to manage descriptions of APIs.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/apigeeregistry/v1/registry_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class RegistryGrpc { + + private RegistryGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.apigeeregistry.v1.Registry"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListApisMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListApis", + requestType = com.google.cloud.apigeeregistry.v1.ListApisRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ListApisResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListApisMethod() { + io.grpc.MethodDescriptor getListApisMethod; + if ((getListApisMethod = RegistryGrpc.getListApisMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getListApisMethod = RegistryGrpc.getListApisMethod) == null) { + RegistryGrpc.getListApisMethod = getListApisMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApis")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApisRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApisResponse.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApis")) + .build(); + } + } + } + return getListApisMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetApiMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetApi", + requestType = com.google.cloud.apigeeregistry.v1.GetApiRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.Api.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetApiMethod() { + io.grpc.MethodDescriptor getGetApiMethod; + if ((getGetApiMethod = RegistryGrpc.getGetApiMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getGetApiMethod = RegistryGrpc.getGetApiMethod) == null) { + RegistryGrpc.getGetApiMethod = getGetApiMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApi")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.GetApiRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetApi")) + .build(); + } + } + } + return getGetApiMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateApiMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateApi", + requestType = com.google.cloud.apigeeregistry.v1.CreateApiRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.Api.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateApiMethod() { + io.grpc.MethodDescriptor getCreateApiMethod; + if ((getCreateApiMethod = RegistryGrpc.getCreateApiMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getCreateApiMethod = RegistryGrpc.getCreateApiMethod) == null) { + RegistryGrpc.getCreateApiMethod = getCreateApiMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApi")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.CreateApiRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("CreateApi")) + .build(); + } + } + } + return getCreateApiMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateApiMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateApi", + requestType = com.google.cloud.apigeeregistry.v1.UpdateApiRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.Api.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateApiMethod() { + io.grpc.MethodDescriptor getUpdateApiMethod; + if ((getUpdateApiMethod = RegistryGrpc.getUpdateApiMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getUpdateApiMethod = RegistryGrpc.getUpdateApiMethod) == null) { + RegistryGrpc.getUpdateApiMethod = getUpdateApiMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateApi")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.UpdateApiRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("UpdateApi")) + .build(); + } + } + } + return getUpdateApiMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteApiMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteApi", + requestType = com.google.cloud.apigeeregistry.v1.DeleteApiRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteApiMethod() { + io.grpc.MethodDescriptor getDeleteApiMethod; + if ((getDeleteApiMethod = RegistryGrpc.getDeleteApiMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getDeleteApiMethod = RegistryGrpc.getDeleteApiMethod) == null) { + RegistryGrpc.getDeleteApiMethod = getDeleteApiMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApi")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.DeleteApiRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApi")) + .build(); + } + } + } + return getDeleteApiMethod; + } + + private static volatile io.grpc.MethodDescriptor getListApiVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListApiVersions", + requestType = com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListApiVersionsMethod() { + io.grpc.MethodDescriptor getListApiVersionsMethod; + if ((getListApiVersionsMethod = RegistryGrpc.getListApiVersionsMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getListApiVersionsMethod = RegistryGrpc.getListApiVersionsMethod) == null) { + RegistryGrpc.getListApiVersionsMethod = getListApiVersionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApiVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApiVersions")) + .build(); + } + } + } + return getListApiVersionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetApiVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetApiVersion", + requestType = com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetApiVersionMethod() { + io.grpc.MethodDescriptor getGetApiVersionMethod; + if ((getGetApiVersionMethod = RegistryGrpc.getGetApiVersionMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getGetApiVersionMethod = RegistryGrpc.getGetApiVersionMethod) == null) { + RegistryGrpc.getGetApiVersionMethod = getGetApiVersionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApiVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetApiVersion")) + .build(); + } + } + } + return getGetApiVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateApiVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateApiVersion", + requestType = com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateApiVersionMethod() { + io.grpc.MethodDescriptor getCreateApiVersionMethod; + if ((getCreateApiVersionMethod = RegistryGrpc.getCreateApiVersionMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getCreateApiVersionMethod = RegistryGrpc.getCreateApiVersionMethod) == null) { + RegistryGrpc.getCreateApiVersionMethod = getCreateApiVersionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApiVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("CreateApiVersion")) + .build(); + } + } + } + return getCreateApiVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateApiVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateApiVersion", + requestType = com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateApiVersionMethod() { + io.grpc.MethodDescriptor getUpdateApiVersionMethod; + if ((getUpdateApiVersionMethod = RegistryGrpc.getUpdateApiVersionMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getUpdateApiVersionMethod = RegistryGrpc.getUpdateApiVersionMethod) == null) { + RegistryGrpc.getUpdateApiVersionMethod = getUpdateApiVersionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateApiVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("UpdateApiVersion")) + .build(); + } + } + } + return getUpdateApiVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteApiVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteApiVersion", + requestType = com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteApiVersionMethod() { + io.grpc.MethodDescriptor getDeleteApiVersionMethod; + if ((getDeleteApiVersionMethod = RegistryGrpc.getDeleteApiVersionMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getDeleteApiVersionMethod = RegistryGrpc.getDeleteApiVersionMethod) == null) { + RegistryGrpc.getDeleteApiVersionMethod = getDeleteApiVersionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApiVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApiVersion")) + .build(); + } + } + } + return getDeleteApiVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor getListApiSpecsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListApiSpecs", + requestType = com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListApiSpecsMethod() { + io.grpc.MethodDescriptor getListApiSpecsMethod; + if ((getListApiSpecsMethod = RegistryGrpc.getListApiSpecsMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getListApiSpecsMethod = RegistryGrpc.getListApiSpecsMethod) == null) { + RegistryGrpc.getListApiSpecsMethod = getListApiSpecsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApiSpecs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApiSpecs")) + .build(); + } + } + } + return getListApiSpecsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetApiSpecMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetApiSpec", + requestType = com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetApiSpecMethod() { + io.grpc.MethodDescriptor getGetApiSpecMethod; + if ((getGetApiSpecMethod = RegistryGrpc.getGetApiSpecMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getGetApiSpecMethod = RegistryGrpc.getGetApiSpecMethod) == null) { + RegistryGrpc.getGetApiSpecMethod = getGetApiSpecMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApiSpec")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetApiSpec")) + .build(); + } + } + } + return getGetApiSpecMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetApiSpecContentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetApiSpecContents", + requestType = com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.class, + responseType = com.google.api.HttpBody.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetApiSpecContentsMethod() { + io.grpc.MethodDescriptor getGetApiSpecContentsMethod; + if ((getGetApiSpecContentsMethod = RegistryGrpc.getGetApiSpecContentsMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getGetApiSpecContentsMethod = RegistryGrpc.getGetApiSpecContentsMethod) == null) { + RegistryGrpc.getGetApiSpecContentsMethod = getGetApiSpecContentsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApiSpecContents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.HttpBody.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetApiSpecContents")) + .build(); + } + } + } + return getGetApiSpecContentsMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateApiSpecMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateApiSpec", + requestType = com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateApiSpecMethod() { + io.grpc.MethodDescriptor getCreateApiSpecMethod; + if ((getCreateApiSpecMethod = RegistryGrpc.getCreateApiSpecMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getCreateApiSpecMethod = RegistryGrpc.getCreateApiSpecMethod) == null) { + RegistryGrpc.getCreateApiSpecMethod = getCreateApiSpecMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApiSpec")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("CreateApiSpec")) + .build(); + } + } + } + return getCreateApiSpecMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateApiSpecMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateApiSpec", + requestType = com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateApiSpecMethod() { + io.grpc.MethodDescriptor getUpdateApiSpecMethod; + if ((getUpdateApiSpecMethod = RegistryGrpc.getUpdateApiSpecMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getUpdateApiSpecMethod = RegistryGrpc.getUpdateApiSpecMethod) == null) { + RegistryGrpc.getUpdateApiSpecMethod = getUpdateApiSpecMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateApiSpec")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("UpdateApiSpec")) + .build(); + } + } + } + return getUpdateApiSpecMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteApiSpecMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteApiSpec", + requestType = com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteApiSpecMethod() { + io.grpc.MethodDescriptor getDeleteApiSpecMethod; + if ((getDeleteApiSpecMethod = RegistryGrpc.getDeleteApiSpecMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getDeleteApiSpecMethod = RegistryGrpc.getDeleteApiSpecMethod) == null) { + RegistryGrpc.getDeleteApiSpecMethod = getDeleteApiSpecMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApiSpec")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApiSpec")) + .build(); + } + } + } + return getDeleteApiSpecMethod; + } + + private static volatile io.grpc.MethodDescriptor getTagApiSpecRevisionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TagApiSpecRevision", + requestType = com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getTagApiSpecRevisionMethod() { + io.grpc.MethodDescriptor getTagApiSpecRevisionMethod; + if ((getTagApiSpecRevisionMethod = RegistryGrpc.getTagApiSpecRevisionMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getTagApiSpecRevisionMethod = RegistryGrpc.getTagApiSpecRevisionMethod) == null) { + RegistryGrpc.getTagApiSpecRevisionMethod = getTagApiSpecRevisionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TagApiSpecRevision")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("TagApiSpecRevision")) + .build(); + } + } + } + return getTagApiSpecRevisionMethod; + } + + private static volatile io.grpc.MethodDescriptor getListApiSpecRevisionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListApiSpecRevisions", + requestType = com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListApiSpecRevisionsMethod() { + io.grpc.MethodDescriptor getListApiSpecRevisionsMethod; + if ((getListApiSpecRevisionsMethod = RegistryGrpc.getListApiSpecRevisionsMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getListApiSpecRevisionsMethod = RegistryGrpc.getListApiSpecRevisionsMethod) == null) { + RegistryGrpc.getListApiSpecRevisionsMethod = getListApiSpecRevisionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApiSpecRevisions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApiSpecRevisions")) + .build(); + } + } + } + return getListApiSpecRevisionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getRollbackApiSpecMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RollbackApiSpec", + requestType = com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRollbackApiSpecMethod() { + io.grpc.MethodDescriptor getRollbackApiSpecMethod; + if ((getRollbackApiSpecMethod = RegistryGrpc.getRollbackApiSpecMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getRollbackApiSpecMethod = RegistryGrpc.getRollbackApiSpecMethod) == null) { + RegistryGrpc.getRollbackApiSpecMethod = getRollbackApiSpecMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RollbackApiSpec")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("RollbackApiSpec")) + .build(); + } + } + } + return getRollbackApiSpecMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteApiSpecRevisionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteApiSpecRevision", + requestType = com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteApiSpecRevisionMethod() { + io.grpc.MethodDescriptor getDeleteApiSpecRevisionMethod; + if ((getDeleteApiSpecRevisionMethod = RegistryGrpc.getDeleteApiSpecRevisionMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getDeleteApiSpecRevisionMethod = RegistryGrpc.getDeleteApiSpecRevisionMethod) == null) { + RegistryGrpc.getDeleteApiSpecRevisionMethod = getDeleteApiSpecRevisionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApiSpecRevision")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApiSpecRevision")) + .build(); + } + } + } + return getDeleteApiSpecRevisionMethod; + } + + private static volatile io.grpc.MethodDescriptor getListApiDeploymentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListApiDeployments", + requestType = com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListApiDeploymentsMethod() { + io.grpc.MethodDescriptor getListApiDeploymentsMethod; + if ((getListApiDeploymentsMethod = RegistryGrpc.getListApiDeploymentsMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getListApiDeploymentsMethod = RegistryGrpc.getListApiDeploymentsMethod) == null) { + RegistryGrpc.getListApiDeploymentsMethod = getListApiDeploymentsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApiDeployments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApiDeployments")) + .build(); + } + } + } + return getListApiDeploymentsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetApiDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetApiDeployment", + requestType = com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetApiDeploymentMethod() { + io.grpc.MethodDescriptor getGetApiDeploymentMethod; + if ((getGetApiDeploymentMethod = RegistryGrpc.getGetApiDeploymentMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getGetApiDeploymentMethod = RegistryGrpc.getGetApiDeploymentMethod) == null) { + RegistryGrpc.getGetApiDeploymentMethod = getGetApiDeploymentMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApiDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetApiDeployment")) + .build(); + } + } + } + return getGetApiDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateApiDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateApiDeployment", + requestType = com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateApiDeploymentMethod() { + io.grpc.MethodDescriptor getCreateApiDeploymentMethod; + if ((getCreateApiDeploymentMethod = RegistryGrpc.getCreateApiDeploymentMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getCreateApiDeploymentMethod = RegistryGrpc.getCreateApiDeploymentMethod) == null) { + RegistryGrpc.getCreateApiDeploymentMethod = getCreateApiDeploymentMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApiDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("CreateApiDeployment")) + .build(); + } + } + } + return getCreateApiDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateApiDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateApiDeployment", + requestType = com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateApiDeploymentMethod() { + io.grpc.MethodDescriptor getUpdateApiDeploymentMethod; + if ((getUpdateApiDeploymentMethod = RegistryGrpc.getUpdateApiDeploymentMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getUpdateApiDeploymentMethod = RegistryGrpc.getUpdateApiDeploymentMethod) == null) { + RegistryGrpc.getUpdateApiDeploymentMethod = getUpdateApiDeploymentMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateApiDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("UpdateApiDeployment")) + .build(); + } + } + } + return getUpdateApiDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteApiDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteApiDeployment", + requestType = com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteApiDeploymentMethod() { + io.grpc.MethodDescriptor getDeleteApiDeploymentMethod; + if ((getDeleteApiDeploymentMethod = RegistryGrpc.getDeleteApiDeploymentMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getDeleteApiDeploymentMethod = RegistryGrpc.getDeleteApiDeploymentMethod) == null) { + RegistryGrpc.getDeleteApiDeploymentMethod = getDeleteApiDeploymentMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApiDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApiDeployment")) + .build(); + } + } + } + return getDeleteApiDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor getTagApiDeploymentRevisionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TagApiDeploymentRevision", + requestType = com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getTagApiDeploymentRevisionMethod() { + io.grpc.MethodDescriptor getTagApiDeploymentRevisionMethod; + if ((getTagApiDeploymentRevisionMethod = RegistryGrpc.getTagApiDeploymentRevisionMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getTagApiDeploymentRevisionMethod = RegistryGrpc.getTagApiDeploymentRevisionMethod) == null) { + RegistryGrpc.getTagApiDeploymentRevisionMethod = getTagApiDeploymentRevisionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TagApiDeploymentRevision")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("TagApiDeploymentRevision")) + .build(); + } + } + } + return getTagApiDeploymentRevisionMethod; + } + + private static volatile io.grpc.MethodDescriptor getListApiDeploymentRevisionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListApiDeploymentRevisions", + requestType = com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListApiDeploymentRevisionsMethod() { + io.grpc.MethodDescriptor getListApiDeploymentRevisionsMethod; + if ((getListApiDeploymentRevisionsMethod = RegistryGrpc.getListApiDeploymentRevisionsMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getListApiDeploymentRevisionsMethod = RegistryGrpc.getListApiDeploymentRevisionsMethod) == null) { + RegistryGrpc.getListApiDeploymentRevisionsMethod = getListApiDeploymentRevisionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApiDeploymentRevisions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApiDeploymentRevisions")) + .build(); + } + } + } + return getListApiDeploymentRevisionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getRollbackApiDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RollbackApiDeployment", + requestType = com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRollbackApiDeploymentMethod() { + io.grpc.MethodDescriptor getRollbackApiDeploymentMethod; + if ((getRollbackApiDeploymentMethod = RegistryGrpc.getRollbackApiDeploymentMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getRollbackApiDeploymentMethod = RegistryGrpc.getRollbackApiDeploymentMethod) == null) { + RegistryGrpc.getRollbackApiDeploymentMethod = getRollbackApiDeploymentMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RollbackApiDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("RollbackApiDeployment")) + .build(); + } + } + } + return getRollbackApiDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteApiDeploymentRevisionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteApiDeploymentRevision", + requestType = com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteApiDeploymentRevisionMethod() { + io.grpc.MethodDescriptor getDeleteApiDeploymentRevisionMethod; + if ((getDeleteApiDeploymentRevisionMethod = RegistryGrpc.getDeleteApiDeploymentRevisionMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getDeleteApiDeploymentRevisionMethod = RegistryGrpc.getDeleteApiDeploymentRevisionMethod) == null) { + RegistryGrpc.getDeleteApiDeploymentRevisionMethod = getDeleteApiDeploymentRevisionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApiDeploymentRevision")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApiDeploymentRevision")) + .build(); + } + } + } + return getDeleteApiDeploymentRevisionMethod; + } + + private static volatile io.grpc.MethodDescriptor getListArtifactsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListArtifacts", + requestType = com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListArtifactsMethod() { + io.grpc.MethodDescriptor getListArtifactsMethod; + if ((getListArtifactsMethod = RegistryGrpc.getListArtifactsMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getListArtifactsMethod = RegistryGrpc.getListArtifactsMethod) == null) { + RegistryGrpc.getListArtifactsMethod = getListArtifactsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListArtifacts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListArtifacts")) + .build(); + } + } + } + return getListArtifactsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetArtifactMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetArtifact", + requestType = com.google.cloud.apigeeregistry.v1.GetArtifactRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.Artifact.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetArtifactMethod() { + io.grpc.MethodDescriptor getGetArtifactMethod; + if ((getGetArtifactMethod = RegistryGrpc.getGetArtifactMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getGetArtifactMethod = RegistryGrpc.getGetArtifactMethod) == null) { + RegistryGrpc.getGetArtifactMethod = getGetArtifactMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetArtifact")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.GetArtifactRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetArtifact")) + .build(); + } + } + } + return getGetArtifactMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetArtifactContentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetArtifactContents", + requestType = com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.class, + responseType = com.google.api.HttpBody.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetArtifactContentsMethod() { + io.grpc.MethodDescriptor getGetArtifactContentsMethod; + if ((getGetArtifactContentsMethod = RegistryGrpc.getGetArtifactContentsMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getGetArtifactContentsMethod = RegistryGrpc.getGetArtifactContentsMethod) == null) { + RegistryGrpc.getGetArtifactContentsMethod = getGetArtifactContentsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetArtifactContents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.HttpBody.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetArtifactContents")) + .build(); + } + } + } + return getGetArtifactContentsMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateArtifactMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateArtifact", + requestType = com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.Artifact.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateArtifactMethod() { + io.grpc.MethodDescriptor getCreateArtifactMethod; + if ((getCreateArtifactMethod = RegistryGrpc.getCreateArtifactMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getCreateArtifactMethod = RegistryGrpc.getCreateArtifactMethod) == null) { + RegistryGrpc.getCreateArtifactMethod = getCreateArtifactMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateArtifact")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("CreateArtifact")) + .build(); + } + } + } + return getCreateArtifactMethod; + } + + private static volatile io.grpc.MethodDescriptor getReplaceArtifactMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReplaceArtifact", + requestType = com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.class, + responseType = com.google.cloud.apigeeregistry.v1.Artifact.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getReplaceArtifactMethod() { + io.grpc.MethodDescriptor getReplaceArtifactMethod; + if ((getReplaceArtifactMethod = RegistryGrpc.getReplaceArtifactMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getReplaceArtifactMethod = RegistryGrpc.getReplaceArtifactMethod) == null) { + RegistryGrpc.getReplaceArtifactMethod = getReplaceArtifactMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReplaceArtifact")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ReplaceArtifact")) + .build(); + } + } + } + return getReplaceArtifactMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteArtifactMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteArtifact", + requestType = com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteArtifactMethod() { + io.grpc.MethodDescriptor getDeleteArtifactMethod; + if ((getDeleteArtifactMethod = RegistryGrpc.getDeleteArtifactMethod) == null) { + synchronized (RegistryGrpc.class) { + if ((getDeleteArtifactMethod = RegistryGrpc.getDeleteArtifactMethod) == null) { + RegistryGrpc.getDeleteArtifactMethod = getDeleteArtifactMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteArtifact")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteArtifact")) + .build(); + } + } + } + return getDeleteArtifactMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static RegistryStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RegistryStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RegistryStub(channel, callOptions); + } + }; + return RegistryStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static RegistryBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RegistryBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RegistryBlockingStub(channel, callOptions); + } + }; + return RegistryBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static RegistryFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RegistryFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RegistryFutureStub(channel, callOptions); + } + }; + return RegistryFutureStub.newStub(factory, channel); + } + + /** + *
+   * The Registry service allows teams to manage descriptions of APIs.
+   * 
+ */ + public static abstract class RegistryImplBase implements io.grpc.BindableService { + + /** + *
+     * Returns matching APIs.
+     * 
+ */ + public void listApis(com.google.cloud.apigeeregistry.v1.ListApisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApisMethod(), responseObserver); + } + + /** + *
+     * Returns a specified API.
+     * 
+ */ + public void getApi(com.google.cloud.apigeeregistry.v1.GetApiRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetApiMethod(), responseObserver); + } + + /** + *
+     * Creates a specified API.
+     * 
+ */ + public void createApi(com.google.cloud.apigeeregistry.v1.CreateApiRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateApiMethod(), responseObserver); + } + + /** + *
+     * Used to modify a specified API.
+     * 
+ */ + public void updateApi(com.google.cloud.apigeeregistry.v1.UpdateApiRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateApiMethod(), responseObserver); + } + + /** + *
+     * Removes a specified API and all of the resources that it
+     * owns.
+     * 
+ */ + public void deleteApi(com.google.cloud.apigeeregistry.v1.DeleteApiRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiMethod(), responseObserver); + } + + /** + *
+     * Returns matching versions.
+     * 
+ */ + public void listApiVersions(com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApiVersionsMethod(), responseObserver); + } + + /** + *
+     * Returns a specified version.
+     * 
+ */ + public void getApiVersion(com.google.cloud.apigeeregistry.v1.GetApiVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetApiVersionMethod(), responseObserver); + } + + /** + *
+     * Creates a specified version.
+     * 
+ */ + public void createApiVersion(com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateApiVersionMethod(), responseObserver); + } + + /** + *
+     * Used to modify a specified version.
+     * 
+ */ + public void updateApiVersion(com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateApiVersionMethod(), responseObserver); + } + + /** + *
+     * Removes a specified version and all of the resources that
+     * it owns.
+     * 
+ */ + public void deleteApiVersion(com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiVersionMethod(), responseObserver); + } + + /** + *
+     * Returns matching specs.
+     * 
+ */ + public void listApiSpecs(com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApiSpecsMethod(), responseObserver); + } + + /** + *
+     * Returns a specified spec.
+     * 
+ */ + public void getApiSpec(com.google.cloud.apigeeregistry.v1.GetApiSpecRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetApiSpecMethod(), responseObserver); + } + + /** + *
+     * Returns the contents of a specified spec.
+     * If specs are stored with GZip compression, the default behavior
+     * is to return the spec uncompressed (the mime_type response field
+     * indicates the exact format returned).
+     * 
+ */ + public void getApiSpecContents(com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetApiSpecContentsMethod(), responseObserver); + } + + /** + *
+     * Creates a specified spec.
+     * 
+ */ + public void createApiSpec(com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateApiSpecMethod(), responseObserver); + } + + /** + *
+     * Used to modify a specified spec.
+     * 
+ */ + public void updateApiSpec(com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateApiSpecMethod(), responseObserver); + } + + /** + *
+     * Removes a specified spec, all revisions, and all child
+     * resources (e.g., artifacts).
+     * 
+ */ + public void deleteApiSpec(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiSpecMethod(), responseObserver); + } + + /** + *
+     * Adds a tag to a specified revision of a spec.
+     * 
+ */ + public void tagApiSpecRevision(com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTagApiSpecRevisionMethod(), responseObserver); + } + + /** + *
+     * Lists all revisions of a spec.
+     * Revisions are returned in descending order of revision creation time.
+     * 
+ */ + public void listApiSpecRevisions(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApiSpecRevisionsMethod(), responseObserver); + } + + /** + *
+     * Sets the current revision to a specified prior revision.
+     * Note that this creates a new revision with a new revision ID.
+     * 
+ */ + public void rollbackApiSpec(com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRollbackApiSpecMethod(), responseObserver); + } + + /** + *
+     * Deletes a revision of a spec.
+     * 
+ */ + public void deleteApiSpecRevision(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiSpecRevisionMethod(), responseObserver); + } + + /** + *
+     * Returns matching deployments.
+     * 
+ */ + public void listApiDeployments(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApiDeploymentsMethod(), responseObserver); + } + + /** + *
+     * Returns a specified deployment.
+     * 
+ */ + public void getApiDeployment(com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetApiDeploymentMethod(), responseObserver); + } + + /** + *
+     * Creates a specified deployment.
+     * 
+ */ + public void createApiDeployment(com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateApiDeploymentMethod(), responseObserver); + } + + /** + *
+     * Used to modify a specified deployment.
+     * 
+ */ + public void updateApiDeployment(com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateApiDeploymentMethod(), responseObserver); + } + + /** + *
+     * Removes a specified deployment, all revisions, and all
+     * child resources (e.g., artifacts).
+     * 
+ */ + public void deleteApiDeployment(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiDeploymentMethod(), responseObserver); + } + + /** + *
+     * Adds a tag to a specified revision of a
+     * deployment.
+     * 
+ */ + public void tagApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTagApiDeploymentRevisionMethod(), responseObserver); + } + + /** + *
+     * Lists all revisions of a deployment.
+     * Revisions are returned in descending order of revision creation time.
+     * 
+ */ + public void listApiDeploymentRevisions(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApiDeploymentRevisionsMethod(), responseObserver); + } + + /** + *
+     * Sets the current revision to a specified prior
+     * revision. Note that this creates a new revision with a new revision ID.
+     * 
+ */ + public void rollbackApiDeployment(com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRollbackApiDeploymentMethod(), responseObserver); + } + + /** + *
+     * Deletes a revision of a deployment.
+     * 
+ */ + public void deleteApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiDeploymentRevisionMethod(), responseObserver); + } + + /** + *
+     * Returns matching artifacts.
+     * 
+ */ + public void listArtifacts(com.google.cloud.apigeeregistry.v1.ListArtifactsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListArtifactsMethod(), responseObserver); + } + + /** + *
+     * Returns a specified artifact.
+     * 
+ */ + public void getArtifact(com.google.cloud.apigeeregistry.v1.GetArtifactRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetArtifactMethod(), responseObserver); + } + + /** + *
+     * Returns the contents of a specified artifact.
+     * If artifacts are stored with GZip compression, the default behavior
+     * is to return the artifact uncompressed (the mime_type response field
+     * indicates the exact format returned).
+     * 
+ */ + public void getArtifactContents(com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetArtifactContentsMethod(), responseObserver); + } + + /** + *
+     * Creates a specified artifact.
+     * 
+ */ + public void createArtifact(com.google.cloud.apigeeregistry.v1.CreateArtifactRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateArtifactMethod(), responseObserver); + } + + /** + *
+     * Used to replace a specified artifact.
+     * 
+ */ + public void replaceArtifact(com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReplaceArtifactMethod(), responseObserver); + } + + /** + *
+     * Removes a specified artifact.
+     * 
+ */ + public void deleteArtifact(com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteArtifactMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListApisMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.ListApisRequest, + com.google.cloud.apigeeregistry.v1.ListApisResponse>( + this, METHODID_LIST_APIS))) + .addMethod( + getGetApiMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.GetApiRequest, + com.google.cloud.apigeeregistry.v1.Api>( + this, METHODID_GET_API))) + .addMethod( + getCreateApiMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.CreateApiRequest, + com.google.cloud.apigeeregistry.v1.Api>( + this, METHODID_CREATE_API))) + .addMethod( + getUpdateApiMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.UpdateApiRequest, + com.google.cloud.apigeeregistry.v1.Api>( + this, METHODID_UPDATE_API))) + .addMethod( + getDeleteApiMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.DeleteApiRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_API))) + .addMethod( + getListApiVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest, + com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse>( + this, METHODID_LIST_API_VERSIONS))) + .addMethod( + getGetApiVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.GetApiVersionRequest, + com.google.cloud.apigeeregistry.v1.ApiVersion>( + this, METHODID_GET_API_VERSION))) + .addMethod( + getCreateApiVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest, + com.google.cloud.apigeeregistry.v1.ApiVersion>( + this, METHODID_CREATE_API_VERSION))) + .addMethod( + getUpdateApiVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest, + com.google.cloud.apigeeregistry.v1.ApiVersion>( + this, METHODID_UPDATE_API_VERSION))) + .addMethod( + getDeleteApiVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_API_VERSION))) + .addMethod( + getListApiSpecsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest, + com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse>( + this, METHODID_LIST_API_SPECS))) + .addMethod( + getGetApiSpecMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.GetApiSpecRequest, + com.google.cloud.apigeeregistry.v1.ApiSpec>( + this, METHODID_GET_API_SPEC))) + .addMethod( + getGetApiSpecContentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest, + com.google.api.HttpBody>( + this, METHODID_GET_API_SPEC_CONTENTS))) + .addMethod( + getCreateApiSpecMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest, + com.google.cloud.apigeeregistry.v1.ApiSpec>( + this, METHODID_CREATE_API_SPEC))) + .addMethod( + getUpdateApiSpecMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest, + com.google.cloud.apigeeregistry.v1.ApiSpec>( + this, METHODID_UPDATE_API_SPEC))) + .addMethod( + getDeleteApiSpecMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_API_SPEC))) + .addMethod( + getTagApiSpecRevisionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest, + com.google.cloud.apigeeregistry.v1.ApiSpec>( + this, METHODID_TAG_API_SPEC_REVISION))) + .addMethod( + getListApiSpecRevisionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest, + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse>( + this, METHODID_LIST_API_SPEC_REVISIONS))) + .addMethod( + getRollbackApiSpecMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest, + com.google.cloud.apigeeregistry.v1.ApiSpec>( + this, METHODID_ROLLBACK_API_SPEC))) + .addMethod( + getDeleteApiSpecRevisionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest, + com.google.cloud.apigeeregistry.v1.ApiSpec>( + this, METHODID_DELETE_API_SPEC_REVISION))) + .addMethod( + getListApiDeploymentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest, + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse>( + this, METHODID_LIST_API_DEPLOYMENTS))) + .addMethod( + getGetApiDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest, + com.google.cloud.apigeeregistry.v1.ApiDeployment>( + this, METHODID_GET_API_DEPLOYMENT))) + .addMethod( + getCreateApiDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest, + com.google.cloud.apigeeregistry.v1.ApiDeployment>( + this, METHODID_CREATE_API_DEPLOYMENT))) + .addMethod( + getUpdateApiDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest, + com.google.cloud.apigeeregistry.v1.ApiDeployment>( + this, METHODID_UPDATE_API_DEPLOYMENT))) + .addMethod( + getDeleteApiDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_API_DEPLOYMENT))) + .addMethod( + getTagApiDeploymentRevisionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest, + com.google.cloud.apigeeregistry.v1.ApiDeployment>( + this, METHODID_TAG_API_DEPLOYMENT_REVISION))) + .addMethod( + getListApiDeploymentRevisionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest, + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse>( + this, METHODID_LIST_API_DEPLOYMENT_REVISIONS))) + .addMethod( + getRollbackApiDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest, + com.google.cloud.apigeeregistry.v1.ApiDeployment>( + this, METHODID_ROLLBACK_API_DEPLOYMENT))) + .addMethod( + getDeleteApiDeploymentRevisionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest, + com.google.cloud.apigeeregistry.v1.ApiDeployment>( + this, METHODID_DELETE_API_DEPLOYMENT_REVISION))) + .addMethod( + getListArtifactsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.ListArtifactsRequest, + com.google.cloud.apigeeregistry.v1.ListArtifactsResponse>( + this, METHODID_LIST_ARTIFACTS))) + .addMethod( + getGetArtifactMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.GetArtifactRequest, + com.google.cloud.apigeeregistry.v1.Artifact>( + this, METHODID_GET_ARTIFACT))) + .addMethod( + getGetArtifactContentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest, + com.google.api.HttpBody>( + this, METHODID_GET_ARTIFACT_CONTENTS))) + .addMethod( + getCreateArtifactMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.CreateArtifactRequest, + com.google.cloud.apigeeregistry.v1.Artifact>( + this, METHODID_CREATE_ARTIFACT))) + .addMethod( + getReplaceArtifactMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest, + com.google.cloud.apigeeregistry.v1.Artifact>( + this, METHODID_REPLACE_ARTIFACT))) + .addMethod( + getDeleteArtifactMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_ARTIFACT))) + .build(); + } + } + + /** + *
+   * The Registry service allows teams to manage descriptions of APIs.
+   * 
+ */ + public static final class RegistryStub extends io.grpc.stub.AbstractAsyncStub { + private RegistryStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RegistryStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RegistryStub(channel, callOptions); + } + + /** + *
+     * Returns matching APIs.
+     * 
+ */ + public void listApis(com.google.cloud.apigeeregistry.v1.ListApisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListApisMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns a specified API.
+     * 
+ */ + public void getApi(com.google.cloud.apigeeregistry.v1.GetApiRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetApiMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a specified API.
+     * 
+ */ + public void createApi(com.google.cloud.apigeeregistry.v1.CreateApiRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateApiMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Used to modify a specified API.
+     * 
+ */ + public void updateApi(com.google.cloud.apigeeregistry.v1.UpdateApiRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateApiMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Removes a specified API and all of the resources that it
+     * owns.
+     * 
+ */ + public void deleteApi(com.google.cloud.apigeeregistry.v1.DeleteApiRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteApiMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns matching versions.
+     * 
+ */ + public void listApiVersions(com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListApiVersionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns a specified version.
+     * 
+ */ + public void getApiVersion(com.google.cloud.apigeeregistry.v1.GetApiVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetApiVersionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a specified version.
+     * 
+ */ + public void createApiVersion(com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateApiVersionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Used to modify a specified version.
+     * 
+ */ + public void updateApiVersion(com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateApiVersionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Removes a specified version and all of the resources that
+     * it owns.
+     * 
+ */ + public void deleteApiVersion(com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteApiVersionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns matching specs.
+     * 
+ */ + public void listApiSpecs(com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListApiSpecsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns a specified spec.
+     * 
+ */ + public void getApiSpec(com.google.cloud.apigeeregistry.v1.GetApiSpecRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetApiSpecMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns the contents of a specified spec.
+     * If specs are stored with GZip compression, the default behavior
+     * is to return the spec uncompressed (the mime_type response field
+     * indicates the exact format returned).
+     * 
+ */ + public void getApiSpecContents(com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetApiSpecContentsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a specified spec.
+     * 
+ */ + public void createApiSpec(com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateApiSpecMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Used to modify a specified spec.
+     * 
+ */ + public void updateApiSpec(com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateApiSpecMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Removes a specified spec, all revisions, and all child
+     * resources (e.g., artifacts).
+     * 
+ */ + public void deleteApiSpec(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteApiSpecMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Adds a tag to a specified revision of a spec.
+     * 
+ */ + public void tagApiSpecRevision(com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTagApiSpecRevisionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists all revisions of a spec.
+     * Revisions are returned in descending order of revision creation time.
+     * 
+ */ + public void listApiSpecRevisions(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListApiSpecRevisionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Sets the current revision to a specified prior revision.
+     * Note that this creates a new revision with a new revision ID.
+     * 
+ */ + public void rollbackApiSpec(com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRollbackApiSpecMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a revision of a spec.
+     * 
+ */ + public void deleteApiSpecRevision(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteApiSpecRevisionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns matching deployments.
+     * 
+ */ + public void listApiDeployments(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListApiDeploymentsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns a specified deployment.
+     * 
+ */ + public void getApiDeployment(com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetApiDeploymentMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a specified deployment.
+     * 
+ */ + public void createApiDeployment(com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateApiDeploymentMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Used to modify a specified deployment.
+     * 
+ */ + public void updateApiDeployment(com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateApiDeploymentMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Removes a specified deployment, all revisions, and all
+     * child resources (e.g., artifacts).
+     * 
+ */ + public void deleteApiDeployment(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteApiDeploymentMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Adds a tag to a specified revision of a
+     * deployment.
+     * 
+ */ + public void tagApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTagApiDeploymentRevisionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists all revisions of a deployment.
+     * Revisions are returned in descending order of revision creation time.
+     * 
+ */ + public void listApiDeploymentRevisions(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListApiDeploymentRevisionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Sets the current revision to a specified prior
+     * revision. Note that this creates a new revision with a new revision ID.
+     * 
+ */ + public void rollbackApiDeployment(com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRollbackApiDeploymentMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a revision of a deployment.
+     * 
+ */ + public void deleteApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteApiDeploymentRevisionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns matching artifacts.
+     * 
+ */ + public void listArtifacts(com.google.cloud.apigeeregistry.v1.ListArtifactsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListArtifactsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns a specified artifact.
+     * 
+ */ + public void getArtifact(com.google.cloud.apigeeregistry.v1.GetArtifactRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetArtifactMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns the contents of a specified artifact.
+     * If artifacts are stored with GZip compression, the default behavior
+     * is to return the artifact uncompressed (the mime_type response field
+     * indicates the exact format returned).
+     * 
+ */ + public void getArtifactContents(com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetArtifactContentsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a specified artifact.
+     * 
+ */ + public void createArtifact(com.google.cloud.apigeeregistry.v1.CreateArtifactRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateArtifactMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Used to replace a specified artifact.
+     * 
+ */ + public void replaceArtifact(com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReplaceArtifactMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Removes a specified artifact.
+     * 
+ */ + public void deleteArtifact(com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteArtifactMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * The Registry service allows teams to manage descriptions of APIs.
+   * 
+ */ + public static final class RegistryBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private RegistryBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RegistryBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RegistryBlockingStub(channel, callOptions); + } + + /** + *
+     * Returns matching APIs.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ListApisResponse listApis(com.google.cloud.apigeeregistry.v1.ListApisRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListApisMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns a specified API.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.Api getApi(com.google.cloud.apigeeregistry.v1.GetApiRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetApiMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a specified API.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.Api createApi(com.google.cloud.apigeeregistry.v1.CreateApiRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateApiMethod(), getCallOptions(), request); + } + + /** + *
+     * Used to modify a specified API.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.Api updateApi(com.google.cloud.apigeeregistry.v1.UpdateApiRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateApiMethod(), getCallOptions(), request); + } + + /** + *
+     * Removes a specified API and all of the resources that it
+     * owns.
+     * 
+ */ + public com.google.protobuf.Empty deleteApi(com.google.cloud.apigeeregistry.v1.DeleteApiRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteApiMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns matching versions.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse listApiVersions(com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListApiVersionsMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns a specified version.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion(com.google.cloud.apigeeregistry.v1.GetApiVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetApiVersionMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a specified version.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiVersion createApiVersion(com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateApiVersionMethod(), getCallOptions(), request); + } + + /** + *
+     * Used to modify a specified version.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiVersion updateApiVersion(com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateApiVersionMethod(), getCallOptions(), request); + } + + /** + *
+     * Removes a specified version and all of the resources that
+     * it owns.
+     * 
+ */ + public com.google.protobuf.Empty deleteApiVersion(com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteApiVersionMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns matching specs.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse listApiSpecs(com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListApiSpecsMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns a specified spec.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec(com.google.cloud.apigeeregistry.v1.GetApiSpecRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetApiSpecMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns the contents of a specified spec.
+     * If specs are stored with GZip compression, the default behavior
+     * is to return the spec uncompressed (the mime_type response field
+     * indicates the exact format returned).
+     * 
+ */ + public com.google.api.HttpBody getApiSpecContents(com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetApiSpecContentsMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a specified spec.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiSpec createApiSpec(com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateApiSpecMethod(), getCallOptions(), request); + } + + /** + *
+     * Used to modify a specified spec.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiSpec updateApiSpec(com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateApiSpecMethod(), getCallOptions(), request); + } + + /** + *
+     * Removes a specified spec, all revisions, and all child
+     * resources (e.g., artifacts).
+     * 
+ */ + public com.google.protobuf.Empty deleteApiSpec(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteApiSpecMethod(), getCallOptions(), request); + } + + /** + *
+     * Adds a tag to a specified revision of a spec.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiSpec tagApiSpecRevision(com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getTagApiSpecRevisionMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists all revisions of a spec.
+     * Revisions are returned in descending order of revision creation time.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse listApiSpecRevisions(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListApiSpecRevisionsMethod(), getCallOptions(), request); + } + + /** + *
+     * Sets the current revision to a specified prior revision.
+     * Note that this creates a new revision with a new revision ID.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiSpec rollbackApiSpec(com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRollbackApiSpecMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a revision of a spec.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiSpec deleteApiSpecRevision(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteApiSpecRevisionMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns matching deployments.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse listApiDeployments(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListApiDeploymentsMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns a specified deployment.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment(com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetApiDeploymentMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a specified deployment.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment createApiDeployment(com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateApiDeploymentMethod(), getCallOptions(), request); + } + + /** + *
+     * Used to modify a specified deployment.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment updateApiDeployment(com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateApiDeploymentMethod(), getCallOptions(), request); + } + + /** + *
+     * Removes a specified deployment, all revisions, and all
+     * child resources (e.g., artifacts).
+     * 
+ */ + public com.google.protobuf.Empty deleteApiDeployment(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteApiDeploymentMethod(), getCallOptions(), request); + } + + /** + *
+     * Adds a tag to a specified revision of a
+     * deployment.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment tagApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getTagApiDeploymentRevisionMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists all revisions of a deployment.
+     * Revisions are returned in descending order of revision creation time.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse listApiDeploymentRevisions(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListApiDeploymentRevisionsMethod(), getCallOptions(), request); + } + + /** + *
+     * Sets the current revision to a specified prior
+     * revision. Note that this creates a new revision with a new revision ID.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment rollbackApiDeployment(com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRollbackApiDeploymentMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a revision of a deployment.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment deleteApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteApiDeploymentRevisionMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns matching artifacts.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.ListArtifactsResponse listArtifacts(com.google.cloud.apigeeregistry.v1.ListArtifactsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListArtifactsMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns a specified artifact.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.Artifact getArtifact(com.google.cloud.apigeeregistry.v1.GetArtifactRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetArtifactMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns the contents of a specified artifact.
+     * If artifacts are stored with GZip compression, the default behavior
+     * is to return the artifact uncompressed (the mime_type response field
+     * indicates the exact format returned).
+     * 
+ */ + public com.google.api.HttpBody getArtifactContents(com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetArtifactContentsMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a specified artifact.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.Artifact createArtifact(com.google.cloud.apigeeregistry.v1.CreateArtifactRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateArtifactMethod(), getCallOptions(), request); + } + + /** + *
+     * Used to replace a specified artifact.
+     * 
+ */ + public com.google.cloud.apigeeregistry.v1.Artifact replaceArtifact(com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReplaceArtifactMethod(), getCallOptions(), request); + } + + /** + *
+     * Removes a specified artifact.
+     * 
+ */ + public com.google.protobuf.Empty deleteArtifact(com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteArtifactMethod(), getCallOptions(), request); + } + } + + /** + *
+   * The Registry service allows teams to manage descriptions of APIs.
+   * 
+ */ + public static final class RegistryFutureStub extends io.grpc.stub.AbstractFutureStub { + private RegistryFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RegistryFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RegistryFutureStub(channel, callOptions); + } + + /** + *
+     * Returns matching APIs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listApis( + com.google.cloud.apigeeregistry.v1.ListApisRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListApisMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns a specified API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getApi( + com.google.cloud.apigeeregistry.v1.GetApiRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetApiMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a specified API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createApi( + com.google.cloud.apigeeregistry.v1.CreateApiRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateApiMethod(), getCallOptions()), request); + } + + /** + *
+     * Used to modify a specified API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateApi( + com.google.cloud.apigeeregistry.v1.UpdateApiRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateApiMethod(), getCallOptions()), request); + } + + /** + *
+     * Removes a specified API and all of the resources that it
+     * owns.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteApi( + com.google.cloud.apigeeregistry.v1.DeleteApiRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteApiMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns matching versions.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listApiVersions( + com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListApiVersionsMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns a specified version.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getApiVersion( + com.google.cloud.apigeeregistry.v1.GetApiVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetApiVersionMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a specified version.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createApiVersion( + com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateApiVersionMethod(), getCallOptions()), request); + } + + /** + *
+     * Used to modify a specified version.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateApiVersion( + com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateApiVersionMethod(), getCallOptions()), request); + } + + /** + *
+     * Removes a specified version and all of the resources that
+     * it owns.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteApiVersion( + com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteApiVersionMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns matching specs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listApiSpecs( + com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListApiSpecsMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns a specified spec.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getApiSpec( + com.google.cloud.apigeeregistry.v1.GetApiSpecRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetApiSpecMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns the contents of a specified spec.
+     * If specs are stored with GZip compression, the default behavior
+     * is to return the spec uncompressed (the mime_type response field
+     * indicates the exact format returned).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getApiSpecContents( + com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetApiSpecContentsMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a specified spec.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createApiSpec( + com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateApiSpecMethod(), getCallOptions()), request); + } + + /** + *
+     * Used to modify a specified spec.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateApiSpec( + com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateApiSpecMethod(), getCallOptions()), request); + } + + /** + *
+     * Removes a specified spec, all revisions, and all child
+     * resources (e.g., artifacts).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteApiSpec( + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteApiSpecMethod(), getCallOptions()), request); + } + + /** + *
+     * Adds a tag to a specified revision of a spec.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture tagApiSpecRevision( + com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getTagApiSpecRevisionMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists all revisions of a spec.
+     * Revisions are returned in descending order of revision creation time.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listApiSpecRevisions( + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListApiSpecRevisionsMethod(), getCallOptions()), request); + } + + /** + *
+     * Sets the current revision to a specified prior revision.
+     * Note that this creates a new revision with a new revision ID.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture rollbackApiSpec( + com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRollbackApiSpecMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a revision of a spec.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteApiSpecRevision( + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteApiSpecRevisionMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns matching deployments.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listApiDeployments( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListApiDeploymentsMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns a specified deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getApiDeployment( + com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetApiDeploymentMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a specified deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createApiDeployment( + com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateApiDeploymentMethod(), getCallOptions()), request); + } + + /** + *
+     * Used to modify a specified deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateApiDeployment( + com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateApiDeploymentMethod(), getCallOptions()), request); + } + + /** + *
+     * Removes a specified deployment, all revisions, and all
+     * child resources (e.g., artifacts).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteApiDeployment( + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteApiDeploymentMethod(), getCallOptions()), request); + } + + /** + *
+     * Adds a tag to a specified revision of a
+     * deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture tagApiDeploymentRevision( + com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getTagApiDeploymentRevisionMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists all revisions of a deployment.
+     * Revisions are returned in descending order of revision creation time.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listApiDeploymentRevisions( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListApiDeploymentRevisionsMethod(), getCallOptions()), request); + } + + /** + *
+     * Sets the current revision to a specified prior
+     * revision. Note that this creates a new revision with a new revision ID.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture rollbackApiDeployment( + com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRollbackApiDeploymentMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a revision of a deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteApiDeploymentRevision( + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteApiDeploymentRevisionMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns matching artifacts.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listArtifacts( + com.google.cloud.apigeeregistry.v1.ListArtifactsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListArtifactsMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns a specified artifact.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getArtifact( + com.google.cloud.apigeeregistry.v1.GetArtifactRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetArtifactMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns the contents of a specified artifact.
+     * If artifacts are stored with GZip compression, the default behavior
+     * is to return the artifact uncompressed (the mime_type response field
+     * indicates the exact format returned).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getArtifactContents( + com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetArtifactContentsMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a specified artifact.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createArtifact( + com.google.cloud.apigeeregistry.v1.CreateArtifactRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateArtifactMethod(), getCallOptions()), request); + } + + /** + *
+     * Used to replace a specified artifact.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture replaceArtifact( + com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReplaceArtifactMethod(), getCallOptions()), request); + } + + /** + *
+     * Removes a specified artifact.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteArtifact( + com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteArtifactMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_APIS = 0; + private static final int METHODID_GET_API = 1; + private static final int METHODID_CREATE_API = 2; + private static final int METHODID_UPDATE_API = 3; + private static final int METHODID_DELETE_API = 4; + private static final int METHODID_LIST_API_VERSIONS = 5; + private static final int METHODID_GET_API_VERSION = 6; + private static final int METHODID_CREATE_API_VERSION = 7; + private static final int METHODID_UPDATE_API_VERSION = 8; + private static final int METHODID_DELETE_API_VERSION = 9; + private static final int METHODID_LIST_API_SPECS = 10; + private static final int METHODID_GET_API_SPEC = 11; + private static final int METHODID_GET_API_SPEC_CONTENTS = 12; + private static final int METHODID_CREATE_API_SPEC = 13; + private static final int METHODID_UPDATE_API_SPEC = 14; + private static final int METHODID_DELETE_API_SPEC = 15; + private static final int METHODID_TAG_API_SPEC_REVISION = 16; + private static final int METHODID_LIST_API_SPEC_REVISIONS = 17; + private static final int METHODID_ROLLBACK_API_SPEC = 18; + private static final int METHODID_DELETE_API_SPEC_REVISION = 19; + private static final int METHODID_LIST_API_DEPLOYMENTS = 20; + private static final int METHODID_GET_API_DEPLOYMENT = 21; + private static final int METHODID_CREATE_API_DEPLOYMENT = 22; + private static final int METHODID_UPDATE_API_DEPLOYMENT = 23; + private static final int METHODID_DELETE_API_DEPLOYMENT = 24; + private static final int METHODID_TAG_API_DEPLOYMENT_REVISION = 25; + private static final int METHODID_LIST_API_DEPLOYMENT_REVISIONS = 26; + private static final int METHODID_ROLLBACK_API_DEPLOYMENT = 27; + private static final int METHODID_DELETE_API_DEPLOYMENT_REVISION = 28; + private static final int METHODID_LIST_ARTIFACTS = 29; + private static final int METHODID_GET_ARTIFACT = 30; + private static final int METHODID_GET_ARTIFACT_CONTENTS = 31; + private static final int METHODID_CREATE_ARTIFACT = 32; + private static final int METHODID_REPLACE_ARTIFACT = 33; + private static final int METHODID_DELETE_ARTIFACT = 34; + + 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 RegistryImplBase serviceImpl; + private final int methodId; + + MethodHandlers(RegistryImplBase 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_LIST_APIS: + serviceImpl.listApis((com.google.cloud.apigeeregistry.v1.ListApisRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_API: + serviceImpl.getApi((com.google.cloud.apigeeregistry.v1.GetApiRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_API: + serviceImpl.createApi((com.google.cloud.apigeeregistry.v1.CreateApiRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_API: + serviceImpl.updateApi((com.google.cloud.apigeeregistry.v1.UpdateApiRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_API: + serviceImpl.deleteApi((com.google.cloud.apigeeregistry.v1.DeleteApiRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_API_VERSIONS: + serviceImpl.listApiVersions((com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_API_VERSION: + serviceImpl.getApiVersion((com.google.cloud.apigeeregistry.v1.GetApiVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_API_VERSION: + serviceImpl.createApiVersion((com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_API_VERSION: + serviceImpl.updateApiVersion((com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_API_VERSION: + serviceImpl.deleteApiVersion((com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_API_SPECS: + serviceImpl.listApiSpecs((com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_API_SPEC: + serviceImpl.getApiSpec((com.google.cloud.apigeeregistry.v1.GetApiSpecRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_API_SPEC_CONTENTS: + serviceImpl.getApiSpecContents((com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_API_SPEC: + serviceImpl.createApiSpec((com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_API_SPEC: + serviceImpl.updateApiSpec((com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_API_SPEC: + serviceImpl.deleteApiSpec((com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_TAG_API_SPEC_REVISION: + serviceImpl.tagApiSpecRevision((com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_API_SPEC_REVISIONS: + serviceImpl.listApiSpecRevisions((com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ROLLBACK_API_SPEC: + serviceImpl.rollbackApiSpec((com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_API_SPEC_REVISION: + serviceImpl.deleteApiSpecRevision((com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_API_DEPLOYMENTS: + serviceImpl.listApiDeployments((com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_API_DEPLOYMENT: + serviceImpl.getApiDeployment((com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_API_DEPLOYMENT: + serviceImpl.createApiDeployment((com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_API_DEPLOYMENT: + serviceImpl.updateApiDeployment((com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_API_DEPLOYMENT: + serviceImpl.deleteApiDeployment((com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_TAG_API_DEPLOYMENT_REVISION: + serviceImpl.tagApiDeploymentRevision((com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_API_DEPLOYMENT_REVISIONS: + serviceImpl.listApiDeploymentRevisions((com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ROLLBACK_API_DEPLOYMENT: + serviceImpl.rollbackApiDeployment((com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_API_DEPLOYMENT_REVISION: + serviceImpl.deleteApiDeploymentRevision((com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ARTIFACTS: + serviceImpl.listArtifacts((com.google.cloud.apigeeregistry.v1.ListArtifactsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ARTIFACT: + serviceImpl.getArtifact((com.google.cloud.apigeeregistry.v1.GetArtifactRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ARTIFACT_CONTENTS: + serviceImpl.getArtifactContents((com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_ARTIFACT: + serviceImpl.createArtifact((com.google.cloud.apigeeregistry.v1.CreateArtifactRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REPLACE_ARTIFACT: + serviceImpl.replaceArtifact((com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ARTIFACT: + serviceImpl.deleteArtifact((com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest) 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(); + } + } + } + + private static abstract class RegistryBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + RegistryBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Registry"); + } + } + + private static final class RegistryFileDescriptorSupplier + extends RegistryBaseDescriptorSupplier { + RegistryFileDescriptorSupplier() {} + } + + private static final class RegistryMethodDescriptorSupplier + extends RegistryBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + RegistryMethodDescriptorSupplier(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 (RegistryGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new RegistryFileDescriptorSupplier()) + .addMethod(getListApisMethod()) + .addMethod(getGetApiMethod()) + .addMethod(getCreateApiMethod()) + .addMethod(getUpdateApiMethod()) + .addMethod(getDeleteApiMethod()) + .addMethod(getListApiVersionsMethod()) + .addMethod(getGetApiVersionMethod()) + .addMethod(getCreateApiVersionMethod()) + .addMethod(getUpdateApiVersionMethod()) + .addMethod(getDeleteApiVersionMethod()) + .addMethod(getListApiSpecsMethod()) + .addMethod(getGetApiSpecMethod()) + .addMethod(getGetApiSpecContentsMethod()) + .addMethod(getCreateApiSpecMethod()) + .addMethod(getUpdateApiSpecMethod()) + .addMethod(getDeleteApiSpecMethod()) + .addMethod(getTagApiSpecRevisionMethod()) + .addMethod(getListApiSpecRevisionsMethod()) + .addMethod(getRollbackApiSpecMethod()) + .addMethod(getDeleteApiSpecRevisionMethod()) + .addMethod(getListApiDeploymentsMethod()) + .addMethod(getGetApiDeploymentMethod()) + .addMethod(getCreateApiDeploymentMethod()) + .addMethod(getUpdateApiDeploymentMethod()) + .addMethod(getDeleteApiDeploymentMethod()) + .addMethod(getTagApiDeploymentRevisionMethod()) + .addMethod(getListApiDeploymentRevisionsMethod()) + .addMethod(getRollbackApiDeploymentMethod()) + .addMethod(getDeleteApiDeploymentRevisionMethod()) + .addMethod(getListArtifactsMethod()) + .addMethod(getGetArtifactMethod()) + .addMethod(getGetArtifactContentsMethod()) + .addMethod(getCreateArtifactMethod()) + .addMethod(getReplaceArtifactMethod()) + .addMethod(getDeleteArtifactMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Api.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Api.java new file mode 100644 index 000000000000..d69491740f27 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Api.java @@ -0,0 +1,2694 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_models.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * A top-level description of an API.
+ * Produced by producers and are commitments to provide services.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.Api} + */ +public final class Api extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.Api) + ApiOrBuilder { +private static final long serialVersionUID = 0L; + // Use Api.newBuilder() to construct. + private Api(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Api() { + name_ = ""; + displayName_ = ""; + description_ = ""; + availability_ = ""; + recommendedVersion_ = ""; + recommendedDeployment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Api(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Api( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + availability_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + recommendedVersion_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + recommendedDeployment_ = s; + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } + case 82: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + annotations_ = com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + annotations__ = input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + annotations_.getMutableMap().put( + annotations__.getKey(), annotations__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 9: + return internalGetLabels(); + case 10: + return internalGetAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.Api.class, com.google.cloud.apigeeregistry.v1.Api.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @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; + } + } + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @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; + private volatile java.lang.Object description_; + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. Creation 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 createTime_ != null; + } + /** + *
+   * Output only. Creation 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. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. Last 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 updateTime_ != null; + } + /** + *
+   * Output only. Last 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. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int AVAILABILITY_FIELD_NUMBER = 6; + private volatile java.lang.Object availability_; + /** + *
+   * A user-definable description of the availability of this service.
+   * Format: free-form, but we expect single words that describe availability,
+   * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
+   * 
+ * + * string availability = 6; + * @return The availability. + */ + @java.lang.Override + public java.lang.String getAvailability() { + java.lang.Object ref = availability_; + 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(); + availability_ = s; + return s; + } + } + /** + *
+   * A user-definable description of the availability of this service.
+   * Format: free-form, but we expect single words that describe availability,
+   * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
+   * 
+ * + * string availability = 6; + * @return The bytes for availability. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAvailabilityBytes() { + java.lang.Object ref = availability_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + availability_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECOMMENDED_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object recommendedVersion_; + /** + *
+   * The recommended version of the API.
+   * Format: `apis/{api}/versions/{version}`
+   * 
+ * + * string recommended_version = 7 [(.google.api.resource_reference) = { ... } + * @return The recommendedVersion. + */ + @java.lang.Override + public java.lang.String getRecommendedVersion() { + java.lang.Object ref = recommendedVersion_; + 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(); + recommendedVersion_ = s; + return s; + } + } + /** + *
+   * The recommended version of the API.
+   * Format: `apis/{api}/versions/{version}`
+   * 
+ * + * string recommended_version = 7 [(.google.api.resource_reference) = { ... } + * @return The bytes for recommendedVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRecommendedVersionBytes() { + java.lang.Object ref = recommendedVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + recommendedVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECOMMENDED_DEPLOYMENT_FIELD_NUMBER = 8; + private volatile java.lang.Object recommendedDeployment_; + /** + *
+   * The recommended deployment of the API.
+   * Format: `apis/{api}/deployments/{deployment}`
+   * 
+ * + * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } + * @return The recommendedDeployment. + */ + @java.lang.Override + public java.lang.String getRecommendedDeployment() { + java.lang.Object ref = recommendedDeployment_; + 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(); + recommendedDeployment_ = s; + return s; + } + } + /** + *
+   * The recommended deployment of the API.
+   * Format: `apis/{api}/deployments/{deployment}`
+   * 
+ * + * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } + * @return The bytes for recommendedDeployment. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRecommendedDeploymentBytes() { + java.lang.Object ref = recommendedDeployment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + recommendedDeployment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 9; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores, and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 9; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores, and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores, and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores, and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 10; + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> annotations_; + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 10; + */ + + @java.lang.Override + public boolean containsAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAnnotations().getMap().containsKey(key); + } + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 10; + */ + @java.lang.Override + + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 10; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 10; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(availability_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, availability_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recommendedVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, recommendedVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recommendedDeployment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, recommendedDeployment_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 9); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAnnotations(), + AnnotationsDefaultEntryHolder.defaultEntry, + 10); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(availability_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, availability_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recommendedVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, recommendedVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recommendedDeployment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, recommendedDeployment_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, labels__); + } + for (java.util.Map.Entry entry + : internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry + annotations__ = AnnotationsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, annotations__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.Api)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.Api other = (com.google.cloud.apigeeregistry.v1.Api) 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 (!getAvailability() + .equals(other.getAvailability())) return false; + if (!getRecommendedVersion() + .equals(other.getRecommendedVersion())) return false; + if (!getRecommendedDeployment() + .equals(other.getRecommendedDeployment())) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!internalGetAnnotations().equals( + other.internalGetAnnotations())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + 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 = (37 * hash) + AVAILABILITY_FIELD_NUMBER; + hash = (53 * hash) + getAvailability().hashCode(); + hash = (37 * hash) + RECOMMENDED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getRecommendedVersion().hashCode(); + hash = (37 * hash) + RECOMMENDED_DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getRecommendedDeployment().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.Api parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Api 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.apigeeregistry.v1.Api parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Api parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Api parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Api parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Api parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Api parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Api parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Api parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Api parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Api parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.Api prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A top-level description of an API.
+   * Produced by producers and are commitments to provide services.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.Api} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.Api) + com.google.cloud.apigeeregistry.v1.ApiOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 9: + return internalGetLabels(); + case 10: + return internalGetAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 9: + return internalGetMutableLabels(); + case 10: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.Api.class, com.google.cloud.apigeeregistry.v1.Api.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.Api.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + availability_ = ""; + + recommendedVersion_ = ""; + + recommendedDeployment_ = ""; + + internalGetMutableLabels().clear(); + internalGetMutableAnnotations().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Api getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Api build() { + com.google.cloud.apigeeregistry.v1.Api result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Api buildPartial() { + com.google.cloud.apigeeregistry.v1.Api result = new com.google.cloud.apigeeregistry.v1.Api(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.availability_ = availability_; + result.recommendedVersion_ = recommendedVersion_; + result.recommendedDeployment_ = recommendedDeployment_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.Api) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.Api)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.Api other) { + if (other == com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getAvailability().isEmpty()) { + availability_ = other.availability_; + onChanged(); + } + if (!other.getRecommendedVersion().isEmpty()) { + recommendedVersion_ = other.recommendedVersion_; + onChanged(); + } + if (!other.getRecommendedDeployment().isEmpty()) { + recommendedDeployment_ = other.recommendedDeployment_; + onChanged(); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + internalGetMutableAnnotations().mergeFrom( + other.internalGetAnnotations()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.Api parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.Api) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + } + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + } + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + onChanged(); + return this; + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. Creation 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. Creation 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; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Creation 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(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Creation 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 (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Creation 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. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. Last 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 updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * Output only. Last 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. Last 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; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Last 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(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Last 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 (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Last 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. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object availability_ = ""; + /** + *
+     * A user-definable description of the availability of this service.
+     * Format: free-form, but we expect single words that describe availability,
+     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
+     * 
+ * + * string availability = 6; + * @return The availability. + */ + public java.lang.String getAvailability() { + java.lang.Object ref = availability_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + availability_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A user-definable description of the availability of this service.
+     * Format: free-form, but we expect single words that describe availability,
+     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
+     * 
+ * + * string availability = 6; + * @return The bytes for availability. + */ + public com.google.protobuf.ByteString + getAvailabilityBytes() { + java.lang.Object ref = availability_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + availability_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A user-definable description of the availability of this service.
+     * Format: free-form, but we expect single words that describe availability,
+     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
+     * 
+ * + * string availability = 6; + * @param value The availability to set. + * @return This builder for chaining. + */ + public Builder setAvailability( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + availability_ = value; + onChanged(); + return this; + } + /** + *
+     * A user-definable description of the availability of this service.
+     * Format: free-form, but we expect single words that describe availability,
+     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
+     * 
+ * + * string availability = 6; + * @return This builder for chaining. + */ + public Builder clearAvailability() { + + availability_ = getDefaultInstance().getAvailability(); + onChanged(); + return this; + } + /** + *
+     * A user-definable description of the availability of this service.
+     * Format: free-form, but we expect single words that describe availability,
+     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
+     * 
+ * + * string availability = 6; + * @param value The bytes for availability to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + availability_ = value; + onChanged(); + return this; + } + + private java.lang.Object recommendedVersion_ = ""; + /** + *
+     * The recommended version of the API.
+     * Format: `apis/{api}/versions/{version}`
+     * 
+ * + * string recommended_version = 7 [(.google.api.resource_reference) = { ... } + * @return The recommendedVersion. + */ + public java.lang.String getRecommendedVersion() { + java.lang.Object ref = recommendedVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + recommendedVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The recommended version of the API.
+     * Format: `apis/{api}/versions/{version}`
+     * 
+ * + * string recommended_version = 7 [(.google.api.resource_reference) = { ... } + * @return The bytes for recommendedVersion. + */ + public com.google.protobuf.ByteString + getRecommendedVersionBytes() { + java.lang.Object ref = recommendedVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + recommendedVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The recommended version of the API.
+     * Format: `apis/{api}/versions/{version}`
+     * 
+ * + * string recommended_version = 7 [(.google.api.resource_reference) = { ... } + * @param value The recommendedVersion to set. + * @return This builder for chaining. + */ + public Builder setRecommendedVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + recommendedVersion_ = value; + onChanged(); + return this; + } + /** + *
+     * The recommended version of the API.
+     * Format: `apis/{api}/versions/{version}`
+     * 
+ * + * string recommended_version = 7 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearRecommendedVersion() { + + recommendedVersion_ = getDefaultInstance().getRecommendedVersion(); + onChanged(); + return this; + } + /** + *
+     * The recommended version of the API.
+     * Format: `apis/{api}/versions/{version}`
+     * 
+ * + * string recommended_version = 7 [(.google.api.resource_reference) = { ... } + * @param value The bytes for recommendedVersion to set. + * @return This builder for chaining. + */ + public Builder setRecommendedVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + recommendedVersion_ = value; + onChanged(); + return this; + } + + private java.lang.Object recommendedDeployment_ = ""; + /** + *
+     * The recommended deployment of the API.
+     * Format: `apis/{api}/deployments/{deployment}`
+     * 
+ * + * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } + * @return The recommendedDeployment. + */ + public java.lang.String getRecommendedDeployment() { + java.lang.Object ref = recommendedDeployment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + recommendedDeployment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The recommended deployment of the API.
+     * Format: `apis/{api}/deployments/{deployment}`
+     * 
+ * + * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } + * @return The bytes for recommendedDeployment. + */ + public com.google.protobuf.ByteString + getRecommendedDeploymentBytes() { + java.lang.Object ref = recommendedDeployment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + recommendedDeployment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The recommended deployment of the API.
+     * Format: `apis/{api}/deployments/{deployment}`
+     * 
+ * + * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } + * @param value The recommendedDeployment to set. + * @return This builder for chaining. + */ + public Builder setRecommendedDeployment( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + recommendedDeployment_ = value; + onChanged(); + return this; + } + /** + *
+     * The recommended deployment of the API.
+     * Format: `apis/{api}/deployments/{deployment}`
+     * 
+ * + * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearRecommendedDeployment() { + + recommendedDeployment_ = getDefaultInstance().getRecommendedDeployment(); + onChanged(); + return this; + } + /** + *
+     * The recommended deployment of the API.
+     * Format: `apis/{api}/deployments/{deployment}`
+     * 
+ * + * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } + * @param value The bytes for recommendedDeployment to set. + * @return This builder for chaining. + */ + public Builder setRecommendedDeploymentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + recommendedDeployment_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores, and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 9; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores, and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores, and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores, and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores, and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 9; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores, and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 9; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores, and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 9; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> annotations_; + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged();; + if (annotations_ == null) { + annotations_ = com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 10; + */ + + @java.lang.Override + public boolean containsAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAnnotations().getMap().containsKey(key); + } + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 10; + */ + @java.lang.Override + + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 10; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 10; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 10; + */ + + public Builder removeAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableAnnotations().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 10; + */ + public Builder putAnnotations( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableAnnotations().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 10; + */ + + public Builder putAllAnnotations( + java.util.Map values) { + internalGetMutableAnnotations().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.Api) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.Api) + private static final com.google.cloud.apigeeregistry.v1.Api DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.Api(); + } + + public static com.google.cloud.apigeeregistry.v1.Api getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Api parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Api(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Api getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeployment.java new file mode 100644 index 000000000000..6996e3f80b1c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeployment.java @@ -0,0 +1,3462 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_models.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Describes a service running at particular address that
+ * provides a particular version of an API. ApiDeployments have revisions which
+ * correspond to different configurations of a single deployment in time.
+ * Revision identifiers should be updated whenever the served API spec or
+ * endpoint address changes.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiDeployment} + */ +public final class ApiDeployment extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ApiDeployment) + ApiDeploymentOrBuilder { +private static final long serialVersionUID = 0L; + // Use ApiDeployment.newBuilder() to construct. + private ApiDeployment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiDeployment() { + name_ = ""; + displayName_ = ""; + description_ = ""; + revisionId_ = ""; + apiSpecRevision_ = ""; + endpointUri_ = ""; + externalChannelUri_ = ""; + intendedAudience_ = ""; + accessGuidance_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ApiDeployment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiDeployment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + revisionId_ = s; + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (revisionCreateTime_ != null) { + subBuilder = revisionCreateTime_.toBuilder(); + } + revisionCreateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(revisionCreateTime_); + revisionCreateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (revisionUpdateTime_ != null) { + subBuilder = revisionUpdateTime_.toBuilder(); + } + revisionUpdateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(revisionUpdateTime_); + revisionUpdateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + apiSpecRevision_ = s; + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + + endpointUri_ = s; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + + externalChannelUri_ = s; + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + + intendedAudience_ = s; + break; + } + case 98: { + java.lang.String s = input.readStringRequireUtf8(); + + accessGuidance_ = s; + break; + } + case 114: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } + case 122: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + annotations_ = com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + annotations__ = input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + annotations_.getMutableMap().put( + annotations__.getKey(), annotations__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 14: + return internalGetLabels(); + case 15: + return internalGetAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ApiDeployment.class, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @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; + } + } + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @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; + private volatile java.lang.Object description_; + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object revisionId_; + /** + *
+   * Output only. Immutable. The revision ID of the deployment.
+   * A new revision is committed whenever the deployment contents are changed.
+   * The format is an 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + 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(); + revisionId_ = s; + return s; + } + } + /** + *
+   * Output only. Immutable. The revision ID of the deployment.
+   * A new revision is committed whenever the deployment contents are changed.
+   * The format is an 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. Creation timestamp; when the deployment resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. Creation timestamp; when the deployment resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. Creation timestamp; when the deployment resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int REVISION_CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp revisionCreateTime_; + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionCreateTime field is set. + */ + @java.lang.Override + public boolean hasRevisionCreateTime() { + return revisionCreateTime_ != null; + } + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRevisionCreateTime() { + return revisionCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; + } + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { + return getRevisionCreateTime(); + } + + public static final int REVISION_UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp revisionUpdateTime_; + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionUpdateTime field is set. + */ + @java.lang.Override + public boolean hasRevisionUpdateTime() { + return revisionUpdateTime_ != null; + } + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRevisionUpdateTime() { + return revisionUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; + } + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder() { + return getRevisionUpdateTime(); + } + + public static final int API_SPEC_REVISION_FIELD_NUMBER = 8; + private volatile java.lang.Object apiSpecRevision_; + /** + *
+   * The full resource name (including revision ID) of the spec of the API being
+   * served by the deployment. Changes to this value will update the revision.
+   * Format: `apis/{api}/deployments/{deployment}`
+   * 
+ * + * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } + * @return The apiSpecRevision. + */ + @java.lang.Override + public java.lang.String getApiSpecRevision() { + java.lang.Object ref = apiSpecRevision_; + 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(); + apiSpecRevision_ = s; + return s; + } + } + /** + *
+   * The full resource name (including revision ID) of the spec of the API being
+   * served by the deployment. Changes to this value will update the revision.
+   * Format: `apis/{api}/deployments/{deployment}`
+   * 
+ * + * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } + * @return The bytes for apiSpecRevision. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getApiSpecRevisionBytes() { + java.lang.Object ref = apiSpecRevision_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiSpecRevision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_URI_FIELD_NUMBER = 9; + private volatile java.lang.Object endpointUri_; + /** + *
+   * The address where the deployment is serving. Changes to this value will
+   * update the revision.
+   * 
+ * + * string endpoint_uri = 9; + * @return The endpointUri. + */ + @java.lang.Override + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + 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(); + endpointUri_ = s; + return s; + } + } + /** + *
+   * The address where the deployment is serving. Changes to this value will
+   * update the revision.
+   * 
+ * + * string endpoint_uri = 9; + * @return The bytes for endpointUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_CHANNEL_URI_FIELD_NUMBER = 10; + private volatile java.lang.Object externalChannelUri_; + /** + *
+   * The address of the external channel of the API (e.g., the Developer
+   * Portal). Changes to this value will not affect the revision.
+   * 
+ * + * string external_channel_uri = 10; + * @return The externalChannelUri. + */ + @java.lang.Override + public java.lang.String getExternalChannelUri() { + java.lang.Object ref = externalChannelUri_; + 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(); + externalChannelUri_ = s; + return s; + } + } + /** + *
+   * The address of the external channel of the API (e.g., the Developer
+   * Portal). Changes to this value will not affect the revision.
+   * 
+ * + * string external_channel_uri = 10; + * @return The bytes for externalChannelUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExternalChannelUriBytes() { + java.lang.Object ref = externalChannelUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalChannelUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTENDED_AUDIENCE_FIELD_NUMBER = 11; + private volatile java.lang.Object intendedAudience_; + /** + *
+   * Text briefly identifying the intended audience of the API. Changes to this
+   * value will not affect the revision.
+   * 
+ * + * string intended_audience = 11; + * @return The intendedAudience. + */ + @java.lang.Override + public java.lang.String getIntendedAudience() { + java.lang.Object ref = intendedAudience_; + 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(); + intendedAudience_ = s; + return s; + } + } + /** + *
+   * Text briefly identifying the intended audience of the API. Changes to this
+   * value will not affect the revision.
+   * 
+ * + * string intended_audience = 11; + * @return The bytes for intendedAudience. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIntendedAudienceBytes() { + java.lang.Object ref = intendedAudience_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + intendedAudience_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCESS_GUIDANCE_FIELD_NUMBER = 12; + private volatile java.lang.Object accessGuidance_; + /** + *
+   * Text briefly describing how to access the endpoint. Changes to this value
+   * will not affect the revision.
+   * 
+ * + * string access_guidance = 12; + * @return The accessGuidance. + */ + @java.lang.Override + public java.lang.String getAccessGuidance() { + java.lang.Object ref = accessGuidance_; + 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(); + accessGuidance_ = s; + return s; + } + } + /** + *
+   * Text briefly describing how to access the endpoint. Changes to this value
+   * will not affect the revision.
+   * 
+ * + * string access_guidance = 12; + * @return The bytes for accessGuidance. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAccessGuidanceBytes() { + java.lang.Object ref = accessGuidance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + accessGuidance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 14; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 15; + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> annotations_; + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + + @java.lang.Override + public boolean containsAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAnnotations().getMap().containsKey(key); + } + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, revisionId_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (revisionCreateTime_ != null) { + output.writeMessage(6, getRevisionCreateTime()); + } + if (revisionUpdateTime_ != null) { + output.writeMessage(7, getRevisionUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiSpecRevision_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, apiSpecRevision_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, endpointUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalChannelUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, externalChannelUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(intendedAudience_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, intendedAudience_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessGuidance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, accessGuidance_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 14); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAnnotations(), + AnnotationsDefaultEntryHolder.defaultEntry, + 15); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, revisionId_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getCreateTime()); + } + if (revisionCreateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getRevisionCreateTime()); + } + if (revisionUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getRevisionUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiSpecRevision_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, apiSpecRevision_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, endpointUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalChannelUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, externalChannelUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(intendedAudience_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, intendedAudience_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessGuidance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, accessGuidance_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, labels__); + } + for (java.util.Map.Entry entry + : internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry + annotations__ = AnnotationsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, annotations__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ApiDeployment)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ApiDeployment other = (com.google.cloud.apigeeregistry.v1.ApiDeployment) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getRevisionId() + .equals(other.getRevisionId())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasRevisionCreateTime() != other.hasRevisionCreateTime()) return false; + if (hasRevisionCreateTime()) { + if (!getRevisionCreateTime() + .equals(other.getRevisionCreateTime())) return false; + } + if (hasRevisionUpdateTime() != other.hasRevisionUpdateTime()) return false; + if (hasRevisionUpdateTime()) { + if (!getRevisionUpdateTime() + .equals(other.getRevisionUpdateTime())) return false; + } + if (!getApiSpecRevision() + .equals(other.getApiSpecRevision())) return false; + if (!getEndpointUri() + .equals(other.getEndpointUri())) return false; + if (!getExternalChannelUri() + .equals(other.getExternalChannelUri())) return false; + if (!getIntendedAudience() + .equals(other.getIntendedAudience())) return false; + if (!getAccessGuidance() + .equals(other.getAccessGuidance())) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!internalGetAnnotations().equals( + other.internalGetAnnotations())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasRevisionCreateTime()) { + hash = (37 * hash) + REVISION_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRevisionCreateTime().hashCode(); + } + if (hasRevisionUpdateTime()) { + hash = (37 * hash) + REVISION_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRevisionUpdateTime().hashCode(); + } + hash = (37 * hash) + API_SPEC_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getApiSpecRevision().hashCode(); + hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUri().hashCode(); + hash = (37 * hash) + EXTERNAL_CHANNEL_URI_FIELD_NUMBER; + hash = (53 * hash) + getExternalChannelUri().hashCode(); + hash = (37 * hash) + INTENDED_AUDIENCE_FIELD_NUMBER; + hash = (53 * hash) + getIntendedAudience().hashCode(); + hash = (37 * hash) + ACCESS_GUIDANCE_FIELD_NUMBER; + hash = (53 * hash) + getAccessGuidance().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ApiDeployment 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.apigeeregistry.v1.ApiDeployment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ApiDeployment 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.apigeeregistry.v1.ApiDeployment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ApiDeployment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Describes a service running at particular address that
+   * provides a particular version of an API. ApiDeployments have revisions which
+   * correspond to different configurations of a single deployment in time.
+   * Revision identifiers should be updated whenever the served API spec or
+   * endpoint address changes.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiDeployment} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ApiDeployment) + com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 14: + return internalGetLabels(); + case 15: + return internalGetAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 14: + return internalGetMutableLabels(); + case 15: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ApiDeployment.class, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ApiDeployment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + revisionId_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTime_ = null; + } else { + revisionCreateTime_ = null; + revisionCreateTimeBuilder_ = null; + } + if (revisionUpdateTimeBuilder_ == null) { + revisionUpdateTime_ = null; + } else { + revisionUpdateTime_ = null; + revisionUpdateTimeBuilder_ = null; + } + apiSpecRevision_ = ""; + + endpointUri_ = ""; + + externalChannelUri_ = ""; + + intendedAudience_ = ""; + + accessGuidance_ = ""; + + internalGetMutableLabels().clear(); + internalGetMutableAnnotations().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeployment getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeployment build() { + com.google.cloud.apigeeregistry.v1.ApiDeployment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeployment buildPartial() { + com.google.cloud.apigeeregistry.v1.ApiDeployment result = new com.google.cloud.apigeeregistry.v1.ApiDeployment(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.revisionId_ = revisionId_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (revisionCreateTimeBuilder_ == null) { + result.revisionCreateTime_ = revisionCreateTime_; + } else { + result.revisionCreateTime_ = revisionCreateTimeBuilder_.build(); + } + if (revisionUpdateTimeBuilder_ == null) { + result.revisionUpdateTime_ = revisionUpdateTime_; + } else { + result.revisionUpdateTime_ = revisionUpdateTimeBuilder_.build(); + } + result.apiSpecRevision_ = apiSpecRevision_; + result.endpointUri_ = endpointUri_; + result.externalChannelUri_ = externalChannelUri_; + result.intendedAudience_ = intendedAudience_; + result.accessGuidance_ = accessGuidance_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ApiDeployment) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ApiDeployment)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ApiDeployment other) { + if (other == com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getRevisionId().isEmpty()) { + revisionId_ = other.revisionId_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasRevisionCreateTime()) { + mergeRevisionCreateTime(other.getRevisionCreateTime()); + } + if (other.hasRevisionUpdateTime()) { + mergeRevisionUpdateTime(other.getRevisionUpdateTime()); + } + if (!other.getApiSpecRevision().isEmpty()) { + apiSpecRevision_ = other.apiSpecRevision_; + onChanged(); + } + if (!other.getEndpointUri().isEmpty()) { + endpointUri_ = other.endpointUri_; + onChanged(); + } + if (!other.getExternalChannelUri().isEmpty()) { + externalChannelUri_ = other.externalChannelUri_; + onChanged(); + } + if (!other.getIntendedAudience().isEmpty()) { + intendedAudience_ = other.intendedAudience_; + onChanged(); + } + if (!other.getAccessGuidance().isEmpty()) { + accessGuidance_ = other.accessGuidance_; + onChanged(); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + internalGetMutableAnnotations().mergeFrom( + other.internalGetAnnotations()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ApiDeployment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ApiDeployment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + } + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + } + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + onChanged(); + return this; + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object revisionId_ = ""; + /** + *
+     * Output only. Immutable. The revision ID of the deployment.
+     * A new revision is committed whenever the deployment contents are changed.
+     * The format is an 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Immutable. The revision ID of the deployment.
+     * A new revision is committed whenever the deployment contents are changed.
+     * The format is an 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Immutable. The revision ID of the deployment.
+     * A new revision is committed whenever the deployment contents are changed.
+     * The format is an 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + revisionId_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. Immutable. The revision ID of the deployment.
+     * A new revision is committed whenever the deployment contents are changed.
+     * The format is an 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + + revisionId_ = getDefaultInstance().getRevisionId(); + onChanged(); + return this; + } + /** + *
+     * Output only. Immutable. The revision ID of the deployment.
+     * A new revision is committed whenever the deployment contents are changed.
+     * The format is an 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + revisionId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. Creation timestamp; when the deployment resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. Creation timestamp; when the deployment resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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. Creation timestamp; when the deployment resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp; when the deployment resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp; when the deployment resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp; when the deployment resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Creation timestamp; when the deployment resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Creation timestamp; when the deployment resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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. Creation timestamp; when the deployment resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp revisionCreateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> revisionCreateTimeBuilder_; + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionCreateTime field is set. + */ + public boolean hasRevisionCreateTime() { + return revisionCreateTimeBuilder_ != null || revisionCreateTime_ != null; + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionCreateTime. + */ + public com.google.protobuf.Timestamp getRevisionCreateTime() { + if (revisionCreateTimeBuilder_ == null) { + return revisionCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; + } else { + return revisionCreateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRevisionCreateTime(com.google.protobuf.Timestamp value) { + if (revisionCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revisionCreateTime_ = value; + onChanged(); + } else { + revisionCreateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRevisionCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTime_ = builderForValue.build(); + onChanged(); + } else { + revisionCreateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeRevisionCreateTime(com.google.protobuf.Timestamp value) { + if (revisionCreateTimeBuilder_ == null) { + if (revisionCreateTime_ != null) { + revisionCreateTime_ = + com.google.protobuf.Timestamp.newBuilder(revisionCreateTime_).mergeFrom(value).buildPartial(); + } else { + revisionCreateTime_ = value; + } + onChanged(); + } else { + revisionCreateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearRevisionCreateTime() { + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTime_ = null; + onChanged(); + } else { + revisionCreateTime_ = null; + revisionCreateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getRevisionCreateTimeBuilder() { + + onChanged(); + return getRevisionCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { + if (revisionCreateTimeBuilder_ != null) { + return revisionCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return revisionCreateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; + } + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getRevisionCreateTimeFieldBuilder() { + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getRevisionCreateTime(), + getParentForChildren(), + isClean()); + revisionCreateTime_ = null; + } + return revisionCreateTimeBuilder_; + } + + private com.google.protobuf.Timestamp revisionUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> revisionUpdateTimeBuilder_; + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionUpdateTime field is set. + */ + public boolean hasRevisionUpdateTime() { + return revisionUpdateTimeBuilder_ != null || revisionUpdateTime_ != null; + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionUpdateTime. + */ + public com.google.protobuf.Timestamp getRevisionUpdateTime() { + if (revisionUpdateTimeBuilder_ == null) { + return revisionUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; + } else { + return revisionUpdateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRevisionUpdateTime(com.google.protobuf.Timestamp value) { + if (revisionUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revisionUpdateTime_ = value; + onChanged(); + } else { + revisionUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRevisionUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (revisionUpdateTimeBuilder_ == null) { + revisionUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + revisionUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeRevisionUpdateTime(com.google.protobuf.Timestamp value) { + if (revisionUpdateTimeBuilder_ == null) { + if (revisionUpdateTime_ != null) { + revisionUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(revisionUpdateTime_).mergeFrom(value).buildPartial(); + } else { + revisionUpdateTime_ = value; + } + onChanged(); + } else { + revisionUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearRevisionUpdateTime() { + if (revisionUpdateTimeBuilder_ == null) { + revisionUpdateTime_ = null; + onChanged(); + } else { + revisionUpdateTime_ = null; + revisionUpdateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getRevisionUpdateTimeBuilder() { + + onChanged(); + return getRevisionUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder() { + if (revisionUpdateTimeBuilder_ != null) { + return revisionUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return revisionUpdateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; + } + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getRevisionUpdateTimeFieldBuilder() { + if (revisionUpdateTimeBuilder_ == null) { + revisionUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getRevisionUpdateTime(), + getParentForChildren(), + isClean()); + revisionUpdateTime_ = null; + } + return revisionUpdateTimeBuilder_; + } + + private java.lang.Object apiSpecRevision_ = ""; + /** + *
+     * The full resource name (including revision ID) of the spec of the API being
+     * served by the deployment. Changes to this value will update the revision.
+     * Format: `apis/{api}/deployments/{deployment}`
+     * 
+ * + * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } + * @return The apiSpecRevision. + */ + public java.lang.String getApiSpecRevision() { + java.lang.Object ref = apiSpecRevision_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiSpecRevision_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full resource name (including revision ID) of the spec of the API being
+     * served by the deployment. Changes to this value will update the revision.
+     * Format: `apis/{api}/deployments/{deployment}`
+     * 
+ * + * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } + * @return The bytes for apiSpecRevision. + */ + public com.google.protobuf.ByteString + getApiSpecRevisionBytes() { + java.lang.Object ref = apiSpecRevision_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiSpecRevision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full resource name (including revision ID) of the spec of the API being
+     * served by the deployment. Changes to this value will update the revision.
+     * Format: `apis/{api}/deployments/{deployment}`
+     * 
+ * + * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } + * @param value The apiSpecRevision to set. + * @return This builder for chaining. + */ + public Builder setApiSpecRevision( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiSpecRevision_ = value; + onChanged(); + return this; + } + /** + *
+     * The full resource name (including revision ID) of the spec of the API being
+     * served by the deployment. Changes to this value will update the revision.
+     * Format: `apis/{api}/deployments/{deployment}`
+     * 
+ * + * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearApiSpecRevision() { + + apiSpecRevision_ = getDefaultInstance().getApiSpecRevision(); + onChanged(); + return this; + } + /** + *
+     * The full resource name (including revision ID) of the spec of the API being
+     * served by the deployment. Changes to this value will update the revision.
+     * Format: `apis/{api}/deployments/{deployment}`
+     * 
+ * + * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } + * @param value The bytes for apiSpecRevision to set. + * @return This builder for chaining. + */ + public Builder setApiSpecRevisionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiSpecRevision_ = value; + onChanged(); + return this; + } + + private java.lang.Object endpointUri_ = ""; + /** + *
+     * The address where the deployment is serving. Changes to this value will
+     * update the revision.
+     * 
+ * + * string endpoint_uri = 9; + * @return The endpointUri. + */ + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The address where the deployment is serving. Changes to this value will
+     * update the revision.
+     * 
+ * + * string endpoint_uri = 9; + * @return The bytes for endpointUri. + */ + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The address where the deployment is serving. Changes to this value will
+     * update the revision.
+     * 
+ * + * string endpoint_uri = 9; + * @param value The endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endpointUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The address where the deployment is serving. Changes to this value will
+     * update the revision.
+     * 
+ * + * string endpoint_uri = 9; + * @return This builder for chaining. + */ + public Builder clearEndpointUri() { + + endpointUri_ = getDefaultInstance().getEndpointUri(); + onChanged(); + return this; + } + /** + *
+     * The address where the deployment is serving. Changes to this value will
+     * update the revision.
+     * 
+ * + * string endpoint_uri = 9; + * @param value The bytes for endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endpointUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object externalChannelUri_ = ""; + /** + *
+     * The address of the external channel of the API (e.g., the Developer
+     * Portal). Changes to this value will not affect the revision.
+     * 
+ * + * string external_channel_uri = 10; + * @return The externalChannelUri. + */ + public java.lang.String getExternalChannelUri() { + java.lang.Object ref = externalChannelUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalChannelUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The address of the external channel of the API (e.g., the Developer
+     * Portal). Changes to this value will not affect the revision.
+     * 
+ * + * string external_channel_uri = 10; + * @return The bytes for externalChannelUri. + */ + public com.google.protobuf.ByteString + getExternalChannelUriBytes() { + java.lang.Object ref = externalChannelUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalChannelUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The address of the external channel of the API (e.g., the Developer
+     * Portal). Changes to this value will not affect the revision.
+     * 
+ * + * string external_channel_uri = 10; + * @param value The externalChannelUri to set. + * @return This builder for chaining. + */ + public Builder setExternalChannelUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalChannelUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The address of the external channel of the API (e.g., the Developer
+     * Portal). Changes to this value will not affect the revision.
+     * 
+ * + * string external_channel_uri = 10; + * @return This builder for chaining. + */ + public Builder clearExternalChannelUri() { + + externalChannelUri_ = getDefaultInstance().getExternalChannelUri(); + onChanged(); + return this; + } + /** + *
+     * The address of the external channel of the API (e.g., the Developer
+     * Portal). Changes to this value will not affect the revision.
+     * 
+ * + * string external_channel_uri = 10; + * @param value The bytes for externalChannelUri to set. + * @return This builder for chaining. + */ + public Builder setExternalChannelUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalChannelUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object intendedAudience_ = ""; + /** + *
+     * Text briefly identifying the intended audience of the API. Changes to this
+     * value will not affect the revision.
+     * 
+ * + * string intended_audience = 11; + * @return The intendedAudience. + */ + public java.lang.String getIntendedAudience() { + java.lang.Object ref = intendedAudience_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + intendedAudience_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Text briefly identifying the intended audience of the API. Changes to this
+     * value will not affect the revision.
+     * 
+ * + * string intended_audience = 11; + * @return The bytes for intendedAudience. + */ + public com.google.protobuf.ByteString + getIntendedAudienceBytes() { + java.lang.Object ref = intendedAudience_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + intendedAudience_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Text briefly identifying the intended audience of the API. Changes to this
+     * value will not affect the revision.
+     * 
+ * + * string intended_audience = 11; + * @param value The intendedAudience to set. + * @return This builder for chaining. + */ + public Builder setIntendedAudience( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + intendedAudience_ = value; + onChanged(); + return this; + } + /** + *
+     * Text briefly identifying the intended audience of the API. Changes to this
+     * value will not affect the revision.
+     * 
+ * + * string intended_audience = 11; + * @return This builder for chaining. + */ + public Builder clearIntendedAudience() { + + intendedAudience_ = getDefaultInstance().getIntendedAudience(); + onChanged(); + return this; + } + /** + *
+     * Text briefly identifying the intended audience of the API. Changes to this
+     * value will not affect the revision.
+     * 
+ * + * string intended_audience = 11; + * @param value The bytes for intendedAudience to set. + * @return This builder for chaining. + */ + public Builder setIntendedAudienceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + intendedAudience_ = value; + onChanged(); + return this; + } + + private java.lang.Object accessGuidance_ = ""; + /** + *
+     * Text briefly describing how to access the endpoint. Changes to this value
+     * will not affect the revision.
+     * 
+ * + * string access_guidance = 12; + * @return The accessGuidance. + */ + public java.lang.String getAccessGuidance() { + java.lang.Object ref = accessGuidance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessGuidance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Text briefly describing how to access the endpoint. Changes to this value
+     * will not affect the revision.
+     * 
+ * + * string access_guidance = 12; + * @return The bytes for accessGuidance. + */ + public com.google.protobuf.ByteString + getAccessGuidanceBytes() { + java.lang.Object ref = accessGuidance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + accessGuidance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Text briefly describing how to access the endpoint. Changes to this value
+     * will not affect the revision.
+     * 
+ * + * string access_guidance = 12; + * @param value The accessGuidance to set. + * @return This builder for chaining. + */ + public Builder setAccessGuidance( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + accessGuidance_ = value; + onChanged(); + return this; + } + /** + *
+     * Text briefly describing how to access the endpoint. Changes to this value
+     * will not affect the revision.
+     * 
+ * + * string access_guidance = 12; + * @return This builder for chaining. + */ + public Builder clearAccessGuidance() { + + accessGuidance_ = getDefaultInstance().getAccessGuidance(); + onChanged(); + return this; + } + /** + *
+     * Text briefly describing how to access the endpoint. Changes to this value
+     * will not affect the revision.
+     * 
+ * + * string access_guidance = 12; + * @param value The bytes for accessGuidance to set. + * @return This builder for chaining. + */ + public Builder setAccessGuidanceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + accessGuidance_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> annotations_; + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged();; + if (annotations_ == null) { + annotations_ = com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + + @java.lang.Override + public boolean containsAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAnnotations().getMap().containsKey(key); + } + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + + public Builder removeAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableAnnotations().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + public Builder putAnnotations( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableAnnotations().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + + public Builder putAllAnnotations( + java.util.Map values) { + internalGetMutableAnnotations().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ApiDeployment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ApiDeployment) + private static final com.google.cloud.apigeeregistry.v1.ApiDeployment DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ApiDeployment(); + } + + public static com.google.cloud.apigeeregistry.v1.ApiDeployment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiDeployment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiDeployment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeployment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentName.java new file mode 100644 index 000000000000..f5242091c949 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentName.java @@ -0,0 +1,258 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ApiDeploymentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_API_DEPLOYMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String api; + private final String deployment; + + @Deprecated + protected ApiDeploymentName() { + project = null; + location = null; + api = null; + deployment = null; + } + + private ApiDeploymentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + api = Preconditions.checkNotNull(builder.getApi()); + deployment = Preconditions.checkNotNull(builder.getDeployment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public String getDeployment() { + return deployment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ApiDeploymentName of( + String project, String location, String api, String deployment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setDeployment(deployment) + .build(); + } + + public static String format(String project, String location, String api, String deployment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setDeployment(deployment) + .build() + .toString(); + } + + public static ApiDeploymentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_API_DEPLOYMENT.validatedMatch( + formattedString, "ApiDeploymentName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("api"), + matchMap.get("deployment")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ApiDeploymentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_API_DEPLOYMENT.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 (api != null) { + fieldMapBuilder.put("api", api); + } + if (deployment != null) { + fieldMapBuilder.put("deployment", deployment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_API_DEPLOYMENT.instantiate( + "project", project, "location", location, "api", api, "deployment", deployment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ApiDeploymentName that = ((ApiDeploymentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.api, that.api) + && Objects.equals(this.deployment, that.deployment); + } + 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(api); + h *= 1000003; + h ^= Objects.hashCode(deployment); + return h; + } + + /** Builder for projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}. */ + public static class Builder { + private String project; + private String location; + private String api; + private String deployment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public String getDeployment() { + return deployment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setApi(String api) { + this.api = api; + return this; + } + + public Builder setDeployment(String deployment) { + this.deployment = deployment; + return this; + } + + private Builder(ApiDeploymentName apiDeploymentName) { + this.project = apiDeploymentName.project; + this.location = apiDeploymentName.location; + this.api = apiDeploymentName.api; + this.deployment = apiDeploymentName.deployment; + } + + public ApiDeploymentName build() { + return new ApiDeploymentName(this); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentOrBuilder.java new file mode 100644 index 000000000000..85d5012ce8db --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentOrBuilder.java @@ -0,0 +1,458 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_models.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ApiDeploymentOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ApiDeployment) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. Immutable. The revision ID of the deployment.
+   * A new revision is committed whenever the deployment contents are changed.
+   * The format is an 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + *
+   * Output only. Immutable. The revision ID of the deployment.
+   * A new revision is committed whenever the deployment contents are changed.
+   * The format is an 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString + getRevisionIdBytes(); + + /** + *
+   * Output only. Creation timestamp; when the deployment resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. Creation timestamp; when the deployment resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. Creation timestamp; when the deployment resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionCreateTime field is set. + */ + boolean hasRevisionCreateTime(); + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionCreateTime. + */ + com.google.protobuf.Timestamp getRevisionCreateTime(); + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder(); + + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionUpdateTime field is set. + */ + boolean hasRevisionUpdateTime(); + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionUpdateTime. + */ + com.google.protobuf.Timestamp getRevisionUpdateTime(); + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder(); + + /** + *
+   * The full resource name (including revision ID) of the spec of the API being
+   * served by the deployment. Changes to this value will update the revision.
+   * Format: `apis/{api}/deployments/{deployment}`
+   * 
+ * + * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } + * @return The apiSpecRevision. + */ + java.lang.String getApiSpecRevision(); + /** + *
+   * The full resource name (including revision ID) of the spec of the API being
+   * served by the deployment. Changes to this value will update the revision.
+   * Format: `apis/{api}/deployments/{deployment}`
+   * 
+ * + * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } + * @return The bytes for apiSpecRevision. + */ + com.google.protobuf.ByteString + getApiSpecRevisionBytes(); + + /** + *
+   * The address where the deployment is serving. Changes to this value will
+   * update the revision.
+   * 
+ * + * string endpoint_uri = 9; + * @return The endpointUri. + */ + java.lang.String getEndpointUri(); + /** + *
+   * The address where the deployment is serving. Changes to this value will
+   * update the revision.
+   * 
+ * + * string endpoint_uri = 9; + * @return The bytes for endpointUri. + */ + com.google.protobuf.ByteString + getEndpointUriBytes(); + + /** + *
+   * The address of the external channel of the API (e.g., the Developer
+   * Portal). Changes to this value will not affect the revision.
+   * 
+ * + * string external_channel_uri = 10; + * @return The externalChannelUri. + */ + java.lang.String getExternalChannelUri(); + /** + *
+   * The address of the external channel of the API (e.g., the Developer
+   * Portal). Changes to this value will not affect the revision.
+   * 
+ * + * string external_channel_uri = 10; + * @return The bytes for externalChannelUri. + */ + com.google.protobuf.ByteString + getExternalChannelUriBytes(); + + /** + *
+   * Text briefly identifying the intended audience of the API. Changes to this
+   * value will not affect the revision.
+   * 
+ * + * string intended_audience = 11; + * @return The intendedAudience. + */ + java.lang.String getIntendedAudience(); + /** + *
+   * Text briefly identifying the intended audience of the API. Changes to this
+   * value will not affect the revision.
+   * 
+ * + * string intended_audience = 11; + * @return The bytes for intendedAudience. + */ + com.google.protobuf.ByteString + getIntendedAudienceBytes(); + + /** + *
+   * Text briefly describing how to access the endpoint. Changes to this value
+   * will not affect the revision.
+   * 
+ * + * string access_guidance = 12; + * @return The accessGuidance. + */ + java.lang.String getAccessGuidance(); + /** + *
+   * Text briefly describing how to access the endpoint. Changes to this value
+   * will not affect the revision.
+   * 
+ * + * string access_guidance = 12; + * @return The bytes for accessGuidance. + */ + com.google.protobuf.ByteString + getAccessGuidanceBytes(); + + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + int getLabelsCount(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + int getAnnotationsCount(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + boolean containsAnnotations( + java.lang.String key); + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAnnotations(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + java.util.Map + getAnnotationsMap(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + + /* nullable */ +java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + + java.lang.String getAnnotationsOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiName.java new file mode 100644 index 000000000000..5b44cd304de4 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiName.java @@ -0,0 +1,216 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ApiName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_API = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/apis/{api}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String api; + + @Deprecated + protected ApiName() { + project = null; + location = null; + api = null; + } + + private ApiName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + api = Preconditions.checkNotNull(builder.getApi()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ApiName of(String project, String location, String api) { + return newBuilder().setProject(project).setLocation(location).setApi(api).build(); + } + + public static String format(String project, String location, String api) { + return newBuilder().setProject(project).setLocation(location).setApi(api).build().toString(); + } + + public static ApiName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_API.validatedMatch( + formattedString, "ApiName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("api")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ApiName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_API.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 (api != null) { + fieldMapBuilder.put("api", api); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_API.instantiate("project", project, "location", location, "api", api); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ApiName that = ((ApiName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.api, that.api); + } + 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(api); + return h; + } + + /** Builder for projects/{project}/locations/{location}/apis/{api}. */ + public static class Builder { + private String project; + private String location; + private String api; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setApi(String api) { + this.api = api; + return this; + } + + private Builder(ApiName apiName) { + this.project = apiName.project; + this.location = apiName.location; + this.api = apiName.api; + } + + public ApiName build() { + return new ApiName(this); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiOrBuilder.java new file mode 100644 index 000000000000..45d4f1728182 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiOrBuilder.java @@ -0,0 +1,363 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_models.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ApiOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.Api) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. Last 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. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * A user-definable description of the availability of this service.
+   * Format: free-form, but we expect single words that describe availability,
+   * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
+   * 
+ * + * string availability = 6; + * @return The availability. + */ + java.lang.String getAvailability(); + /** + *
+   * A user-definable description of the availability of this service.
+   * Format: free-form, but we expect single words that describe availability,
+   * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
+   * 
+ * + * string availability = 6; + * @return The bytes for availability. + */ + com.google.protobuf.ByteString + getAvailabilityBytes(); + + /** + *
+   * The recommended version of the API.
+   * Format: `apis/{api}/versions/{version}`
+   * 
+ * + * string recommended_version = 7 [(.google.api.resource_reference) = { ... } + * @return The recommendedVersion. + */ + java.lang.String getRecommendedVersion(); + /** + *
+   * The recommended version of the API.
+   * Format: `apis/{api}/versions/{version}`
+   * 
+ * + * string recommended_version = 7 [(.google.api.resource_reference) = { ... } + * @return The bytes for recommendedVersion. + */ + com.google.protobuf.ByteString + getRecommendedVersionBytes(); + + /** + *
+   * The recommended deployment of the API.
+   * Format: `apis/{api}/deployments/{deployment}`
+   * 
+ * + * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } + * @return The recommendedDeployment. + */ + java.lang.String getRecommendedDeployment(); + /** + *
+   * The recommended deployment of the API.
+   * Format: `apis/{api}/deployments/{deployment}`
+   * 
+ * + * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } + * @return The bytes for recommendedDeployment. + */ + com.google.protobuf.ByteString + getRecommendedDeploymentBytes(); + + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores, and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 9; + */ + int getLabelsCount(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores, and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 9; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores, and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 9; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores, and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 9; + */ + + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores, and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 9; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 10; + */ + int getAnnotationsCount(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 10; + */ + boolean containsAnnotations( + java.lang.String key); + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAnnotations(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 10; + */ + java.util.Map + getAnnotationsMap(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 10; + */ + + /* nullable */ +java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 10; + */ + + java.lang.String getAnnotationsOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpec.java new file mode 100644 index 000000000000..83c75882f81a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpec.java @@ -0,0 +1,3347 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_models.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Describes a version of an API in a structured way.
+ * ApiSpecs provide formal descriptions that consumers can use to use a version.
+ * ApiSpec resources are intended to be fully-resolved descriptions of an
+ * ApiVersion. When specs consist of multiple files, these should be bundled
+ * together (e.g., in a zip archive) and stored as a unit. Multiple specs can
+ * exist to provide representations in different API description formats.
+ * Synchronization of these representations would be provided by tooling and
+ * background services.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiSpec} + */ +public final class ApiSpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ApiSpec) + ApiSpecOrBuilder { +private static final long serialVersionUID = 0L; + // Use ApiSpec.newBuilder() to construct. + private ApiSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiSpec() { + name_ = ""; + filename_ = ""; + description_ = ""; + revisionId_ = ""; + mimeType_ = ""; + hash_ = ""; + sourceUri_ = ""; + contents_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ApiSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + filename_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + revisionId_ = s; + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (revisionCreateTime_ != null) { + subBuilder = revisionCreateTime_.toBuilder(); + } + revisionCreateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(revisionCreateTime_); + revisionCreateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (revisionUpdateTime_ != null) { + subBuilder = revisionUpdateTime_.toBuilder(); + } + revisionUpdateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(revisionUpdateTime_); + revisionUpdateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 72: { + + sizeBytes_ = input.readInt32(); + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + + hash_ = s; + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + + sourceUri_ = s; + break; + } + case 98: { + + contents_ = input.readBytes(); + break; + } + case 114: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } + case 122: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + annotations_ = com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + annotations__ = input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + annotations_.getMutableMap().put( + annotations__.getKey(), annotations__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 14: + return internalGetLabels(); + case 15: + return internalGetAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ApiSpec.class, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILENAME_FIELD_NUMBER = 2; + private volatile java.lang.Object filename_; + /** + *
+   * A possibly-hierarchical name used to refer to the spec from other specs.
+   * 
+ * + * string filename = 2; + * @return The filename. + */ + @java.lang.Override + public java.lang.String getFilename() { + java.lang.Object ref = filename_; + 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(); + filename_ = s; + return s; + } + } + /** + *
+   * A possibly-hierarchical name used to refer to the spec from other specs.
+   * 
+ * + * string filename = 2; + * @return The bytes for filename. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilenameBytes() { + java.lang.Object ref = filename_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object revisionId_; + /** + *
+   * Output only. Immutable. The revision ID of the spec.
+   * A new revision is committed whenever the spec contents are changed.
+   * The format is an 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + 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(); + revisionId_ = s; + return s; + } + } + /** + *
+   * Output only. Immutable. The revision ID of the spec.
+   * A new revision is committed whenever the spec contents are changed.
+   * The format is an 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. Creation timestamp; when the spec resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. Creation timestamp; when the spec resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. Creation timestamp; when the spec resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int REVISION_CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp revisionCreateTime_; + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionCreateTime field is set. + */ + @java.lang.Override + public boolean hasRevisionCreateTime() { + return revisionCreateTime_ != null; + } + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRevisionCreateTime() { + return revisionCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; + } + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { + return getRevisionCreateTime(); + } + + public static final int REVISION_UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp revisionUpdateTime_; + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionUpdateTime field is set. + */ + @java.lang.Override + public boolean hasRevisionUpdateTime() { + return revisionUpdateTime_ != null; + } + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRevisionUpdateTime() { + return revisionUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; + } + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder() { + return getRevisionUpdateTime(); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 8; + private volatile java.lang.Object mimeType_; + /** + *
+   * A style (format) descriptor for this spec that is specified as a Media Type
+   * (https://en.wikipedia.org/wiki/Media_type). Possible values include
+   * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
+   * `application/vnd.apigee.graphql`, with possible suffixes representing
+   * compression types. These hypothetical names are defined in the vendor tree
+   * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
+   * Content types can specify compression. Currently only GZip compression is
+   * supported (indicated with "+gzip").
+   * 
+ * + * string mime_type = 8; + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + 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(); + mimeType_ = s; + return s; + } + } + /** + *
+   * A style (format) descriptor for this spec that is specified as a Media Type
+   * (https://en.wikipedia.org/wiki/Media_type). Possible values include
+   * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
+   * `application/vnd.apigee.graphql`, with possible suffixes representing
+   * compression types. These hypothetical names are defined in the vendor tree
+   * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
+   * Content types can specify compression. Currently only GZip compression is
+   * supported (indicated with "+gzip").
+   * 
+ * + * string mime_type = 8; + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_BYTES_FIELD_NUMBER = 9; + private int sizeBytes_; + /** + *
+   * Output only. The size of the spec file in bytes. If the spec is gzipped, this is the
+   * size of the uncompressed spec.
+   * 
+ * + * int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The sizeBytes. + */ + @java.lang.Override + public int getSizeBytes() { + return sizeBytes_; + } + + public static final int HASH_FIELD_NUMBER = 10; + private volatile java.lang.Object hash_; + /** + *
+   * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
+   * the hash of the uncompressed spec.
+   * 
+ * + * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The hash. + */ + @java.lang.Override + public java.lang.String getHash() { + java.lang.Object ref = hash_; + 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(); + hash_ = s; + return s; + } + } + /** + *
+   * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
+   * the hash of the uncompressed spec.
+   * 
+ * + * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_URI_FIELD_NUMBER = 11; + private volatile java.lang.Object sourceUri_; + /** + *
+   * The original source URI of the spec (if one exists).
+   * This is an external location that can be used for reference purposes
+   * but which may not be authoritative since this external resource may
+   * change after the spec is retrieved.
+   * 
+ * + * string source_uri = 11; + * @return The sourceUri. + */ + @java.lang.Override + public java.lang.String getSourceUri() { + java.lang.Object ref = sourceUri_; + 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(); + sourceUri_ = s; + return s; + } + } + /** + *
+   * The original source URI of the spec (if one exists).
+   * This is an external location that can be used for reference purposes
+   * but which may not be authoritative since this external resource may
+   * change after the spec is retrieved.
+   * 
+ * + * string source_uri = 11; + * @return The bytes for sourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourceUriBytes() { + java.lang.Object ref = sourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENTS_FIELD_NUMBER = 12; + private com.google.protobuf.ByteString contents_; + /** + *
+   * Input only. The contents of the spec.
+   * Provided by API callers when specs are created or updated.
+   * To access the contents of a spec, use GetApiSpecContents.
+   * 
+ * + * bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return The contents. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContents() { + return contents_; + } + + public static final int LABELS_FIELD_NUMBER = 14; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 15; + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> annotations_; + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + + @java.lang.Override + public boolean containsAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAnnotations().getMap().containsKey(key); + } + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filename_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filename_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, revisionId_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (revisionCreateTime_ != null) { + output.writeMessage(6, getRevisionCreateTime()); + } + if (revisionUpdateTime_ != null) { + output.writeMessage(7, getRevisionUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, mimeType_); + } + if (sizeBytes_ != 0) { + output.writeInt32(9, sizeBytes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, hash_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, sourceUri_); + } + if (!contents_.isEmpty()) { + output.writeBytes(12, contents_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 14); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAnnotations(), + AnnotationsDefaultEntryHolder.defaultEntry, + 15); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filename_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filename_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, revisionId_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getCreateTime()); + } + if (revisionCreateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getRevisionCreateTime()); + } + if (revisionUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getRevisionUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, mimeType_); + } + if (sizeBytes_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, sizeBytes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, hash_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, sourceUri_); + } + if (!contents_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(12, contents_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, labels__); + } + for (java.util.Map.Entry entry + : internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry + annotations__ = AnnotationsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, annotations__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ApiSpec)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ApiSpec other = (com.google.cloud.apigeeregistry.v1.ApiSpec) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getFilename() + .equals(other.getFilename())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getRevisionId() + .equals(other.getRevisionId())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasRevisionCreateTime() != other.hasRevisionCreateTime()) return false; + if (hasRevisionCreateTime()) { + if (!getRevisionCreateTime() + .equals(other.getRevisionCreateTime())) return false; + } + if (hasRevisionUpdateTime() != other.hasRevisionUpdateTime()) return false; + if (hasRevisionUpdateTime()) { + if (!getRevisionUpdateTime() + .equals(other.getRevisionUpdateTime())) return false; + } + if (!getMimeType() + .equals(other.getMimeType())) return false; + if (getSizeBytes() + != other.getSizeBytes()) return false; + if (!getHash() + .equals(other.getHash())) return false; + if (!getSourceUri() + .equals(other.getSourceUri())) return false; + if (!getContents() + .equals(other.getContents())) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!internalGetAnnotations().equals( + other.internalGetAnnotations())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FILENAME_FIELD_NUMBER; + hash = (53 * hash) + getFilename().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasRevisionCreateTime()) { + hash = (37 * hash) + REVISION_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRevisionCreateTime().hashCode(); + } + if (hasRevisionUpdateTime()) { + hash = (37 * hash) + REVISION_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRevisionUpdateTime().hashCode(); + } + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + SIZE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getSizeBytes(); + hash = (37 * hash) + HASH_FIELD_NUMBER; + hash = (53 * hash) + getHash().hashCode(); + hash = (37 * hash) + SOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getSourceUri().hashCode(); + hash = (37 * hash) + CONTENTS_FIELD_NUMBER; + hash = (53 * hash) + getContents().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ApiSpec 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.apigeeregistry.v1.ApiSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ApiSpec 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.apigeeregistry.v1.ApiSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ApiSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ApiSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ApiSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Describes a version of an API in a structured way.
+   * ApiSpecs provide formal descriptions that consumers can use to use a version.
+   * ApiSpec resources are intended to be fully-resolved descriptions of an
+   * ApiVersion. When specs consist of multiple files, these should be bundled
+   * together (e.g., in a zip archive) and stored as a unit. Multiple specs can
+   * exist to provide representations in different API description formats.
+   * Synchronization of these representations would be provided by tooling and
+   * background services.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ApiSpec) + com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 14: + return internalGetLabels(); + case 15: + return internalGetAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 14: + return internalGetMutableLabels(); + case 15: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ApiSpec.class, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ApiSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + filename_ = ""; + + description_ = ""; + + revisionId_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTime_ = null; + } else { + revisionCreateTime_ = null; + revisionCreateTimeBuilder_ = null; + } + if (revisionUpdateTimeBuilder_ == null) { + revisionUpdateTime_ = null; + } else { + revisionUpdateTime_ = null; + revisionUpdateTimeBuilder_ = null; + } + mimeType_ = ""; + + sizeBytes_ = 0; + + hash_ = ""; + + sourceUri_ = ""; + + contents_ = com.google.protobuf.ByteString.EMPTY; + + internalGetMutableLabels().clear(); + internalGetMutableAnnotations().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpec getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpec build() { + com.google.cloud.apigeeregistry.v1.ApiSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpec buildPartial() { + com.google.cloud.apigeeregistry.v1.ApiSpec result = new com.google.cloud.apigeeregistry.v1.ApiSpec(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.filename_ = filename_; + result.description_ = description_; + result.revisionId_ = revisionId_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (revisionCreateTimeBuilder_ == null) { + result.revisionCreateTime_ = revisionCreateTime_; + } else { + result.revisionCreateTime_ = revisionCreateTimeBuilder_.build(); + } + if (revisionUpdateTimeBuilder_ == null) { + result.revisionUpdateTime_ = revisionUpdateTime_; + } else { + result.revisionUpdateTime_ = revisionUpdateTimeBuilder_.build(); + } + result.mimeType_ = mimeType_; + result.sizeBytes_ = sizeBytes_; + result.hash_ = hash_; + result.sourceUri_ = sourceUri_; + result.contents_ = contents_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ApiSpec) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ApiSpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ApiSpec other) { + if (other == com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getFilename().isEmpty()) { + filename_ = other.filename_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getRevisionId().isEmpty()) { + revisionId_ = other.revisionId_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasRevisionCreateTime()) { + mergeRevisionCreateTime(other.getRevisionCreateTime()); + } + if (other.hasRevisionUpdateTime()) { + mergeRevisionUpdateTime(other.getRevisionUpdateTime()); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + if (other.getSizeBytes() != 0) { + setSizeBytes(other.getSizeBytes()); + } + if (!other.getHash().isEmpty()) { + hash_ = other.hash_; + onChanged(); + } + if (!other.getSourceUri().isEmpty()) { + sourceUri_ = other.sourceUri_; + onChanged(); + } + if (other.getContents() != com.google.protobuf.ByteString.EMPTY) { + setContents(other.getContents()); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + internalGetMutableAnnotations().mergeFrom( + other.internalGetAnnotations()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ApiSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ApiSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object filename_ = ""; + /** + *
+     * A possibly-hierarchical name used to refer to the spec from other specs.
+     * 
+ * + * string filename = 2; + * @return The filename. + */ + public java.lang.String getFilename() { + java.lang.Object ref = filename_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filename_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A possibly-hierarchical name used to refer to the spec from other specs.
+     * 
+ * + * string filename = 2; + * @return The bytes for filename. + */ + public com.google.protobuf.ByteString + getFilenameBytes() { + java.lang.Object ref = filename_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A possibly-hierarchical name used to refer to the spec from other specs.
+     * 
+ * + * string filename = 2; + * @param value The filename to set. + * @return This builder for chaining. + */ + public Builder setFilename( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filename_ = value; + onChanged(); + return this; + } + /** + *
+     * A possibly-hierarchical name used to refer to the spec from other specs.
+     * 
+ * + * string filename = 2; + * @return This builder for chaining. + */ + public Builder clearFilename() { + + filename_ = getDefaultInstance().getFilename(); + onChanged(); + return this; + } + /** + *
+     * A possibly-hierarchical name used to refer to the spec from other specs.
+     * 
+ * + * string filename = 2; + * @param value The bytes for filename to set. + * @return This builder for chaining. + */ + public Builder setFilenameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filename_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object revisionId_ = ""; + /** + *
+     * Output only. Immutable. The revision ID of the spec.
+     * A new revision is committed whenever the spec contents are changed.
+     * The format is an 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Immutable. The revision ID of the spec.
+     * A new revision is committed whenever the spec contents are changed.
+     * The format is an 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Immutable. The revision ID of the spec.
+     * A new revision is committed whenever the spec contents are changed.
+     * The format is an 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + revisionId_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. Immutable. The revision ID of the spec.
+     * A new revision is committed whenever the spec contents are changed.
+     * The format is an 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + + revisionId_ = getDefaultInstance().getRevisionId(); + onChanged(); + return this; + } + /** + *
+     * Output only. Immutable. The revision ID of the spec.
+     * A new revision is committed whenever the spec contents are changed.
+     * The format is an 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + revisionId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. Creation timestamp; when the spec resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. Creation timestamp; when the spec resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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. Creation timestamp; when the spec resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp; when the spec resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp; when the spec resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp; when the spec resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Creation timestamp; when the spec resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Creation timestamp; when the spec resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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. Creation timestamp; when the spec resource was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp revisionCreateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> revisionCreateTimeBuilder_; + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionCreateTime field is set. + */ + public boolean hasRevisionCreateTime() { + return revisionCreateTimeBuilder_ != null || revisionCreateTime_ != null; + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionCreateTime. + */ + public com.google.protobuf.Timestamp getRevisionCreateTime() { + if (revisionCreateTimeBuilder_ == null) { + return revisionCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; + } else { + return revisionCreateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRevisionCreateTime(com.google.protobuf.Timestamp value) { + if (revisionCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revisionCreateTime_ = value; + onChanged(); + } else { + revisionCreateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRevisionCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTime_ = builderForValue.build(); + onChanged(); + } else { + revisionCreateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeRevisionCreateTime(com.google.protobuf.Timestamp value) { + if (revisionCreateTimeBuilder_ == null) { + if (revisionCreateTime_ != null) { + revisionCreateTime_ = + com.google.protobuf.Timestamp.newBuilder(revisionCreateTime_).mergeFrom(value).buildPartial(); + } else { + revisionCreateTime_ = value; + } + onChanged(); + } else { + revisionCreateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearRevisionCreateTime() { + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTime_ = null; + onChanged(); + } else { + revisionCreateTime_ = null; + revisionCreateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getRevisionCreateTimeBuilder() { + + onChanged(); + return getRevisionCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { + if (revisionCreateTimeBuilder_ != null) { + return revisionCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return revisionCreateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; + } + } + /** + *
+     * Output only. Revision creation timestamp; when the represented revision was created.
+     * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getRevisionCreateTimeFieldBuilder() { + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getRevisionCreateTime(), + getParentForChildren(), + isClean()); + revisionCreateTime_ = null; + } + return revisionCreateTimeBuilder_; + } + + private com.google.protobuf.Timestamp revisionUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> revisionUpdateTimeBuilder_; + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionUpdateTime field is set. + */ + public boolean hasRevisionUpdateTime() { + return revisionUpdateTimeBuilder_ != null || revisionUpdateTime_ != null; + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionUpdateTime. + */ + public com.google.protobuf.Timestamp getRevisionUpdateTime() { + if (revisionUpdateTimeBuilder_ == null) { + return revisionUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; + } else { + return revisionUpdateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRevisionUpdateTime(com.google.protobuf.Timestamp value) { + if (revisionUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revisionUpdateTime_ = value; + onChanged(); + } else { + revisionUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRevisionUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (revisionUpdateTimeBuilder_ == null) { + revisionUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + revisionUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeRevisionUpdateTime(com.google.protobuf.Timestamp value) { + if (revisionUpdateTimeBuilder_ == null) { + if (revisionUpdateTime_ != null) { + revisionUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(revisionUpdateTime_).mergeFrom(value).buildPartial(); + } else { + revisionUpdateTime_ = value; + } + onChanged(); + } else { + revisionUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearRevisionUpdateTime() { + if (revisionUpdateTimeBuilder_ == null) { + revisionUpdateTime_ = null; + onChanged(); + } else { + revisionUpdateTime_ = null; + revisionUpdateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getRevisionUpdateTimeBuilder() { + + onChanged(); + return getRevisionUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder() { + if (revisionUpdateTimeBuilder_ != null) { + return revisionUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return revisionUpdateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; + } + } + /** + *
+     * Output only. Last update timestamp: when the represented revision was last modified.
+     * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getRevisionUpdateTimeFieldBuilder() { + if (revisionUpdateTimeBuilder_ == null) { + revisionUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getRevisionUpdateTime(), + getParentForChildren(), + isClean()); + revisionUpdateTime_ = null; + } + return revisionUpdateTimeBuilder_; + } + + private java.lang.Object mimeType_ = ""; + /** + *
+     * A style (format) descriptor for this spec that is specified as a Media Type
+     * (https://en.wikipedia.org/wiki/Media_type). Possible values include
+     * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
+     * `application/vnd.apigee.graphql`, with possible suffixes representing
+     * compression types. These hypothetical names are defined in the vendor tree
+     * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
+     * Content types can specify compression. Currently only GZip compression is
+     * supported (indicated with "+gzip").
+     * 
+ * + * string mime_type = 8; + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A style (format) descriptor for this spec that is specified as a Media Type
+     * (https://en.wikipedia.org/wiki/Media_type). Possible values include
+     * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
+     * `application/vnd.apigee.graphql`, with possible suffixes representing
+     * compression types. These hypothetical names are defined in the vendor tree
+     * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
+     * Content types can specify compression. Currently only GZip compression is
+     * supported (indicated with "+gzip").
+     * 
+ * + * string mime_type = 8; + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A style (format) descriptor for this spec that is specified as a Media Type
+     * (https://en.wikipedia.org/wiki/Media_type). Possible values include
+     * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
+     * `application/vnd.apigee.graphql`, with possible suffixes representing
+     * compression types. These hypothetical names are defined in the vendor tree
+     * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
+     * Content types can specify compression. Currently only GZip compression is
+     * supported (indicated with "+gzip").
+     * 
+ * + * string mime_type = 8; + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + *
+     * A style (format) descriptor for this spec that is specified as a Media Type
+     * (https://en.wikipedia.org/wiki/Media_type). Possible values include
+     * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
+     * `application/vnd.apigee.graphql`, with possible suffixes representing
+     * compression types. These hypothetical names are defined in the vendor tree
+     * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
+     * Content types can specify compression. Currently only GZip compression is
+     * supported (indicated with "+gzip").
+     * 
+ * + * string mime_type = 8; + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + *
+     * A style (format) descriptor for this spec that is specified as a Media Type
+     * (https://en.wikipedia.org/wiki/Media_type). Possible values include
+     * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
+     * `application/vnd.apigee.graphql`, with possible suffixes representing
+     * compression types. These hypothetical names are defined in the vendor tree
+     * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
+     * Content types can specify compression. Currently only GZip compression is
+     * supported (indicated with "+gzip").
+     * 
+ * + * string mime_type = 8; + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + + private int sizeBytes_ ; + /** + *
+     * Output only. The size of the spec file in bytes. If the spec is gzipped, this is the
+     * size of the uncompressed spec.
+     * 
+ * + * int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The sizeBytes. + */ + @java.lang.Override + public int getSizeBytes() { + return sizeBytes_; + } + /** + *
+     * Output only. The size of the spec file in bytes. If the spec is gzipped, this is the
+     * size of the uncompressed spec.
+     * 
+ * + * int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The sizeBytes to set. + * @return This builder for chaining. + */ + public Builder setSizeBytes(int value) { + + sizeBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The size of the spec file in bytes. If the spec is gzipped, this is the
+     * size of the uncompressed spec.
+     * 
+ * + * int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearSizeBytes() { + + sizeBytes_ = 0; + onChanged(); + return this; + } + + private java.lang.Object hash_ = ""; + /** + *
+     * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
+     * the hash of the uncompressed spec.
+     * 
+ * + * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The hash. + */ + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
+     * the hash of the uncompressed spec.
+     * 
+ * + * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for hash. + */ + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
+     * the hash of the uncompressed spec.
+     * 
+ * + * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hash_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
+     * the hash of the uncompressed spec.
+     * 
+ * + * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearHash() { + + hash_ = getDefaultInstance().getHash(); + onChanged(); + return this; + } + /** + *
+     * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
+     * the hash of the uncompressed spec.
+     * 
+ * + * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for hash to set. + * @return This builder for chaining. + */ + public Builder setHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hash_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceUri_ = ""; + /** + *
+     * The original source URI of the spec (if one exists).
+     * This is an external location that can be used for reference purposes
+     * but which may not be authoritative since this external resource may
+     * change after the spec is retrieved.
+     * 
+ * + * string source_uri = 11; + * @return The sourceUri. + */ + public java.lang.String getSourceUri() { + java.lang.Object ref = sourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The original source URI of the spec (if one exists).
+     * This is an external location that can be used for reference purposes
+     * but which may not be authoritative since this external resource may
+     * change after the spec is retrieved.
+     * 
+ * + * string source_uri = 11; + * @return The bytes for sourceUri. + */ + public com.google.protobuf.ByteString + getSourceUriBytes() { + java.lang.Object ref = sourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The original source URI of the spec (if one exists).
+     * This is an external location that can be used for reference purposes
+     * but which may not be authoritative since this external resource may
+     * change after the spec is retrieved.
+     * 
+ * + * string source_uri = 11; + * @param value The sourceUri to set. + * @return This builder for chaining. + */ + public Builder setSourceUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The original source URI of the spec (if one exists).
+     * This is an external location that can be used for reference purposes
+     * but which may not be authoritative since this external resource may
+     * change after the spec is retrieved.
+     * 
+ * + * string source_uri = 11; + * @return This builder for chaining. + */ + public Builder clearSourceUri() { + + sourceUri_ = getDefaultInstance().getSourceUri(); + onChanged(); + return this; + } + /** + *
+     * The original source URI of the spec (if one exists).
+     * This is an external location that can be used for reference purposes
+     * but which may not be authoritative since this external resource may
+     * change after the spec is retrieved.
+     * 
+ * + * string source_uri = 11; + * @param value The bytes for sourceUri to set. + * @return This builder for chaining. + */ + public Builder setSourceUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString contents_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Input only. The contents of the spec.
+     * Provided by API callers when specs are created or updated.
+     * To access the contents of a spec, use GetApiSpecContents.
+     * 
+ * + * bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return The contents. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContents() { + return contents_; + } + /** + *
+     * Input only. The contents of the spec.
+     * Provided by API callers when specs are created or updated.
+     * To access the contents of a spec, use GetApiSpecContents.
+     * 
+ * + * bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param value The contents to set. + * @return This builder for chaining. + */ + public Builder setContents(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + contents_ = value; + onChanged(); + return this; + } + /** + *
+     * Input only. The contents of the spec.
+     * Provided by API callers when specs are created or updated.
+     * To access the contents of a spec, use GetApiSpecContents.
+     * 
+ * + * bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearContents() { + + contents_ = getDefaultInstance().getContents(); + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 14; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> annotations_; + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged();; + if (annotations_ == null) { + annotations_ = com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + + @java.lang.Override + public boolean containsAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAnnotations().getMap().containsKey(key); + } + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + + public Builder removeAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableAnnotations().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + public Builder putAnnotations( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableAnnotations().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 15; + */ + + public Builder putAllAnnotations( + java.util.Map values) { + internalGetMutableAnnotations().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ApiSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ApiSpec) + private static final com.google.cloud.apigeeregistry.v1.ApiSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ApiSpec(); + } + + public static com.google.cloud.apigeeregistry.v1.ApiSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecName.java new file mode 100644 index 000000000000..6954f8055c43 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecName.java @@ -0,0 +1,288 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ApiSpecName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_API_VERSION_SPEC = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String api; + private final String version; + private final String spec; + + @Deprecated + protected ApiSpecName() { + project = null; + location = null; + api = null; + version = null; + spec = null; + } + + private ApiSpecName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + api = Preconditions.checkNotNull(builder.getApi()); + version = Preconditions.checkNotNull(builder.getVersion()); + spec = Preconditions.checkNotNull(builder.getSpec()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public String getVersion() { + return version; + } + + public String getSpec() { + return spec; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ApiSpecName of( + String project, String location, String api, String version, String spec) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setVersion(version) + .setSpec(spec) + .build(); + } + + public static String format( + String project, String location, String api, String version, String spec) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setVersion(version) + .setSpec(spec) + .build() + .toString(); + } + + public static ApiSpecName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_API_VERSION_SPEC.validatedMatch( + formattedString, "ApiSpecName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("api"), + matchMap.get("version"), + matchMap.get("spec")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ApiSpecName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_API_VERSION_SPEC.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 (api != null) { + fieldMapBuilder.put("api", api); + } + if (version != null) { + fieldMapBuilder.put("version", version); + } + if (spec != null) { + fieldMapBuilder.put("spec", spec); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_API_VERSION_SPEC.instantiate( + "project", project, "location", location, "api", api, "version", version, "spec", spec); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ApiSpecName that = ((ApiSpecName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.api, that.api) + && Objects.equals(this.version, that.version) + && Objects.equals(this.spec, that.spec); + } + 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(api); + h *= 1000003; + h ^= Objects.hashCode(version); + h *= 1000003; + h ^= Objects.hashCode(spec); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}. + */ + public static class Builder { + private String project; + private String location; + private String api; + private String version; + private String spec; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public String getVersion() { + return version; + } + + public String getSpec() { + return spec; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setApi(String api) { + this.api = api; + return this; + } + + public Builder setVersion(String version) { + this.version = version; + return this; + } + + public Builder setSpec(String spec) { + this.spec = spec; + return this; + } + + private Builder(ApiSpecName apiSpecName) { + this.project = apiSpecName.project; + this.location = apiSpecName.location; + this.api = apiSpecName.api; + this.version = apiSpecName.version; + this.spec = apiSpecName.spec; + } + + public ApiSpecName build() { + return new ApiSpecName(this); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecOrBuilder.java new file mode 100644 index 000000000000..64b0d73625b9 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecOrBuilder.java @@ -0,0 +1,451 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_models.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ApiSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ApiSpec) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * A possibly-hierarchical name used to refer to the spec from other specs.
+   * 
+ * + * string filename = 2; + * @return The filename. + */ + java.lang.String getFilename(); + /** + *
+   * A possibly-hierarchical name used to refer to the spec from other specs.
+   * 
+ * + * string filename = 2; + * @return The bytes for filename. + */ + com.google.protobuf.ByteString + getFilenameBytes(); + + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. Immutable. The revision ID of the spec.
+   * A new revision is committed whenever the spec contents are changed.
+   * The format is an 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + *
+   * Output only. Immutable. The revision ID of the spec.
+   * A new revision is committed whenever the spec contents are changed.
+   * The format is an 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString + getRevisionIdBytes(); + + /** + *
+   * Output only. Creation timestamp; when the spec resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. Creation timestamp; when the spec resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. Creation timestamp; when the spec resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionCreateTime field is set. + */ + boolean hasRevisionCreateTime(); + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionCreateTime. + */ + com.google.protobuf.Timestamp getRevisionCreateTime(); + /** + *
+   * Output only. Revision creation timestamp; when the represented revision was created.
+   * 
+ * + * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder(); + + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the revisionUpdateTime field is set. + */ + boolean hasRevisionUpdateTime(); + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The revisionUpdateTime. + */ + com.google.protobuf.Timestamp getRevisionUpdateTime(); + /** + *
+   * Output only. Last update timestamp: when the represented revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder(); + + /** + *
+   * A style (format) descriptor for this spec that is specified as a Media Type
+   * (https://en.wikipedia.org/wiki/Media_type). Possible values include
+   * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
+   * `application/vnd.apigee.graphql`, with possible suffixes representing
+   * compression types. These hypothetical names are defined in the vendor tree
+   * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
+   * Content types can specify compression. Currently only GZip compression is
+   * supported (indicated with "+gzip").
+   * 
+ * + * string mime_type = 8; + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + *
+   * A style (format) descriptor for this spec that is specified as a Media Type
+   * (https://en.wikipedia.org/wiki/Media_type). Possible values include
+   * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
+   * `application/vnd.apigee.graphql`, with possible suffixes representing
+   * compression types. These hypothetical names are defined in the vendor tree
+   * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
+   * Content types can specify compression. Currently only GZip compression is
+   * supported (indicated with "+gzip").
+   * 
+ * + * string mime_type = 8; + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString + getMimeTypeBytes(); + + /** + *
+   * Output only. The size of the spec file in bytes. If the spec is gzipped, this is the
+   * size of the uncompressed spec.
+   * 
+ * + * int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The sizeBytes. + */ + int getSizeBytes(); + + /** + *
+   * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
+   * the hash of the uncompressed spec.
+   * 
+ * + * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The hash. + */ + java.lang.String getHash(); + /** + *
+   * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
+   * the hash of the uncompressed spec.
+   * 
+ * + * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for hash. + */ + com.google.protobuf.ByteString + getHashBytes(); + + /** + *
+   * The original source URI of the spec (if one exists).
+   * This is an external location that can be used for reference purposes
+   * but which may not be authoritative since this external resource may
+   * change after the spec is retrieved.
+   * 
+ * + * string source_uri = 11; + * @return The sourceUri. + */ + java.lang.String getSourceUri(); + /** + *
+   * The original source URI of the spec (if one exists).
+   * This is an external location that can be used for reference purposes
+   * but which may not be authoritative since this external resource may
+   * change after the spec is retrieved.
+   * 
+ * + * string source_uri = 11; + * @return The bytes for sourceUri. + */ + com.google.protobuf.ByteString + getSourceUriBytes(); + + /** + *
+   * Input only. The contents of the spec.
+   * Provided by API callers when specs are created or updated.
+   * To access the contents of a spec, use GetApiSpecContents.
+   * 
+ * + * bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return The contents. + */ + com.google.protobuf.ByteString getContents(); + + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + int getLabelsCount(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 14; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + int getAnnotationsCount(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + boolean containsAnnotations( + java.lang.String key); + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAnnotations(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + java.util.Map + getAnnotationsMap(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + + /* nullable */ +java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 15; + */ + + java.lang.String getAnnotationsOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersion.java new file mode 100644 index 000000000000..12d64b86a84b --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersion.java @@ -0,0 +1,2355 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_models.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Describes a particular version of an API.
+ * ApiVersions are what consumers actually use.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiVersion} + */ +public final class ApiVersion extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ApiVersion) + ApiVersionOrBuilder { +private static final long serialVersionUID = 0L; + // Use ApiVersion.newBuilder() to construct. + private ApiVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiVersion() { + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ApiVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiVersion( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + state_ = s; + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + annotations_ = com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + annotations__ = input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + annotations_.getMutableMap().put( + annotations__.getKey(), annotations__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetLabels(); + case 8: + return internalGetAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ApiVersion.class, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @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; + } + } + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @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; + private volatile java.lang.Object description_; + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. Creation 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 createTime_ != null; + } + /** + *
+   * Output only. Creation 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. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. Last 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 updateTime_ != null; + } + /** + *
+   * Output only. Last 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. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int STATE_FIELD_NUMBER = 6; + private volatile java.lang.Object state_; + /** + *
+   * A user-definable description of the lifecycle phase of this API version.
+   * Format: free-form, but we expect single words that describe API maturity,
+   * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
+   * "DEPRECATED", "RETIRED".
+   * 
+ * + * string state = 6; + * @return The state. + */ + @java.lang.Override + public java.lang.String getState() { + java.lang.Object ref = state_; + 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(); + state_ = s; + return s; + } + } + /** + *
+   * A user-definable description of the lifecycle phase of this API version.
+   * Format: free-form, but we expect single words that describe API maturity,
+   * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
+   * "DEPRECATED", "RETIRED".
+   * 
+ * + * string state = 6; + * @return The bytes for state. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 7; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 7; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 8; + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> annotations_; + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 8; + */ + + @java.lang.Override + public boolean containsAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAnnotations().getMap().containsKey(key); + } + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 8; + */ + @java.lang.Override + + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 8; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 8; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, state_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 7); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAnnotations(), + AnnotationsDefaultEntryHolder.defaultEntry, + 8); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, state_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, labels__); + } + for (java.util.Map.Entry entry + : internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry + annotations__ = AnnotationsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, annotations__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ApiVersion)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ApiVersion other = (com.google.cloud.apigeeregistry.v1.ApiVersion) 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 (!getState() + .equals(other.getState())) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!internalGetAnnotations().equals( + other.internalGetAnnotations())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + 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 = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ApiVersion 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.apigeeregistry.v1.ApiVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ApiVersion 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.apigeeregistry.v1.ApiVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ApiVersion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ApiVersion parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ApiVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Describes a particular version of an API.
+   * ApiVersions are what consumers actually use.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiVersion} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ApiVersion) + com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetLabels(); + case 8: + return internalGetAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 7: + return internalGetMutableLabels(); + case 8: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ApiVersion.class, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ApiVersion.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + state_ = ""; + + internalGetMutableLabels().clear(); + internalGetMutableAnnotations().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiVersion getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiVersion build() { + com.google.cloud.apigeeregistry.v1.ApiVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiVersion buildPartial() { + com.google.cloud.apigeeregistry.v1.ApiVersion result = new com.google.cloud.apigeeregistry.v1.ApiVersion(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.state_ = state_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ApiVersion) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ApiVersion)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ApiVersion other) { + if (other == com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getState().isEmpty()) { + state_ = other.state_; + onChanged(); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + internalGetMutableAnnotations().mergeFrom( + other.internalGetAnnotations()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ApiVersion parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ApiVersion) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + } + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + } + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + onChanged(); + return this; + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * Human-meaningful name.
+     * 
+ * + * string display_name = 2; + * @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; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * A detailed description.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. Creation 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. Creation 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; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Creation 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(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Creation 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 (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Creation 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. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. Last 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 updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * Output only. Last 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. Last 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; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Last 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(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Last 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 (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Last 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. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object state_ = ""; + /** + *
+     * A user-definable description of the lifecycle phase of this API version.
+     * Format: free-form, but we expect single words that describe API maturity,
+     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
+     * "DEPRECATED", "RETIRED".
+     * 
+ * + * string state = 6; + * @return The state. + */ + public java.lang.String getState() { + java.lang.Object ref = state_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + state_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A user-definable description of the lifecycle phase of this API version.
+     * Format: free-form, but we expect single words that describe API maturity,
+     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
+     * "DEPRECATED", "RETIRED".
+     * 
+ * + * string state = 6; + * @return The bytes for state. + */ + public com.google.protobuf.ByteString + getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A user-definable description of the lifecycle phase of this API version.
+     * Format: free-form, but we expect single words that describe API maturity,
+     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
+     * "DEPRECATED", "RETIRED".
+     * 
+ * + * string state = 6; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * A user-definable description of the lifecycle phase of this API version.
+     * Format: free-form, but we expect single words that describe API maturity,
+     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
+     * "DEPRECATED", "RETIRED".
+     * 
+ * + * string state = 6; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = getDefaultInstance().getState(); + onChanged(); + return this; + } + /** + *
+     * A user-definable description of the lifecycle phase of this API version.
+     * Format: free-form, but we expect single words that describe API maturity,
+     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
+     * "DEPRECATED", "RETIRED".
+     * 
+ * + * string state = 6; + * @param value The bytes for state to set. + * @return This builder for chaining. + */ + public Builder setStateBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + state_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 7; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 7; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Labels attach identifying metadata to resources. Identifying metadata can
+     * be used to filter list operations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one resource (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with
+     * `apigeeregistry.googleapis.com/` and cannot be changed.
+     * 
+ * + * map<string, string> labels = 7; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> annotations_; + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged();; + if (annotations_ == null) { + annotations_ = com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 8; + */ + + @java.lang.Override + public boolean containsAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAnnotations().getMap().containsKey(key); + } + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 8; + */ + @java.lang.Override + + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 8; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 8; + */ + @java.lang.Override + + public java.lang.String getAnnotationsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 8; + */ + + public Builder removeAnnotations( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableAnnotations().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 8; + */ + public Builder putAnnotations( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableAnnotations().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Annotations attach non-identifying metadata to resources.
+     * Annotation keys and values are less restricted than those of labels, but
+     * should be generally used for small values of broad interest. Larger, topic-
+     * specific metadata should be stored in Artifacts.
+     * 
+ * + * map<string, string> annotations = 8; + */ + + public Builder putAllAnnotations( + java.util.Map values) { + internalGetMutableAnnotations().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ApiVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ApiVersion) + private static final com.google.cloud.apigeeregistry.v1.ApiVersion DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ApiVersion(); + } + + public static com.google.cloud.apigeeregistry.v1.ApiVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiVersion(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionName.java new file mode 100644 index 000000000000..167c21e6964c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ApiVersionName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_API_VERSION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/apis/{api}/versions/{version}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String api; + private final String version; + + @Deprecated + protected ApiVersionName() { + project = null; + location = null; + api = null; + version = null; + } + + private ApiVersionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + api = Preconditions.checkNotNull(builder.getApi()); + version = Preconditions.checkNotNull(builder.getVersion()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public String getVersion() { + return version; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ApiVersionName of(String project, String location, String api, String version) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setVersion(version) + .build(); + } + + public static String format(String project, String location, String api, String version) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setVersion(version) + .build() + .toString(); + } + + public static ApiVersionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_API_VERSION.validatedMatch( + formattedString, "ApiVersionName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("api"), + matchMap.get("version")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ApiVersionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_API_VERSION.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 (api != null) { + fieldMapBuilder.put("api", api); + } + if (version != null) { + fieldMapBuilder.put("version", version); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_API_VERSION.instantiate( + "project", project, "location", location, "api", api, "version", version); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ApiVersionName that = ((ApiVersionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.api, that.api) + && Objects.equals(this.version, that.version); + } + 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(api); + h *= 1000003; + h ^= Objects.hashCode(version); + return h; + } + + /** Builder for projects/{project}/locations/{location}/apis/{api}/versions/{version}. */ + public static class Builder { + private String project; + private String location; + private String api; + private String version; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public String getVersion() { + return version; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setApi(String api) { + this.api = api; + return this; + } + + public Builder setVersion(String version) { + this.version = version; + return this; + } + + private Builder(ApiVersionName apiVersionName) { + this.project = apiVersionName.project; + this.location = apiVersionName.location; + this.api = apiVersionName.api; + this.version = apiVersionName.version; + } + + public ApiVersionName build() { + return new ApiVersionName(this); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionOrBuilder.java new file mode 100644 index 000000000000..883e7f05c143 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionOrBuilder.java @@ -0,0 +1,321 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_models.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ApiVersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ApiVersion) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * Human-meaningful name.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A detailed description.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. Last 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. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * A user-definable description of the lifecycle phase of this API version.
+   * Format: free-form, but we expect single words that describe API maturity,
+   * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
+   * "DEPRECATED", "RETIRED".
+   * 
+ * + * string state = 6; + * @return The state. + */ + java.lang.String getState(); + /** + *
+   * A user-definable description of the lifecycle phase of this API version.
+   * Format: free-form, but we expect single words that describe API maturity,
+   * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
+   * "DEPRECATED", "RETIRED".
+   * 
+ * + * string state = 6; + * @return The bytes for state. + */ + com.google.protobuf.ByteString + getStateBytes(); + + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 7; + */ + int getLabelsCount(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 7; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 7; + */ + + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Labels attach identifying metadata to resources. Identifying metadata can
+   * be used to filter list operations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one resource (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with
+   * `apigeeregistry.googleapis.com/` and cannot be changed.
+   * 
+ * + * map<string, string> labels = 7; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 8; + */ + int getAnnotationsCount(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 8; + */ + boolean containsAnnotations( + java.lang.String key); + /** + * Use {@link #getAnnotationsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAnnotations(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 8; + */ + java.util.Map + getAnnotationsMap(); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 8; + */ + + /* nullable */ +java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Annotations attach non-identifying metadata to resources.
+   * Annotation keys and values are less restricted than those of labels, but
+   * should be generally used for small values of broad interest. Larger, topic-
+   * specific metadata should be stored in Artifacts.
+   * 
+ * + * map<string, string> annotations = 8; + */ + + java.lang.String getAnnotationsOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Artifact.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Artifact.java new file mode 100644 index 000000000000..65564e2a24d6 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Artifact.java @@ -0,0 +1,1631 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_models.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Artifacts of resources. Artifacts are unique (single-value) per resource
+ * and are used to store metadata that is too large or numerous to be stored
+ * directly on the resource. Since artifacts are stored separately from parent
+ * resources, they should generally be used for metadata that is needed
+ * infrequently, i.e., not for display in primary views of the resource but
+ * perhaps displayed or downloaded upon request. The `ListArtifacts` method
+ * allows artifacts to be quickly enumerated and checked for presence without
+ * downloading their (potentially-large) contents.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.Artifact} + */ +public final class Artifact extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.Artifact) + ArtifactOrBuilder { +private static final long serialVersionUID = 0L; + // Use Artifact.newBuilder() to construct. + private Artifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Artifact() { + name_ = ""; + mimeType_ = ""; + hash_ = ""; + contents_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Artifact(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Artifact( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 40: { + + sizeBytes_ = input.readInt32(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + hash_ = s; + break; + } + case 58: { + + contents_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Artifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Artifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.Artifact.class, com.google.cloud.apigeeregistry.v1.Artifact.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .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 updateTime_ != null; + } + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .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. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 4; + private volatile java.lang.Object mimeType_; + /** + *
+   * A content type specifier for the artifact.
+   * Content type specifiers are Media Types
+   * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
+   * parameter that specifies a schema for the stored information.
+   * Content types can specify compression. Currently only GZip compression is
+   * supported (indicated with "+gzip").
+   * 
+ * + * string mime_type = 4; + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + 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(); + mimeType_ = s; + return s; + } + } + /** + *
+   * A content type specifier for the artifact.
+   * Content type specifiers are Media Types
+   * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
+   * parameter that specifies a schema for the stored information.
+   * Content types can specify compression. Currently only GZip compression is
+   * supported (indicated with "+gzip").
+   * 
+ * + * string mime_type = 4; + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_BYTES_FIELD_NUMBER = 5; + private int sizeBytes_; + /** + *
+   * Output only. The size of the artifact in bytes. If the artifact is gzipped, this is
+   * the size of the uncompressed artifact.
+   * 
+ * + * int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The sizeBytes. + */ + @java.lang.Override + public int getSizeBytes() { + return sizeBytes_; + } + + public static final int HASH_FIELD_NUMBER = 6; + private volatile java.lang.Object hash_; + /** + *
+   * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
+   * this is the hash of the uncompressed artifact.
+   * 
+ * + * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The hash. + */ + @java.lang.Override + public java.lang.String getHash() { + java.lang.Object ref = hash_; + 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(); + hash_ = s; + return s; + } + } + /** + *
+   * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
+   * this is the hash of the uncompressed artifact.
+   * 
+ * + * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENTS_FIELD_NUMBER = 7; + private com.google.protobuf.ByteString contents_; + /** + *
+   * Input only. The contents of the artifact.
+   * Provided by API callers when artifacts are created or replaced.
+   * To access the contents of an artifact, use GetArtifactContents.
+   * 
+ * + * bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return The contents. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContents() { + return contents_; + } + + 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mimeType_); + } + if (sizeBytes_ != 0) { + output.writeInt32(5, sizeBytes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, hash_); + } + if (!contents_.isEmpty()) { + output.writeBytes(7, contents_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mimeType_); + } + if (sizeBytes_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, sizeBytes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, hash_); + } + if (!contents_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(7, contents_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.Artifact)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.Artifact other = (com.google.cloud.apigeeregistry.v1.Artifact) obj; + + if (!getName() + .equals(other.getName())) 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 (!getMimeType() + .equals(other.getMimeType())) return false; + if (getSizeBytes() + != other.getSizeBytes()) return false; + if (!getHash() + .equals(other.getHash())) return false; + if (!getContents() + .equals(other.getContents())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + SIZE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getSizeBytes(); + hash = (37 * hash) + HASH_FIELD_NUMBER; + hash = (53 * hash) + getHash().hashCode(); + hash = (37 * hash) + CONTENTS_FIELD_NUMBER; + hash = (53 * hash) + getContents().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Artifact 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.apigeeregistry.v1.Artifact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Artifact 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.apigeeregistry.v1.Artifact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Artifact parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Artifact parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.Artifact prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Artifacts of resources. Artifacts are unique (single-value) per resource
+   * and are used to store metadata that is too large or numerous to be stored
+   * directly on the resource. Since artifacts are stored separately from parent
+   * resources, they should generally be used for metadata that is needed
+   * infrequently, i.e., not for display in primary views of the resource but
+   * perhaps displayed or downloaded upon request. The `ListArtifacts` method
+   * allows artifacts to be quickly enumerated and checked for presence without
+   * downloading their (potentially-large) contents.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.Artifact} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.Artifact) + com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Artifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Artifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.Artifact.class, com.google.cloud.apigeeregistry.v1.Artifact.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.Artifact.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + mimeType_ = ""; + + sizeBytes_ = 0; + + hash_ = ""; + + contents_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Artifact_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Artifact getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Artifact build() { + com.google.cloud.apigeeregistry.v1.Artifact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Artifact buildPartial() { + com.google.cloud.apigeeregistry.v1.Artifact result = new com.google.cloud.apigeeregistry.v1.Artifact(this); + result.name_ = name_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.mimeType_ = mimeType_; + result.sizeBytes_ = sizeBytes_; + result.hash_ = hash_; + result.contents_ = contents_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.Artifact) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.Artifact)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.Artifact other) { + if (other == com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + if (other.getSizeBytes() != 0) { + setSizeBytes(other.getSizeBytes()); + } + if (!other.getHash().isEmpty()) { + hash_ = other.hash_; + onChanged(); + } + if (other.getContents() != com.google.protobuf.ByteString.EMPTY) { + setContents(other.getContents()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.Artifact parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.Artifact) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .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. Last update timestamp.
+     * 
+ * + * .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; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .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(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .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. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object mimeType_ = ""; + /** + *
+     * A content type specifier for the artifact.
+     * Content type specifiers are Media Types
+     * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
+     * parameter that specifies a schema for the stored information.
+     * Content types can specify compression. Currently only GZip compression is
+     * supported (indicated with "+gzip").
+     * 
+ * + * string mime_type = 4; + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A content type specifier for the artifact.
+     * Content type specifiers are Media Types
+     * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
+     * parameter that specifies a schema for the stored information.
+     * Content types can specify compression. Currently only GZip compression is
+     * supported (indicated with "+gzip").
+     * 
+ * + * string mime_type = 4; + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A content type specifier for the artifact.
+     * Content type specifiers are Media Types
+     * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
+     * parameter that specifies a schema for the stored information.
+     * Content types can specify compression. Currently only GZip compression is
+     * supported (indicated with "+gzip").
+     * 
+ * + * string mime_type = 4; + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + *
+     * A content type specifier for the artifact.
+     * Content type specifiers are Media Types
+     * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
+     * parameter that specifies a schema for the stored information.
+     * Content types can specify compression. Currently only GZip compression is
+     * supported (indicated with "+gzip").
+     * 
+ * + * string mime_type = 4; + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + *
+     * A content type specifier for the artifact.
+     * Content type specifiers are Media Types
+     * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
+     * parameter that specifies a schema for the stored information.
+     * Content types can specify compression. Currently only GZip compression is
+     * supported (indicated with "+gzip").
+     * 
+ * + * string mime_type = 4; + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + + private int sizeBytes_ ; + /** + *
+     * Output only. The size of the artifact in bytes. If the artifact is gzipped, this is
+     * the size of the uncompressed artifact.
+     * 
+ * + * int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The sizeBytes. + */ + @java.lang.Override + public int getSizeBytes() { + return sizeBytes_; + } + /** + *
+     * Output only. The size of the artifact in bytes. If the artifact is gzipped, this is
+     * the size of the uncompressed artifact.
+     * 
+ * + * int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The sizeBytes to set. + * @return This builder for chaining. + */ + public Builder setSizeBytes(int value) { + + sizeBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The size of the artifact in bytes. If the artifact is gzipped, this is
+     * the size of the uncompressed artifact.
+     * 
+ * + * int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearSizeBytes() { + + sizeBytes_ = 0; + onChanged(); + return this; + } + + private java.lang.Object hash_ = ""; + /** + *
+     * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
+     * this is the hash of the uncompressed artifact.
+     * 
+ * + * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The hash. + */ + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
+     * this is the hash of the uncompressed artifact.
+     * 
+ * + * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for hash. + */ + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
+     * this is the hash of the uncompressed artifact.
+     * 
+ * + * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hash_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
+     * this is the hash of the uncompressed artifact.
+     * 
+ * + * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearHash() { + + hash_ = getDefaultInstance().getHash(); + onChanged(); + return this; + } + /** + *
+     * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
+     * this is the hash of the uncompressed artifact.
+     * 
+ * + * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for hash to set. + * @return This builder for chaining. + */ + public Builder setHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hash_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString contents_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Input only. The contents of the artifact.
+     * Provided by API callers when artifacts are created or replaced.
+     * To access the contents of an artifact, use GetArtifactContents.
+     * 
+ * + * bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return The contents. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContents() { + return contents_; + } + /** + *
+     * Input only. The contents of the artifact.
+     * Provided by API callers when artifacts are created or replaced.
+     * To access the contents of an artifact, use GetArtifactContents.
+     * 
+ * + * bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param value The contents to set. + * @return This builder for chaining. + */ + public Builder setContents(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + contents_ = value; + onChanged(); + return this; + } + /** + *
+     * Input only. The contents of the artifact.
+     * Provided by API callers when artifacts are created or replaced.
+     * To access the contents of an artifact, use GetArtifactContents.
+     * 
+ * + * bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearContents() { + + contents_ = getDefaultInstance().getContents(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.Artifact) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.Artifact) + private static final com.google.cloud.apigeeregistry.v1.Artifact DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.Artifact(); + } + + public static com.google.cloud.apigeeregistry.v1.Artifact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Artifact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Artifact(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Artifact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactName.java new file mode 100644 index 000000000000..9d92d788f93c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactName.java @@ -0,0 +1,778 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ArtifactName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ARTIFACT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/artifacts/{artifact}"); + private static final PathTemplate PROJECT_LOCATION_API_ARTIFACT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}"); + private static final PathTemplate PROJECT_LOCATION_API_VERSION_ARTIFACT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}"); + private static final PathTemplate PROJECT_LOCATION_API_VERSION_SPEC_ARTIFACT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}"); + private static final PathTemplate PROJECT_LOCATION_API_DEPLOYMENT_ARTIFACT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + private final String artifact; + private final String api; + private final String version; + private final String spec; + private final String deployment; + + @Deprecated + protected ArtifactName() { + project = null; + location = null; + artifact = null; + api = null; + version = null; + spec = null; + deployment = null; + } + + private ArtifactName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + artifact = Preconditions.checkNotNull(builder.getArtifact()); + api = null; + version = null; + spec = null; + deployment = null; + pathTemplate = PROJECT_LOCATION_ARTIFACT; + } + + private ArtifactName(ProjectLocationApiArtifactBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + api = Preconditions.checkNotNull(builder.getApi()); + artifact = Preconditions.checkNotNull(builder.getArtifact()); + version = null; + spec = null; + deployment = null; + pathTemplate = PROJECT_LOCATION_API_ARTIFACT; + } + + private ArtifactName(ProjectLocationApiVersionArtifactBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + api = Preconditions.checkNotNull(builder.getApi()); + version = Preconditions.checkNotNull(builder.getVersion()); + artifact = Preconditions.checkNotNull(builder.getArtifact()); + spec = null; + deployment = null; + pathTemplate = PROJECT_LOCATION_API_VERSION_ARTIFACT; + } + + private ArtifactName(ProjectLocationApiVersionSpecArtifactBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + api = Preconditions.checkNotNull(builder.getApi()); + version = Preconditions.checkNotNull(builder.getVersion()); + spec = Preconditions.checkNotNull(builder.getSpec()); + artifact = Preconditions.checkNotNull(builder.getArtifact()); + deployment = null; + pathTemplate = PROJECT_LOCATION_API_VERSION_SPEC_ARTIFACT; + } + + private ArtifactName(ProjectLocationApiDeploymentArtifactBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + api = Preconditions.checkNotNull(builder.getApi()); + deployment = Preconditions.checkNotNull(builder.getDeployment()); + artifact = Preconditions.checkNotNull(builder.getArtifact()); + version = null; + spec = null; + pathTemplate = PROJECT_LOCATION_API_DEPLOYMENT_ARTIFACT; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getArtifact() { + return artifact; + } + + public String getApi() { + return api; + } + + public String getVersion() { + return version; + } + + public String getSpec() { + return spec; + } + + public String getDeployment() { + return deployment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationArtifactBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationApiArtifactBuilder newProjectLocationApiArtifactBuilder() { + return new ProjectLocationApiArtifactBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationApiVersionArtifactBuilder + newProjectLocationApiVersionArtifactBuilder() { + return new ProjectLocationApiVersionArtifactBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationApiVersionSpecArtifactBuilder + newProjectLocationApiVersionSpecArtifactBuilder() { + return new ProjectLocationApiVersionSpecArtifactBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationApiDeploymentArtifactBuilder + newProjectLocationApiDeploymentArtifactBuilder() { + return new ProjectLocationApiDeploymentArtifactBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ArtifactName of(String project, String location, String artifact) { + return newBuilder().setProject(project).setLocation(location).setArtifact(artifact).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ArtifactName ofProjectLocationArtifactName( + String project, String location, String artifact) { + return newBuilder().setProject(project).setLocation(location).setArtifact(artifact).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ArtifactName ofProjectLocationApiArtifactName( + String project, String location, String api, String artifact) { + return newProjectLocationApiArtifactBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setArtifact(artifact) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ArtifactName ofProjectLocationApiVersionArtifactName( + String project, String location, String api, String version, String artifact) { + return newProjectLocationApiVersionArtifactBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setVersion(version) + .setArtifact(artifact) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ArtifactName ofProjectLocationApiVersionSpecArtifactName( + String project, String location, String api, String version, String spec, String artifact) { + return newProjectLocationApiVersionSpecArtifactBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setVersion(version) + .setSpec(spec) + .setArtifact(artifact) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ArtifactName ofProjectLocationApiDeploymentArtifactName( + String project, String location, String api, String deployment, String artifact) { + return newProjectLocationApiDeploymentArtifactBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setDeployment(deployment) + .setArtifact(artifact) + .build(); + } + + public static String format(String project, String location, String artifact) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setArtifact(artifact) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationArtifactName( + String project, String location, String artifact) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setArtifact(artifact) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationApiArtifactName( + String project, String location, String api, String artifact) { + return newProjectLocationApiArtifactBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setArtifact(artifact) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationApiVersionArtifactName( + String project, String location, String api, String version, String artifact) { + return newProjectLocationApiVersionArtifactBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setVersion(version) + .setArtifact(artifact) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationApiVersionSpecArtifactName( + String project, String location, String api, String version, String spec, String artifact) { + return newProjectLocationApiVersionSpecArtifactBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setVersion(version) + .setSpec(spec) + .setArtifact(artifact) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationApiDeploymentArtifactName( + String project, String location, String api, String deployment, String artifact) { + return newProjectLocationApiDeploymentArtifactBuilder() + .setProject(project) + .setLocation(location) + .setApi(api) + .setDeployment(deployment) + .setArtifact(artifact) + .build() + .toString(); + } + + public static ArtifactName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION_ARTIFACT.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_ARTIFACT.match(formattedString); + return ofProjectLocationArtifactName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("artifact")); + } else if (PROJECT_LOCATION_API_ARTIFACT.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_API_ARTIFACT.match(formattedString); + return ofProjectLocationApiArtifactName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("api"), + matchMap.get("artifact")); + } else if (PROJECT_LOCATION_API_VERSION_ARTIFACT.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_API_VERSION_ARTIFACT.match(formattedString); + return ofProjectLocationApiVersionArtifactName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("api"), + matchMap.get("version"), + matchMap.get("artifact")); + } else if (PROJECT_LOCATION_API_VERSION_SPEC_ARTIFACT.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_API_VERSION_SPEC_ARTIFACT.match(formattedString); + return ofProjectLocationApiVersionSpecArtifactName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("api"), + matchMap.get("version"), + matchMap.get("spec"), + matchMap.get("artifact")); + } else if (PROJECT_LOCATION_API_DEPLOYMENT_ARTIFACT.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_API_DEPLOYMENT_ARTIFACT.match(formattedString); + return ofProjectLocationApiDeploymentArtifactName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("api"), + matchMap.get("deployment"), + matchMap.get("artifact")); + } + throw new ValidationException("ArtifactName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ArtifactName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ARTIFACT.matches(formattedString) + || PROJECT_LOCATION_API_ARTIFACT.matches(formattedString) + || PROJECT_LOCATION_API_VERSION_ARTIFACT.matches(formattedString) + || PROJECT_LOCATION_API_VERSION_SPEC_ARTIFACT.matches(formattedString) + || PROJECT_LOCATION_API_DEPLOYMENT_ARTIFACT.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 (artifact != null) { + fieldMapBuilder.put("artifact", artifact); + } + if (api != null) { + fieldMapBuilder.put("api", api); + } + if (version != null) { + fieldMapBuilder.put("version", version); + } + if (spec != null) { + fieldMapBuilder.put("spec", spec); + } + if (deployment != null) { + fieldMapBuilder.put("deployment", deployment); + } + 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(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ArtifactName that = ((ArtifactName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.artifact, that.artifact) + && Objects.equals(this.api, that.api) + && Objects.equals(this.version, that.version) + && Objects.equals(this.spec, that.spec) + && Objects.equals(this.deployment, that.deployment); + } + 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(artifact); + h *= 1000003; + h ^= Objects.hashCode(api); + h *= 1000003; + h ^= Objects.hashCode(version); + h *= 1000003; + h ^= Objects.hashCode(spec); + h *= 1000003; + h ^= Objects.hashCode(deployment); + return h; + } + + /** Builder for projects/{project}/locations/{location}/artifacts/{artifact}. */ + public static class Builder { + private String project; + private String location; + private String artifact; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getArtifact() { + return artifact; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setArtifact(String artifact) { + this.artifact = artifact; + return this; + } + + private Builder(ArtifactName artifactName) { + Preconditions.checkArgument( + Objects.equals(artifactName.pathTemplate, PROJECT_LOCATION_ARTIFACT), + "toBuilder is only supported when ArtifactName has the pattern of projects/{project}/locations/{location}/artifacts/{artifact}"); + this.project = artifactName.project; + this.location = artifactName.location; + this.artifact = artifactName.artifact; + } + + public ArtifactName build() { + return new ArtifactName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationApiArtifactBuilder { + private String project; + private String location; + private String api; + private String artifact; + + protected ProjectLocationApiArtifactBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public String getArtifact() { + return artifact; + } + + public ProjectLocationApiArtifactBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationApiArtifactBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationApiArtifactBuilder setApi(String api) { + this.api = api; + return this; + } + + public ProjectLocationApiArtifactBuilder setArtifact(String artifact) { + this.artifact = artifact; + return this; + } + + public ArtifactName build() { + return new ArtifactName(this); + } + } + + /** + * Builder for + * projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationApiVersionArtifactBuilder { + private String project; + private String location; + private String api; + private String version; + private String artifact; + + protected ProjectLocationApiVersionArtifactBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public String getVersion() { + return version; + } + + public String getArtifact() { + return artifact; + } + + public ProjectLocationApiVersionArtifactBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationApiVersionArtifactBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationApiVersionArtifactBuilder setApi(String api) { + this.api = api; + return this; + } + + public ProjectLocationApiVersionArtifactBuilder setVersion(String version) { + this.version = version; + return this; + } + + public ProjectLocationApiVersionArtifactBuilder setArtifact(String artifact) { + this.artifact = artifact; + return this; + } + + public ArtifactName build() { + return new ArtifactName(this); + } + } + + /** + * Builder for + * projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationApiVersionSpecArtifactBuilder { + private String project; + private String location; + private String api; + private String version; + private String spec; + private String artifact; + + protected ProjectLocationApiVersionSpecArtifactBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public String getVersion() { + return version; + } + + public String getSpec() { + return spec; + } + + public String getArtifact() { + return artifact; + } + + public ProjectLocationApiVersionSpecArtifactBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationApiVersionSpecArtifactBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationApiVersionSpecArtifactBuilder setApi(String api) { + this.api = api; + return this; + } + + public ProjectLocationApiVersionSpecArtifactBuilder setVersion(String version) { + this.version = version; + return this; + } + + public ProjectLocationApiVersionSpecArtifactBuilder setSpec(String spec) { + this.spec = spec; + return this; + } + + public ProjectLocationApiVersionSpecArtifactBuilder setArtifact(String artifact) { + this.artifact = artifact; + return this; + } + + public ArtifactName build() { + return new ArtifactName(this); + } + } + + /** + * Builder for + * projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationApiDeploymentArtifactBuilder { + private String project; + private String location; + private String api; + private String deployment; + private String artifact; + + protected ProjectLocationApiDeploymentArtifactBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApi() { + return api; + } + + public String getDeployment() { + return deployment; + } + + public String getArtifact() { + return artifact; + } + + public ProjectLocationApiDeploymentArtifactBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationApiDeploymentArtifactBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationApiDeploymentArtifactBuilder setApi(String api) { + this.api = api; + return this; + } + + public ProjectLocationApiDeploymentArtifactBuilder setDeployment(String deployment) { + this.deployment = deployment; + return this; + } + + public ProjectLocationApiDeploymentArtifactBuilder setArtifact(String artifact) { + this.artifact = artifact; + return this; + } + + public ArtifactName build() { + return new ArtifactName(this); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactOrBuilder.java new file mode 100644 index 000000000000..9b1afbbcc67d --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactOrBuilder.java @@ -0,0 +1,158 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_models.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ArtifactOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.Artifact) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * A content type specifier for the artifact.
+   * Content type specifiers are Media Types
+   * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
+   * parameter that specifies a schema for the stored information.
+   * Content types can specify compression. Currently only GZip compression is
+   * supported (indicated with "+gzip").
+   * 
+ * + * string mime_type = 4; + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + *
+   * A content type specifier for the artifact.
+   * Content type specifiers are Media Types
+   * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
+   * parameter that specifies a schema for the stored information.
+   * Content types can specify compression. Currently only GZip compression is
+   * supported (indicated with "+gzip").
+   * 
+ * + * string mime_type = 4; + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString + getMimeTypeBytes(); + + /** + *
+   * Output only. The size of the artifact in bytes. If the artifact is gzipped, this is
+   * the size of the uncompressed artifact.
+   * 
+ * + * int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The sizeBytes. + */ + int getSizeBytes(); + + /** + *
+   * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
+   * this is the hash of the uncompressed artifact.
+   * 
+ * + * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The hash. + */ + java.lang.String getHash(); + /** + *
+   * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
+   * this is the hash of the uncompressed artifact.
+   * 
+ * + * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for hash. + */ + com.google.protobuf.ByteString + getHashBytes(); + + /** + *
+   * Input only. The contents of the artifact.
+   * Provided by API callers when artifacts are created or replaced.
+   * To access the contents of an artifact, use GetArtifactContents.
+   * 
+ * + * bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return The contents. + */ + com.google.protobuf.ByteString getContents(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequest.java new file mode 100644 index 000000000000..8bee5d23969e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequest.java @@ -0,0 +1,1032 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for CreateApiDeployment.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest} + */ +public final class CreateApiDeploymentRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) + CreateApiDeploymentRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateApiDeploymentRequest.newBuilder() to construct. + private CreateApiDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateApiDeploymentRequest() { + parent_ = ""; + apiDeploymentId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateApiDeploymentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateApiDeploymentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder subBuilder = null; + if (apiDeployment_ != null) { + subBuilder = apiDeployment_.toBuilder(); + } + apiDeployment_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiDeployment.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(apiDeployment_); + apiDeployment_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + apiDeploymentId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent, which owns this collection of deployments.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 deployments.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 API_DEPLOYMENT_FIELD_NUMBER = 2; + private com.google.cloud.apigeeregistry.v1.ApiDeployment apiDeployment_; + /** + *
+   * Required. The deployment to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiDeployment field is set. + */ + @java.lang.Override + public boolean hasApiDeployment() { + return apiDeployment_ != null; + } + /** + *
+   * Required. The deployment to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiDeployment. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment() { + return apiDeployment_ == null ? com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; + } + /** + *
+   * Required. The deployment to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder() { + return getApiDeployment(); + } + + public static final int API_DEPLOYMENT_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object apiDeploymentId_; + /** + *
+   * Required. The ID to use for the deployment, which will become the final component of
+   * the deployment's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiDeploymentId. + */ + @java.lang.Override + public java.lang.String getApiDeploymentId() { + java.lang.Object ref = apiDeploymentId_; + 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(); + apiDeploymentId_ = s; + return s; + } + } + /** + *
+   * Required. The ID to use for the deployment, which will become the final component of
+   * the deployment's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiDeploymentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getApiDeploymentIdBytes() { + java.lang.Object ref = apiDeploymentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiDeploymentId_ = 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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (apiDeployment_ != null) { + output.writeMessage(2, getApiDeployment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiDeploymentId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, apiDeploymentId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (apiDeployment_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getApiDeployment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiDeploymentId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, apiDeploymentId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest other = (com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasApiDeployment() != other.hasApiDeployment()) return false; + if (hasApiDeployment()) { + if (!getApiDeployment() + .equals(other.getApiDeployment())) return false; + } + if (!getApiDeploymentId() + .equals(other.getApiDeploymentId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasApiDeployment()) { + hash = (37 * hash) + API_DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getApiDeployment().hashCode(); + } + hash = (37 * hash) + API_DEPLOYMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getApiDeploymentId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest 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.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest 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.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateApiDeployment.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) + com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (apiDeploymentBuilder_ == null) { + apiDeployment_ = null; + } else { + apiDeployment_ = null; + apiDeploymentBuilder_ = null; + } + apiDeploymentId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest build() { + com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest result = new com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest(this); + result.parent_ = parent_; + if (apiDeploymentBuilder_ == null) { + result.apiDeployment_ = apiDeployment_; + } else { + result.apiDeployment_ = apiDeploymentBuilder_.build(); + } + result.apiDeploymentId_ = apiDeploymentId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasApiDeployment()) { + mergeApiDeployment(other.getApiDeployment()); + } + if (!other.getApiDeploymentId().isEmpty()) { + apiDeploymentId_ = other.apiDeploymentId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent, which owns this collection of deployments.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 deployments.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 deployments.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of deployments.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of deployments.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.apigeeregistry.v1.ApiDeployment apiDeployment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> apiDeploymentBuilder_; + /** + *
+     * Required. The deployment to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiDeployment field is set. + */ + public boolean hasApiDeployment() { + return apiDeploymentBuilder_ != null || apiDeployment_ != null; + } + /** + *
+     * Required. The deployment to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiDeployment. + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment() { + if (apiDeploymentBuilder_ == null) { + return apiDeployment_ == null ? com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; + } else { + return apiDeploymentBuilder_.getMessage(); + } + } + /** + *
+     * Required. The deployment to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiDeployment(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { + if (apiDeploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiDeployment_ = value; + onChanged(); + } else { + apiDeploymentBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The deployment to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiDeployment( + com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { + if (apiDeploymentBuilder_ == null) { + apiDeployment_ = builderForValue.build(); + onChanged(); + } else { + apiDeploymentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The deployment to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeApiDeployment(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { + if (apiDeploymentBuilder_ == null) { + if (apiDeployment_ != null) { + apiDeployment_ = + com.google.cloud.apigeeregistry.v1.ApiDeployment.newBuilder(apiDeployment_).mergeFrom(value).buildPartial(); + } else { + apiDeployment_ = value; + } + onChanged(); + } else { + apiDeploymentBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The deployment to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearApiDeployment() { + if (apiDeploymentBuilder_ == null) { + apiDeployment_ = null; + onChanged(); + } else { + apiDeployment_ = null; + apiDeploymentBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The deployment to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder getApiDeploymentBuilder() { + + onChanged(); + return getApiDeploymentFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The deployment to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder() { + if (apiDeploymentBuilder_ != null) { + return apiDeploymentBuilder_.getMessageOrBuilder(); + } else { + return apiDeployment_ == null ? + com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; + } + } + /** + *
+     * Required. The deployment to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> + getApiDeploymentFieldBuilder() { + if (apiDeploymentBuilder_ == null) { + apiDeploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder>( + getApiDeployment(), + getParentForChildren(), + isClean()); + apiDeployment_ = null; + } + return apiDeploymentBuilder_; + } + + private java.lang.Object apiDeploymentId_ = ""; + /** + *
+     * Required. The ID to use for the deployment, which will become the final component of
+     * the deployment's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiDeploymentId. + */ + public java.lang.String getApiDeploymentId() { + java.lang.Object ref = apiDeploymentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiDeploymentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The ID to use for the deployment, which will become the final component of
+     * the deployment's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiDeploymentId. + */ + public com.google.protobuf.ByteString + getApiDeploymentIdBytes() { + java.lang.Object ref = apiDeploymentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiDeploymentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The ID to use for the deployment, which will become the final component of
+     * the deployment's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The apiDeploymentId to set. + * @return This builder for chaining. + */ + public Builder setApiDeploymentId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiDeploymentId_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the deployment, which will become the final component of
+     * the deployment's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearApiDeploymentId() { + + apiDeploymentId_ = getDefaultInstance().getApiDeploymentId(); + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the deployment, which will become the final component of
+     * the deployment's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for apiDeploymentId to set. + * @return This builder for chaining. + */ + public Builder setApiDeploymentIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiDeploymentId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) + private static final com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateApiDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateApiDeploymentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequestOrBuilder.java new file mode 100644 index 000000000000..19d23f27f2ad --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequestOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface CreateApiDeploymentRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent, which owns this collection of deployments.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 deployments.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The deployment to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiDeployment field is set. + */ + boolean hasApiDeployment(); + /** + *
+   * Required. The deployment to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiDeployment. + */ + com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment(); + /** + *
+   * Required. The deployment to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder(); + + /** + *
+   * Required. The ID to use for the deployment, which will become the final component of
+   * the deployment's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiDeploymentId. + */ + java.lang.String getApiDeploymentId(); + /** + *
+   * Required. The ID to use for the deployment, which will become the final component of
+   * the deployment's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiDeploymentId. + */ + com.google.protobuf.ByteString + getApiDeploymentIdBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequest.java new file mode 100644 index 000000000000..a27171874fa7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequest.java @@ -0,0 +1,1032 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for CreateApi.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiRequest} + */ +public final class CreateApiRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateApiRequest) + CreateApiRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateApiRequest.newBuilder() to construct. + private CreateApiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateApiRequest() { + parent_ = ""; + apiId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateApiRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateApiRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.apigeeregistry.v1.Api.Builder subBuilder = null; + if (api_ != null) { + subBuilder = api_.toBuilder(); + } + api_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Api.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(api_); + api_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + apiId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateApiRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent, which owns this collection of APIs.
+   * Format: `projects/*/locations/*`
+   * 
+ * + * 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 APIs.
+   * Format: `projects/*/locations/*`
+   * 
+ * + * 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 API_FIELD_NUMBER = 2; + private com.google.cloud.apigeeregistry.v1.Api api_; + /** + *
+   * Required. The API to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the api field is set. + */ + @java.lang.Override + public boolean hasApi() { + return api_ != null; + } + /** + *
+   * Required. The API to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The api. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Api getApi() { + return api_ == null ? com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; + } + /** + *
+   * Required. The API to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder() { + return getApi(); + } + + public static final int API_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object apiId_; + /** + *
+   * Required. The ID to use for the API, which will become the final component of
+   * the API's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiId. + */ + @java.lang.Override + public java.lang.String getApiId() { + java.lang.Object ref = apiId_; + 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(); + apiId_ = s; + return s; + } + } + /** + *
+   * Required. The ID to use for the API, which will become the final component of
+   * the API's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getApiIdBytes() { + java.lang.Object ref = apiId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiId_ = 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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (api_ != null) { + output.writeMessage(2, getApi()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, apiId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (api_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getApi()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, apiId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateApiRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.CreateApiRequest other = (com.google.cloud.apigeeregistry.v1.CreateApiRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasApi() != other.hasApi()) return false; + if (hasApi()) { + if (!getApi() + .equals(other.getApi())) return false; + } + if (!getApiId() + .equals(other.getApiId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasApi()) { + hash = (37 * hash) + API_FIELD_NUMBER; + hash = (53 * hash) + getApi().hashCode(); + } + hash = (37 * hash) + API_ID_FIELD_NUMBER; + hash = (53 * hash) + getApiId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiRequest 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.apigeeregistry.v1.CreateApiRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiRequest 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.apigeeregistry.v1.CreateApiRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateApiRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateApi.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateApiRequest) + com.google.cloud.apigeeregistry.v1.CreateApiRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateApiRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.CreateApiRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (apiBuilder_ == null) { + api_ = null; + } else { + api_ = null; + apiBuilder_ = null; + } + apiId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.CreateApiRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiRequest build() { + com.google.cloud.apigeeregistry.v1.CreateApiRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.CreateApiRequest result = new com.google.cloud.apigeeregistry.v1.CreateApiRequest(this); + result.parent_ = parent_; + if (apiBuilder_ == null) { + result.api_ = api_; + } else { + result.api_ = apiBuilder_.build(); + } + result.apiId_ = apiId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.CreateApiRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateApiRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateApiRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.CreateApiRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasApi()) { + mergeApi(other.getApi()); + } + if (!other.getApiId().isEmpty()) { + apiId_ = other.apiId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.CreateApiRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateApiRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent, which owns this collection of APIs.
+     * Format: `projects/*/locations/*`
+     * 
+ * + * 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 APIs.
+     * Format: `projects/*/locations/*`
+     * 
+ * + * 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 APIs.
+     * Format: `projects/*/locations/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of APIs.
+     * Format: `projects/*/locations/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of APIs.
+     * Format: `projects/*/locations/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.apigeeregistry.v1.Api api_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> apiBuilder_; + /** + *
+     * Required. The API to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the api field is set. + */ + public boolean hasApi() { + return apiBuilder_ != null || api_ != null; + } + /** + *
+     * Required. The API to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The api. + */ + public com.google.cloud.apigeeregistry.v1.Api getApi() { + if (apiBuilder_ == null) { + return api_ == null ? com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; + } else { + return apiBuilder_.getMessage(); + } + } + /** + *
+     * Required. The API to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApi(com.google.cloud.apigeeregistry.v1.Api value) { + if (apiBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + api_ = value; + onChanged(); + } else { + apiBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The API to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApi( + com.google.cloud.apigeeregistry.v1.Api.Builder builderForValue) { + if (apiBuilder_ == null) { + api_ = builderForValue.build(); + onChanged(); + } else { + apiBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The API to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeApi(com.google.cloud.apigeeregistry.v1.Api value) { + if (apiBuilder_ == null) { + if (api_ != null) { + api_ = + com.google.cloud.apigeeregistry.v1.Api.newBuilder(api_).mergeFrom(value).buildPartial(); + } else { + api_ = value; + } + onChanged(); + } else { + apiBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The API to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearApi() { + if (apiBuilder_ == null) { + api_ = null; + onChanged(); + } else { + api_ = null; + apiBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The API to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.Api.Builder getApiBuilder() { + + onChanged(); + return getApiFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The API to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder() { + if (apiBuilder_ != null) { + return apiBuilder_.getMessageOrBuilder(); + } else { + return api_ == null ? + com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; + } + } + /** + *
+     * Required. The API to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> + getApiFieldBuilder() { + if (apiBuilder_ == null) { + apiBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder>( + getApi(), + getParentForChildren(), + isClean()); + api_ = null; + } + return apiBuilder_; + } + + private java.lang.Object apiId_ = ""; + /** + *
+     * Required. The ID to use for the API, which will become the final component of
+     * the API's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiId. + */ + public java.lang.String getApiId() { + java.lang.Object ref = apiId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The ID to use for the API, which will become the final component of
+     * the API's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiId. + */ + public com.google.protobuf.ByteString + getApiIdBytes() { + java.lang.Object ref = apiId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The ID to use for the API, which will become the final component of
+     * the API's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The apiId to set. + * @return This builder for chaining. + */ + public Builder setApiId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiId_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the API, which will become the final component of
+     * the API's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearApiId() { + + apiId_ = getDefaultInstance().getApiId(); + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the API, which will become the final component of
+     * the API's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for apiId to set. + * @return This builder for chaining. + */ + public Builder setApiIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateApiRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateApiRequest) + private static final com.google.cloud.apigeeregistry.v1.CreateApiRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateApiRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.CreateApiRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateApiRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateApiRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequestOrBuilder.java new file mode 100644 index 000000000000..84746e0e4597 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequestOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface CreateApiRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateApiRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent, which owns this collection of APIs.
+   * Format: `projects/*/locations/*`
+   * 
+ * + * 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 APIs.
+   * Format: `projects/*/locations/*`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The API to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the api field is set. + */ + boolean hasApi(); + /** + *
+   * Required. The API to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The api. + */ + com.google.cloud.apigeeregistry.v1.Api getApi(); + /** + *
+   * Required. The API to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder(); + + /** + *
+   * Required. The ID to use for the API, which will become the final component of
+   * the API's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiId. + */ + java.lang.String getApiId(); + /** + *
+   * Required. The ID to use for the API, which will become the final component of
+   * the API's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiId. + */ + com.google.protobuf.ByteString + getApiIdBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequest.java new file mode 100644 index 000000000000..b8f4bb7c6202 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequest.java @@ -0,0 +1,1032 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for CreateApiSpec.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiSpecRequest} + */ +public final class CreateApiSpecRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateApiSpecRequest) + CreateApiSpecRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateApiSpecRequest.newBuilder() to construct. + private CreateApiSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateApiSpecRequest() { + parent_ = ""; + apiSpecId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateApiSpecRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateApiSpecRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.apigeeregistry.v1.ApiSpec.Builder subBuilder = null; + if (apiSpec_ != null) { + subBuilder = apiSpec_.toBuilder(); + } + apiSpec_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(apiSpec_); + apiSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + apiSpecId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent, which owns this collection of specs.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * 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 specs.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * 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 API_SPEC_FIELD_NUMBER = 2; + private com.google.cloud.apigeeregistry.v1.ApiSpec apiSpec_; + /** + *
+   * Required. The spec to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiSpec field is set. + */ + @java.lang.Override + public boolean hasApiSpec() { + return apiSpec_ != null; + } + /** + *
+   * Required. The spec to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiSpec. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec() { + return apiSpec_ == null ? com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; + } + /** + *
+   * Required. The spec to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder() { + return getApiSpec(); + } + + public static final int API_SPEC_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object apiSpecId_; + /** + *
+   * Required. The ID to use for the spec, which will become the final component of
+   * the spec's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiSpecId. + */ + @java.lang.Override + public java.lang.String getApiSpecId() { + java.lang.Object ref = apiSpecId_; + 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(); + apiSpecId_ = s; + return s; + } + } + /** + *
+   * Required. The ID to use for the spec, which will become the final component of
+   * the spec's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiSpecId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getApiSpecIdBytes() { + java.lang.Object ref = apiSpecId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiSpecId_ = 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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (apiSpec_ != null) { + output.writeMessage(2, getApiSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiSpecId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, apiSpecId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (apiSpec_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getApiSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiSpecId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, apiSpecId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest other = (com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasApiSpec() != other.hasApiSpec()) return false; + if (hasApiSpec()) { + if (!getApiSpec() + .equals(other.getApiSpec())) return false; + } + if (!getApiSpecId() + .equals(other.getApiSpecId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasApiSpec()) { + hash = (37 * hash) + API_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getApiSpec().hashCode(); + } + hash = (37 * hash) + API_SPEC_ID_FIELD_NUMBER; + hash = (53 * hash) + getApiSpecId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest 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.apigeeregistry.v1.CreateApiSpecRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest 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.apigeeregistry.v1.CreateApiSpecRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateApiSpec.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiSpecRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateApiSpecRequest) + com.google.cloud.apigeeregistry.v1.CreateApiSpecRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (apiSpecBuilder_ == null) { + apiSpec_ = null; + } else { + apiSpec_ = null; + apiSpecBuilder_ = null; + } + apiSpecId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest build() { + com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest result = new com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest(this); + result.parent_ = parent_; + if (apiSpecBuilder_ == null) { + result.apiSpec_ = apiSpec_; + } else { + result.apiSpec_ = apiSpecBuilder_.build(); + } + result.apiSpecId_ = apiSpecId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasApiSpec()) { + mergeApiSpec(other.getApiSpec()); + } + if (!other.getApiSpecId().isEmpty()) { + apiSpecId_ = other.apiSpecId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent, which owns this collection of specs.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * 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 specs.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * 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 specs.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of specs.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of specs.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.apigeeregistry.v1.ApiSpec apiSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> apiSpecBuilder_; + /** + *
+     * Required. The spec to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiSpec field is set. + */ + public boolean hasApiSpec() { + return apiSpecBuilder_ != null || apiSpec_ != null; + } + /** + *
+     * Required. The spec to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiSpec. + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec() { + if (apiSpecBuilder_ == null) { + return apiSpec_ == null ? com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; + } else { + return apiSpecBuilder_.getMessage(); + } + } + /** + *
+     * Required. The spec to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiSpec(com.google.cloud.apigeeregistry.v1.ApiSpec value) { + if (apiSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiSpec_ = value; + onChanged(); + } else { + apiSpecBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The spec to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiSpec( + com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { + if (apiSpecBuilder_ == null) { + apiSpec_ = builderForValue.build(); + onChanged(); + } else { + apiSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The spec to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeApiSpec(com.google.cloud.apigeeregistry.v1.ApiSpec value) { + if (apiSpecBuilder_ == null) { + if (apiSpec_ != null) { + apiSpec_ = + com.google.cloud.apigeeregistry.v1.ApiSpec.newBuilder(apiSpec_).mergeFrom(value).buildPartial(); + } else { + apiSpec_ = value; + } + onChanged(); + } else { + apiSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The spec to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearApiSpec() { + if (apiSpecBuilder_ == null) { + apiSpec_ = null; + onChanged(); + } else { + apiSpec_ = null; + apiSpecBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The spec to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder getApiSpecBuilder() { + + onChanged(); + return getApiSpecFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The spec to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder() { + if (apiSpecBuilder_ != null) { + return apiSpecBuilder_.getMessageOrBuilder(); + } else { + return apiSpec_ == null ? + com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; + } + } + /** + *
+     * Required. The spec to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> + getApiSpecFieldBuilder() { + if (apiSpecBuilder_ == null) { + apiSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder>( + getApiSpec(), + getParentForChildren(), + isClean()); + apiSpec_ = null; + } + return apiSpecBuilder_; + } + + private java.lang.Object apiSpecId_ = ""; + /** + *
+     * Required. The ID to use for the spec, which will become the final component of
+     * the spec's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiSpecId. + */ + public java.lang.String getApiSpecId() { + java.lang.Object ref = apiSpecId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiSpecId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The ID to use for the spec, which will become the final component of
+     * the spec's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiSpecId. + */ + public com.google.protobuf.ByteString + getApiSpecIdBytes() { + java.lang.Object ref = apiSpecId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiSpecId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The ID to use for the spec, which will become the final component of
+     * the spec's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The apiSpecId to set. + * @return This builder for chaining. + */ + public Builder setApiSpecId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiSpecId_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the spec, which will become the final component of
+     * the spec's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearApiSpecId() { + + apiSpecId_ = getDefaultInstance().getApiSpecId(); + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the spec, which will become the final component of
+     * the spec's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for apiSpecId to set. + * @return This builder for chaining. + */ + public Builder setApiSpecIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiSpecId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateApiSpecRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateApiSpecRequest) + private static final com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateApiSpecRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateApiSpecRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequestOrBuilder.java new file mode 100644 index 000000000000..6af64b95120c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequestOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface CreateApiSpecRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateApiSpecRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent, which owns this collection of specs.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * 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 specs.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The spec to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiSpec field is set. + */ + boolean hasApiSpec(); + /** + *
+   * Required. The spec to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiSpec. + */ + com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec(); + /** + *
+   * Required. The spec to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder(); + + /** + *
+   * Required. The ID to use for the spec, which will become the final component of
+   * the spec's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiSpecId. + */ + java.lang.String getApiSpecId(); + /** + *
+   * Required. The ID to use for the spec, which will become the final component of
+   * the spec's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiSpecId. + */ + com.google.protobuf.ByteString + getApiSpecIdBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequest.java new file mode 100644 index 000000000000..ae95250ae198 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequest.java @@ -0,0 +1,1032 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for CreateApiVersion.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiVersionRequest} + */ +public final class CreateApiVersionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateApiVersionRequest) + CreateApiVersionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateApiVersionRequest.newBuilder() to construct. + private CreateApiVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateApiVersionRequest() { + parent_ = ""; + apiVersionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateApiVersionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateApiVersionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.apigeeregistry.v1.ApiVersion.Builder subBuilder = null; + if (apiVersion_ != null) { + subBuilder = apiVersion_.toBuilder(); + } + apiVersion_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiVersion.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(apiVersion_); + apiVersion_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + apiVersionId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent, which owns this collection of versions.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 versions.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 API_VERSION_FIELD_NUMBER = 2; + private com.google.cloud.apigeeregistry.v1.ApiVersion apiVersion_; + /** + *
+   * Required. The version to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiVersion field is set. + */ + @java.lang.Override + public boolean hasApiVersion() { + return apiVersion_ != null; + } + /** + *
+   * Required. The version to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiVersion. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion() { + return apiVersion_ == null ? com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; + } + /** + *
+   * Required. The version to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder() { + return getApiVersion(); + } + + public static final int API_VERSION_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object apiVersionId_; + /** + *
+   * Required. The ID to use for the version, which will become the final component of
+   * the version's resource name.
+   * This value should be 1-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiVersionId. + */ + @java.lang.Override + public java.lang.String getApiVersionId() { + java.lang.Object ref = apiVersionId_; + 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(); + apiVersionId_ = s; + return s; + } + } + /** + *
+   * Required. The ID to use for the version, which will become the final component of
+   * the version's resource name.
+   * This value should be 1-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiVersionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getApiVersionIdBytes() { + java.lang.Object ref = apiVersionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiVersionId_ = 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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (apiVersion_ != null) { + output.writeMessage(2, getApiVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, apiVersionId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (apiVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getApiVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, apiVersionId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest other = (com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasApiVersion() != other.hasApiVersion()) return false; + if (hasApiVersion()) { + if (!getApiVersion() + .equals(other.getApiVersion())) return false; + } + if (!getApiVersionId() + .equals(other.getApiVersionId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasApiVersion()) { + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + } + hash = (37 * hash) + API_VERSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getApiVersionId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest 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.apigeeregistry.v1.CreateApiVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest 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.apigeeregistry.v1.CreateApiVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateApiVersion.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiVersionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateApiVersionRequest) + com.google.cloud.apigeeregistry.v1.CreateApiVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (apiVersionBuilder_ == null) { + apiVersion_ = null; + } else { + apiVersion_ = null; + apiVersionBuilder_ = null; + } + apiVersionId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest build() { + com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest result = new com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest(this); + result.parent_ = parent_; + if (apiVersionBuilder_ == null) { + result.apiVersion_ = apiVersion_; + } else { + result.apiVersion_ = apiVersionBuilder_.build(); + } + result.apiVersionId_ = apiVersionId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasApiVersion()) { + mergeApiVersion(other.getApiVersion()); + } + if (!other.getApiVersionId().isEmpty()) { + apiVersionId_ = other.apiVersionId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent, which owns this collection of versions.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 versions.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 versions.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of versions.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of versions.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.apigeeregistry.v1.ApiVersion apiVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> apiVersionBuilder_; + /** + *
+     * Required. The version to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiVersion field is set. + */ + public boolean hasApiVersion() { + return apiVersionBuilder_ != null || apiVersion_ != null; + } + /** + *
+     * Required. The version to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiVersion. + */ + public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion() { + if (apiVersionBuilder_ == null) { + return apiVersion_ == null ? com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; + } else { + return apiVersionBuilder_.getMessage(); + } + } + /** + *
+     * Required. The version to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiVersion(com.google.cloud.apigeeregistry.v1.ApiVersion value) { + if (apiVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + onChanged(); + } else { + apiVersionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The version to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiVersion( + com.google.cloud.apigeeregistry.v1.ApiVersion.Builder builderForValue) { + if (apiVersionBuilder_ == null) { + apiVersion_ = builderForValue.build(); + onChanged(); + } else { + apiVersionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The version to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeApiVersion(com.google.cloud.apigeeregistry.v1.ApiVersion value) { + if (apiVersionBuilder_ == null) { + if (apiVersion_ != null) { + apiVersion_ = + com.google.cloud.apigeeregistry.v1.ApiVersion.newBuilder(apiVersion_).mergeFrom(value).buildPartial(); + } else { + apiVersion_ = value; + } + onChanged(); + } else { + apiVersionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The version to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearApiVersion() { + if (apiVersionBuilder_ == null) { + apiVersion_ = null; + onChanged(); + } else { + apiVersion_ = null; + apiVersionBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The version to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiVersion.Builder getApiVersionBuilder() { + + onChanged(); + return getApiVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The version to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder() { + if (apiVersionBuilder_ != null) { + return apiVersionBuilder_.getMessageOrBuilder(); + } else { + return apiVersion_ == null ? + com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; + } + } + /** + *
+     * Required. The version to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> + getApiVersionFieldBuilder() { + if (apiVersionBuilder_ == null) { + apiVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder>( + getApiVersion(), + getParentForChildren(), + isClean()); + apiVersion_ = null; + } + return apiVersionBuilder_; + } + + private java.lang.Object apiVersionId_ = ""; + /** + *
+     * Required. The ID to use for the version, which will become the final component of
+     * the version's resource name.
+     * This value should be 1-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiVersionId. + */ + public java.lang.String getApiVersionId() { + java.lang.Object ref = apiVersionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The ID to use for the version, which will become the final component of
+     * the version's resource name.
+     * This value should be 1-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiVersionId. + */ + public com.google.protobuf.ByteString + getApiVersionIdBytes() { + java.lang.Object ref = apiVersionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The ID to use for the version, which will become the final component of
+     * the version's resource name.
+     * This value should be 1-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The apiVersionId to set. + * @return This builder for chaining. + */ + public Builder setApiVersionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiVersionId_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the version, which will become the final component of
+     * the version's resource name.
+     * This value should be 1-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearApiVersionId() { + + apiVersionId_ = getDefaultInstance().getApiVersionId(); + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the version, which will become the final component of
+     * the version's resource name.
+     * This value should be 1-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for apiVersionId to set. + * @return This builder for chaining. + */ + public Builder setApiVersionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiVersionId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateApiVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateApiVersionRequest) + private static final com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateApiVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateApiVersionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequestOrBuilder.java new file mode 100644 index 000000000000..7590ad065a8c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequestOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface CreateApiVersionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateApiVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent, which owns this collection of versions.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 versions.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The version to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiVersion field is set. + */ + boolean hasApiVersion(); + /** + *
+   * Required. The version to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiVersion. + */ + com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion(); + /** + *
+   * Required. The version to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder(); + + /** + *
+   * Required. The ID to use for the version, which will become the final component of
+   * the version's resource name.
+   * This value should be 1-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiVersionId. + */ + java.lang.String getApiVersionId(); + /** + *
+   * Required. The ID to use for the version, which will become the final component of
+   * the version's resource name.
+   * This value should be 1-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for apiVersionId. + */ + com.google.protobuf.ByteString + getApiVersionIdBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequest.java new file mode 100644 index 000000000000..2b0b8fea0437 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequest.java @@ -0,0 +1,1032 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for CreateArtifact.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateArtifactRequest} + */ +public final class CreateArtifactRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateArtifactRequest) + CreateArtifactRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateArtifactRequest.newBuilder() to construct. + private CreateArtifactRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateArtifactRequest() { + parent_ = ""; + artifactId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateArtifactRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateArtifactRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.apigeeregistry.v1.Artifact.Builder subBuilder = null; + if (artifact_ != null) { + subBuilder = artifact_.toBuilder(); + } + artifact_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Artifact.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(artifact_); + artifact_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + artifactId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.class, com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent, which owns this collection of artifacts.
+   * Format: `{parent}`
+   * 
+ * + * 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 artifacts.
+   * Format: `{parent}`
+   * 
+ * + * 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 ARTIFACT_FIELD_NUMBER = 2; + private com.google.cloud.apigeeregistry.v1.Artifact artifact_; + /** + *
+   * Required. The artifact to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the artifact field is set. + */ + @java.lang.Override + public boolean hasArtifact() { + return artifact_ != null; + } + /** + *
+   * Required. The artifact to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The artifact. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Artifact getArtifact() { + return artifact_ == null ? com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; + } + /** + *
+   * Required. The artifact to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder() { + return getArtifact(); + } + + public static final int ARTIFACT_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object artifactId_; + /** + *
+   * Required. The ID to use for the artifact, which will become the final component of
+   * the artifact's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The artifactId. + */ + @java.lang.Override + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + 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(); + artifactId_ = s; + return s; + } + } + /** + *
+   * Required. The ID to use for the artifact, which will become the final component of
+   * the artifact's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for artifactId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactId_ = 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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (artifact_ != null) { + output.writeMessage(2, getArtifact()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, artifactId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (artifact_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getArtifact()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, artifactId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateArtifactRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.CreateArtifactRequest other = (com.google.cloud.apigeeregistry.v1.CreateArtifactRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasArtifact() != other.hasArtifact()) return false; + if (hasArtifact()) { + if (!getArtifact() + .equals(other.getArtifact())) return false; + } + if (!getArtifactId() + .equals(other.getArtifactId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasArtifact()) { + hash = (37 * hash) + ARTIFACT_FIELD_NUMBER; + hash = (53 * hash) + getArtifact().hashCode(); + } + hash = (37 * hash) + ARTIFACT_ID_FIELD_NUMBER; + hash = (53 * hash) + getArtifactId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest 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.apigeeregistry.v1.CreateArtifactRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest 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.apigeeregistry.v1.CreateArtifactRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateArtifactRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateArtifact.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateArtifactRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateArtifactRequest) + com.google.cloud.apigeeregistry.v1.CreateArtifactRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.class, com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (artifactBuilder_ == null) { + artifact_ = null; + } else { + artifact_ = null; + artifactBuilder_ = null; + } + artifactId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateArtifactRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateArtifactRequest build() { + com.google.cloud.apigeeregistry.v1.CreateArtifactRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateArtifactRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.CreateArtifactRequest result = new com.google.cloud.apigeeregistry.v1.CreateArtifactRequest(this); + result.parent_ = parent_; + if (artifactBuilder_ == null) { + result.artifact_ = artifact_; + } else { + result.artifact_ = artifactBuilder_.build(); + } + result.artifactId_ = artifactId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.CreateArtifactRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateArtifactRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateArtifactRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasArtifact()) { + mergeArtifact(other.getArtifact()); + } + if (!other.getArtifactId().isEmpty()) { + artifactId_ = other.artifactId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateArtifactRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent, which owns this collection of artifacts.
+     * Format: `{parent}`
+     * 
+ * + * 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 artifacts.
+     * Format: `{parent}`
+     * 
+ * + * 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 artifacts.
+     * Format: `{parent}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of artifacts.
+     * Format: `{parent}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of artifacts.
+     * Format: `{parent}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.apigeeregistry.v1.Artifact artifact_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> artifactBuilder_; + /** + *
+     * Required. The artifact to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the artifact field is set. + */ + public boolean hasArtifact() { + return artifactBuilder_ != null || artifact_ != null; + } + /** + *
+     * Required. The artifact to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The artifact. + */ + public com.google.cloud.apigeeregistry.v1.Artifact getArtifact() { + if (artifactBuilder_ == null) { + return artifact_ == null ? com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; + } else { + return artifactBuilder_.getMessage(); + } + } + /** + *
+     * Required. The artifact to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setArtifact(com.google.cloud.apigeeregistry.v1.Artifact value) { + if (artifactBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + artifact_ = value; + onChanged(); + } else { + artifactBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The artifact to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setArtifact( + com.google.cloud.apigeeregistry.v1.Artifact.Builder builderForValue) { + if (artifactBuilder_ == null) { + artifact_ = builderForValue.build(); + onChanged(); + } else { + artifactBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The artifact to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeArtifact(com.google.cloud.apigeeregistry.v1.Artifact value) { + if (artifactBuilder_ == null) { + if (artifact_ != null) { + artifact_ = + com.google.cloud.apigeeregistry.v1.Artifact.newBuilder(artifact_).mergeFrom(value).buildPartial(); + } else { + artifact_ = value; + } + onChanged(); + } else { + artifactBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The artifact to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearArtifact() { + if (artifactBuilder_ == null) { + artifact_ = null; + onChanged(); + } else { + artifact_ = null; + artifactBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The artifact to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.Artifact.Builder getArtifactBuilder() { + + onChanged(); + return getArtifactFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The artifact to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder() { + if (artifactBuilder_ != null) { + return artifactBuilder_.getMessageOrBuilder(); + } else { + return artifact_ == null ? + com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; + } + } + /** + *
+     * Required. The artifact to create.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> + getArtifactFieldBuilder() { + if (artifactBuilder_ == null) { + artifactBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder>( + getArtifact(), + getParentForChildren(), + isClean()); + artifact_ = null; + } + return artifactBuilder_; + } + + private java.lang.Object artifactId_ = ""; + /** + *
+     * Required. The ID to use for the artifact, which will become the final component of
+     * the artifact's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The artifactId. + */ + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The ID to use for the artifact, which will become the final component of
+     * the artifact's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for artifactId. + */ + public com.google.protobuf.ByteString + getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The ID to use for the artifact, which will become the final component of
+     * the artifact's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + artifactId_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the artifact, which will become the final component of
+     * the artifact's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearArtifactId() { + + artifactId_ = getDefaultInstance().getArtifactId(); + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the artifact, which will become the final component of
+     * the artifact's resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Following AIP-162, IDs must not have the form of a UUID.
+     * 
+ * + * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + artifactId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateArtifactRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateArtifactRequest) + private static final com.google.cloud.apigeeregistry.v1.CreateArtifactRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateArtifactRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateArtifactRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateArtifactRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateArtifactRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequestOrBuilder.java new file mode 100644 index 000000000000..378de0e5db66 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequestOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface CreateArtifactRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateArtifactRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent, which owns this collection of artifacts.
+   * Format: `{parent}`
+   * 
+ * + * 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 artifacts.
+   * Format: `{parent}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The artifact to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the artifact field is set. + */ + boolean hasArtifact(); + /** + *
+   * Required. The artifact to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The artifact. + */ + com.google.cloud.apigeeregistry.v1.Artifact getArtifact(); + /** + *
+   * Required. The artifact to create.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder(); + + /** + *
+   * Required. The ID to use for the artifact, which will become the final component of
+   * the artifact's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The artifactId. + */ + java.lang.String getArtifactId(); + /** + *
+   * Required. The ID to use for the artifact, which will become the final component of
+   * the artifact's resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Following AIP-162, IDs must not have the form of a UUID.
+   * 
+ * + * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for artifactId. + */ + com.google.protobuf.ByteString + getArtifactIdBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequest.java new file mode 100644 index 000000000000..dd96e97231b8 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequest.java @@ -0,0 +1,1004 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for CreateInstance.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateInstanceRequest} + */ +public final class CreateInstanceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateInstanceRequest) + CreateInstanceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateInstanceRequest.newBuilder() to construct. + private CreateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateInstanceRequest() { + parent_ = ""; + instanceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + instanceId_ = s; + break; + } + case 26: { + com.google.cloud.apigeeregistry.v1.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.class, com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
+   * 
+ * + * 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. Parent resource of the Instance, of the form: `projects/*/locations/*`
+   * 
+ * + * 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 INSTANCE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object instanceId_; + /** + *
+   * Required. Identifier to assign to the Instance. Must be unique within scope of the
+   * parent resource.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + *
+   * Required. Identifier to assign to the Instance. Must be unique within scope of the
+   * parent resource.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 3; + private com.google.cloud.apigeeregistry.v1.Instance instance_; + /** + *
+   * Required. The Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+   * Required. The Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance getInstance() { + return instance_ == null ? com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance() : instance_; + } + /** + *
+   * Required. The Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + 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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (instance_ != null) { + output.writeMessage(3, getInstance()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getInstance()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.CreateInstanceRequest other = (com.google.cloud.apigeeregistry.v1.CreateInstanceRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getInstanceId() + .equals(other.getInstanceId())) return false; + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest 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.apigeeregistry.v1.CreateInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest 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.apigeeregistry.v1.CreateInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateInstance.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateInstanceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateInstanceRequest) + com.google.cloud.apigeeregistry.v1.CreateInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.class, com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + instanceId_ = ""; + + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateInstanceRequest build() { + com.google.cloud.apigeeregistry.v1.CreateInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateInstanceRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.CreateInstanceRequest result = new com.google.cloud.apigeeregistry.v1.CreateInstanceRequest(this); + result.parent_ = parent_; + result.instanceId_ = instanceId_; + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.CreateInstanceRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateInstanceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateInstanceRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + onChanged(); + } + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
+     * 
+ * + * 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. Parent resource of the Instance, of the form: `projects/*/locations/*`
+     * 
+ * + * 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. Parent resource of the Instance, of the form: `projects/*/locations/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + *
+     * Required. Identifier to assign to the Instance. Must be unique within scope of the
+     * parent resource.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Identifier to assign to the Instance. Must be unique within scope of the
+     * parent resource.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString + getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Identifier to assign to the Instance. Must be unique within scope of the
+     * parent resource.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceId_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Identifier to assign to the Instance. Must be unique within scope of the
+     * parent resource.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + + instanceId_ = getDefaultInstance().getInstanceId(); + onChanged(); + return this; + } + /** + *
+     * Required. Identifier to assign to the Instance. Must be unique within scope of the
+     * parent resource.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.apigeeregistry.v1.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Instance, com.google.cloud.apigeeregistry.v1.Instance.Builder, com.google.cloud.apigeeregistry.v1.InstanceOrBuilder> instanceBuilder_; + /** + *
+     * Required. The Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+     * Required. The Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The instance. + */ + public com.google.cloud.apigeeregistry.v1.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+     * Required. The Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInstance(com.google.cloud.apigeeregistry.v1.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInstance( + com.google.cloud.apigeeregistry.v1.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeInstance(com.google.cloud.apigeeregistry.v1.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + com.google.cloud.apigeeregistry.v1.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+     * Required. The Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Instance, com.google.cloud.apigeeregistry.v1.Instance.Builder, com.google.cloud.apigeeregistry.v1.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Instance, com.google.cloud.apigeeregistry.v1.Instance.Builder, com.google.cloud.apigeeregistry.v1.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateInstanceRequest) + private static final com.google.cloud.apigeeregistry.v1.CreateInstanceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateInstanceRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.CreateInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..054683c8d916 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequestOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface CreateInstanceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. Identifier to assign to the Instance. Must be unique within scope of the
+   * parent resource.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + *
+   * Required. Identifier to assign to the Instance. Must be unique within scope of the
+   * parent resource.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString + getInstanceIdBytes(); + + /** + *
+   * Required. The Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+   * Required. The Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The instance. + */ + com.google.cloud.apigeeregistry.v1.Instance getInstance(); + /** + *
+   * Required. The Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.InstanceOrBuilder getInstanceOrBuilder(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequest.java new file mode 100644 index 000000000000..e8a5d3fdee7d --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequest.java @@ -0,0 +1,687 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for DeleteApiDeployment.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest} + */ +public final class DeleteApiDeploymentRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) + DeleteApiDeploymentRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteApiDeploymentRequest.newBuilder() to construct. + private DeleteApiDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteApiDeploymentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteApiDeploymentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteApiDeploymentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + force_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the deployment to delete.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * 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 name of the deployment to delete.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 2; + private boolean force_; + /** + *
+   * If set to true, any child resources will also be deleted.
+   * (Otherwise, the request will only work if there are no child resources.)
+   * 
+ * + * bool force = 2; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, force_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getForce() + != other.getForce()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForce()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest 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.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest 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.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteApiDeployment.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + force_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest build() { + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest(this); + result.name_ = name_; + result.force_ = force_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the deployment to delete.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * 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 name of the deployment to delete.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * 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 name of the deployment to delete.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the deployment to delete.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the deployment to delete.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private boolean force_ ; + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) + private static final com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteApiDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteApiDeploymentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequestOrBuilder.java new file mode 100644 index 000000000000..0f08f623a6c7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequestOrBuilder.java @@ -0,0 +1,42 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface DeleteApiDeploymentRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the deployment to delete.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the deployment to delete.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * If set to true, any child resources will also be deleted.
+   * (Otherwise, the request will only work if there are no child resources.)
+   * 
+ * + * bool force = 2; + * @return The force. + */ + boolean getForce(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequest.java new file mode 100644 index 000000000000..176f129bc2dc --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequest.java @@ -0,0 +1,616 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for DeleteApiDeploymentRevision.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest} + */ +public final class DeleteApiDeploymentRevisionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) + DeleteApiDeploymentRevisionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteApiDeploymentRevisionRequest.newBuilder() to construct. + private DeleteApiDeploymentRevisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteApiDeploymentRevisionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteApiDeploymentRevisionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteApiDeploymentRevisionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the deployment revision to be deleted,
+   * with a revision ID explicitly included.
+   * Example:
+   * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
+   * 
+ * + * 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 name of the deployment revision to be deleted,
+   * with a revision ID explicitly included.
+   * Example:
+   * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest 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.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest 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.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteApiDeploymentRevision.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest build() { + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the deployment revision to be deleted,
+     * with a revision ID explicitly included.
+     * Example:
+     * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
+     * 
+ * + * 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 name of the deployment revision to be deleted,
+     * with a revision ID explicitly included.
+     * Example:
+     * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
+     * 
+ * + * 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 name of the deployment revision to be deleted,
+     * with a revision ID explicitly included.
+     * Example:
+     * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the deployment revision to be deleted,
+     * with a revision ID explicitly included.
+     * Example:
+     * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the deployment revision to be deleted,
+     * with a revision ID explicitly included.
+     * Example:
+     * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) + private static final com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteApiDeploymentRevisionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteApiDeploymentRevisionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequestOrBuilder.java new file mode 100644 index 000000000000..22658d36e34e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequestOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface DeleteApiDeploymentRevisionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the deployment revision to be deleted,
+   * with a revision ID explicitly included.
+   * Example:
+   * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the deployment revision to be deleted,
+   * with a revision ID explicitly included.
+   * Example:
+   * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequest.java new file mode 100644 index 000000000000..ac35116717b3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequest.java @@ -0,0 +1,687 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for DeleteApi.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiRequest} + */ +public final class DeleteApiRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiRequest) + DeleteApiRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteApiRequest.newBuilder() to construct. + private DeleteApiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteApiRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteApiRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteApiRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + force_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the API to delete.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 name of the API to delete.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 2; + private boolean force_; + /** + *
+   * If set to true, any child resources will also be deleted.
+   * (Otherwise, the request will only work if there are no child resources.)
+   * 
+ * + * bool force = 2; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, force_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.DeleteApiRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getForce() + != other.getForce()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForce()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest 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.apigeeregistry.v1.DeleteApiRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest 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.apigeeregistry.v1.DeleteApiRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteApi.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiRequest) + com.google.cloud.apigeeregistry.v1.DeleteApiRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + force_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.DeleteApiRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiRequest build() { + com.google.cloud.apigeeregistry.v1.DeleteApiRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.DeleteApiRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiRequest(this); + result.name_ = name_; + result.force_ = force_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.DeleteApiRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.DeleteApiRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the API to delete.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 name of the API to delete.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 name of the API to delete.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the API to delete.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the API to delete.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private boolean force_ ; + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiRequest) + private static final com.google.cloud.apigeeregistry.v1.DeleteApiRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteApiRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteApiRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequestOrBuilder.java new file mode 100644 index 000000000000..2d0912c241cd --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequestOrBuilder.java @@ -0,0 +1,42 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface DeleteApiRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the API to delete.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the API to delete.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * If set to true, any child resources will also be deleted.
+   * (Otherwise, the request will only work if there are no child resources.)
+   * 
+ * + * bool force = 2; + * @return The force. + */ + boolean getForce(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequest.java new file mode 100644 index 000000000000..1cade39e9ffd --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequest.java @@ -0,0 +1,687 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for DeleteApiSpec.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiSpecRequest} + */ +public final class DeleteApiSpecRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) + DeleteApiSpecRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteApiSpecRequest.newBuilder() to construct. + private DeleteApiSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteApiSpecRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteApiSpecRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteApiSpecRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + force_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the spec to delete.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * 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 name of the spec to delete.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 2; + private boolean force_; + /** + *
+   * If set to true, any child resources will also be deleted.
+   * (Otherwise, the request will only work if there are no child resources.)
+   * 
+ * + * bool force = 2; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, force_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getForce() + != other.getForce()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForce()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest 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.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest 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.apigeeregistry.v1.DeleteApiSpecRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteApiSpec.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiSpecRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + force_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest build() { + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest(this); + result.name_ = name_; + result.force_ = force_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the spec to delete.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * 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 name of the spec to delete.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * 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 name of the spec to delete.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec to delete.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec to delete.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private boolean force_ ; + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) + private static final com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteApiSpecRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteApiSpecRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequestOrBuilder.java new file mode 100644 index 000000000000..81ee8337931a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequestOrBuilder.java @@ -0,0 +1,42 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface DeleteApiSpecRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the spec to delete.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the spec to delete.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * If set to true, any child resources will also be deleted.
+   * (Otherwise, the request will only work if there are no child resources.)
+   * 
+ * + * bool force = 2; + * @return The force. + */ + boolean getForce(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequest.java new file mode 100644 index 000000000000..d28dc747544c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequest.java @@ -0,0 +1,616 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for DeleteApiSpecRevision.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest} + */ +public final class DeleteApiSpecRevisionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) + DeleteApiSpecRevisionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteApiSpecRevisionRequest.newBuilder() to construct. + private DeleteApiSpecRevisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteApiSpecRevisionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteApiSpecRevisionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteApiSpecRevisionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the spec revision to be deleted,
+   * with a revision ID explicitly included.
+   * Example:
+   * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
+   * 
+ * + * 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 name of the spec revision to be deleted,
+   * with a revision ID explicitly included.
+   * Example:
+   * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest 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.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest 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.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteApiSpecRevision.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest build() { + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the spec revision to be deleted,
+     * with a revision ID explicitly included.
+     * Example:
+     * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
+     * 
+ * + * 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 name of the spec revision to be deleted,
+     * with a revision ID explicitly included.
+     * Example:
+     * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
+     * 
+ * + * 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 name of the spec revision to be deleted,
+     * with a revision ID explicitly included.
+     * Example:
+     * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec revision to be deleted,
+     * with a revision ID explicitly included.
+     * Example:
+     * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec revision to be deleted,
+     * with a revision ID explicitly included.
+     * Example:
+     * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) + private static final com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteApiSpecRevisionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteApiSpecRevisionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequestOrBuilder.java new file mode 100644 index 000000000000..00e35b821164 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequestOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface DeleteApiSpecRevisionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the spec revision to be deleted,
+   * with a revision ID explicitly included.
+   * Example:
+   * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the spec revision to be deleted,
+   * with a revision ID explicitly included.
+   * Example:
+   * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequest.java new file mode 100644 index 000000000000..2b5da3b0611a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequest.java @@ -0,0 +1,687 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for DeleteApiVersion.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiVersionRequest} + */ +public final class DeleteApiVersionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) + DeleteApiVersionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteApiVersionRequest.newBuilder() to construct. + private DeleteApiVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteApiVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteApiVersionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteApiVersionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + force_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the version to delete.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * 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 name of the version to delete.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 2; + private boolean force_; + /** + *
+   * If set to true, any child resources will also be deleted.
+   * (Otherwise, the request will only work if there are no child resources.)
+   * 
+ * + * bool force = 2; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, force_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getForce() + != other.getForce()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForce()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest 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.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest 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.apigeeregistry.v1.DeleteApiVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteApiVersion.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiVersionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) + com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + force_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest build() { + com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest(this); + result.name_ = name_; + result.force_ = force_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the version to delete.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * 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 name of the version to delete.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * 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 name of the version to delete.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the version to delete.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the version to delete.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private boolean force_ ; + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + *
+     * If set to true, any child resources will also be deleted.
+     * (Otherwise, the request will only work if there are no child resources.)
+     * 
+ * + * bool force = 2; + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) + private static final com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteApiVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteApiVersionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequestOrBuilder.java new file mode 100644 index 000000000000..bcedc238bebb --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequestOrBuilder.java @@ -0,0 +1,42 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface DeleteApiVersionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the version to delete.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the version to delete.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * If set to true, any child resources will also be deleted.
+   * (Otherwise, the request will only work if there are no child resources.)
+   * 
+ * + * bool force = 2; + * @return The force. + */ + boolean getForce(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequest.java new file mode 100644 index 000000000000..bc02928a805f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for DeleteArtifact.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteArtifactRequest} + */ +public final class DeleteArtifactRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteArtifactRequest) + DeleteArtifactRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteArtifactRequest.newBuilder() to construct. + private DeleteArtifactRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteArtifactRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteArtifactRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteArtifactRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.class, com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the artifact to delete.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * 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 name of the artifact to delete.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest other = (com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest 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.apigeeregistry.v1.DeleteArtifactRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest 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.apigeeregistry.v1.DeleteArtifactRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteArtifact.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteArtifactRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteArtifactRequest) + com.google.cloud.apigeeregistry.v1.DeleteArtifactRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.class, com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest build() { + com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest result = new com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the artifact to delete.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * 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 name of the artifact to delete.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * 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 name of the artifact to delete.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the artifact to delete.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the artifact to delete.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteArtifactRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteArtifactRequest) + private static final com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteArtifactRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteArtifactRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequestOrBuilder.java new file mode 100644 index 000000000000..6ae4b1992a86 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface DeleteArtifactRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteArtifactRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the artifact to delete.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the artifact to delete.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequest.java new file mode 100644 index 000000000000..4aa31a15bcaa --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for DeleteInstance.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteInstanceRequest} + */ +public final class DeleteInstanceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteInstanceRequest) + DeleteInstanceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteInstanceRequest.newBuilder() to construct. + private DeleteInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.class, com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the Instance to delete.
+   * Format: `projects/*/locations/*/instances/*`.
+   * 
+ * + * 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 name of the Instance to delete.
+   * Format: `projects/*/locations/*/instances/*`.
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest other = (com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest 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.apigeeregistry.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest 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.apigeeregistry.v1.DeleteInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteInstance.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteInstanceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteInstanceRequest) + com.google.cloud.apigeeregistry.v1.DeleteInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.class, com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest build() { + com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest result = new com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the Instance to delete.
+     * Format: `projects/*/locations/*/instances/*`.
+     * 
+ * + * 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 name of the Instance to delete.
+     * Format: `projects/*/locations/*/instances/*`.
+     * 
+ * + * 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 name of the Instance to delete.
+     * Format: `projects/*/locations/*/instances/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the Instance to delete.
+     * Format: `projects/*/locations/*/instances/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the Instance to delete.
+     * Format: `projects/*/locations/*/instances/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteInstanceRequest) + private static final com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..9daaec0922aa --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface DeleteInstanceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the Instance to delete.
+   * Format: `projects/*/locations/*/instances/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the Instance to delete.
+   * Format: `projects/*/locations/*/instances/*`.
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequest.java new file mode 100644 index 000000000000..d64764d6b21e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for GetApiDeployment.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiDeploymentRequest} + */ +public final class GetApiDeploymentRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) + GetApiDeploymentRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetApiDeploymentRequest.newBuilder() to construct. + private GetApiDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetApiDeploymentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetApiDeploymentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetApiDeploymentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the deployment to retrieve.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * 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 name of the deployment to retrieve.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest other = (com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest 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.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest 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.apigeeregistry.v1.GetApiDeploymentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetApiDeployment.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiDeploymentRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) + com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest build() { + com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest result = new com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the deployment to retrieve.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * 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 name of the deployment to retrieve.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * 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 name of the deployment to retrieve.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the deployment to retrieve.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the deployment to retrieve.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) + private static final com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetApiDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetApiDeploymentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequestOrBuilder.java new file mode 100644 index 000000000000..207f159e28a7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface GetApiDeploymentRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the deployment to retrieve.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the deployment to retrieve.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequest.java new file mode 100644 index 000000000000..8cda9e11a68a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for GetApi.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiRequest} + */ +public final class GetApiRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetApiRequest) + GetApiRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetApiRequest.newBuilder() to construct. + private GetApiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetApiRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetApiRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetApiRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetApiRequest.class, com.google.cloud.apigeeregistry.v1.GetApiRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the API to retrieve.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 name of the API to retrieve.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetApiRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.GetApiRequest other = (com.google.cloud.apigeeregistry.v1.GetApiRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiRequest 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.apigeeregistry.v1.GetApiRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiRequest 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.apigeeregistry.v1.GetApiRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetApiRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetApi.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetApiRequest) + com.google.cloud.apigeeregistry.v1.GetApiRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetApiRequest.class, com.google.cloud.apigeeregistry.v1.GetApiRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.GetApiRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.GetApiRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiRequest build() { + com.google.cloud.apigeeregistry.v1.GetApiRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.GetApiRequest result = new com.google.cloud.apigeeregistry.v1.GetApiRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.GetApiRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.GetApiRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetApiRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.GetApiRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.GetApiRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.GetApiRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the API to retrieve.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 name of the API to retrieve.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 name of the API to retrieve.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the API to retrieve.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the API to retrieve.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetApiRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetApiRequest) + private static final com.google.cloud.apigeeregistry.v1.GetApiRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetApiRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.GetApiRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetApiRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetApiRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequestOrBuilder.java new file mode 100644 index 000000000000..8224a3021d73 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface GetApiRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetApiRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the API to retrieve.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the API to retrieve.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequest.java new file mode 100644 index 000000000000..75c66b592af6 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for GetApiSpecContents.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest} + */ +public final class GetApiSpecContentsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) + GetApiSpecContentsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetApiSpecContentsRequest.newBuilder() to construct. + private GetApiSpecContentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetApiSpecContentsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetApiSpecContentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetApiSpecContentsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.class, com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the spec whose contents should be retrieved.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * 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 name of the spec whose contents should be retrieved.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest other = (com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest 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.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest 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.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetApiSpecContents.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) + com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.class, com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest build() { + com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest result = new com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the spec whose contents should be retrieved.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * 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 name of the spec whose contents should be retrieved.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * 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 name of the spec whose contents should be retrieved.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec whose contents should be retrieved.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec whose contents should be retrieved.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) + private static final com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetApiSpecContentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetApiSpecContentsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequestOrBuilder.java new file mode 100644 index 000000000000..49e39e6cb910 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface GetApiSpecContentsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the spec whose contents should be retrieved.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the spec whose contents should be retrieved.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequest.java new file mode 100644 index 000000000000..9d2c34d7db14 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for GetApiSpec.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiSpecRequest} + */ +public final class GetApiSpecRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetApiSpecRequest) + GetApiSpecRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetApiSpecRequest.newBuilder() to construct. + private GetApiSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetApiSpecRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetApiSpecRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetApiSpecRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the spec to retrieve.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * 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 name of the spec to retrieve.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetApiSpecRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.GetApiSpecRequest other = (com.google.cloud.apigeeregistry.v1.GetApiSpecRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest 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.apigeeregistry.v1.GetApiSpecRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest 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.apigeeregistry.v1.GetApiSpecRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetApiSpecRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetApiSpec.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiSpecRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetApiSpecRequest) + com.google.cloud.apigeeregistry.v1.GetApiSpecRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiSpecRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiSpecRequest build() { + com.google.cloud.apigeeregistry.v1.GetApiSpecRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiSpecRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.GetApiSpecRequest result = new com.google.cloud.apigeeregistry.v1.GetApiSpecRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.GetApiSpecRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.GetApiSpecRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetApiSpecRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.GetApiSpecRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the spec to retrieve.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * 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 name of the spec to retrieve.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * 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 name of the spec to retrieve.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec to retrieve.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec to retrieve.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetApiSpecRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetApiSpecRequest) + private static final com.google.cloud.apigeeregistry.v1.GetApiSpecRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetApiSpecRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetApiSpecRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetApiSpecRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiSpecRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequestOrBuilder.java new file mode 100644 index 000000000000..94de44577c33 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface GetApiSpecRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetApiSpecRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the spec to retrieve.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the spec to retrieve.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequest.java new file mode 100644 index 000000000000..792efd7f2bf1 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for GetApiVersion.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiVersionRequest} + */ +public final class GetApiVersionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetApiVersionRequest) + GetApiVersionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetApiVersionRequest.newBuilder() to construct. + private GetApiVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetApiVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetApiVersionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetApiVersionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the version to retrieve.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * 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 name of the version to retrieve.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetApiVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.GetApiVersionRequest other = (com.google.cloud.apigeeregistry.v1.GetApiVersionRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest 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.apigeeregistry.v1.GetApiVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest 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.apigeeregistry.v1.GetApiVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetApiVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetApiVersion.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiVersionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetApiVersionRequest) + com.google.cloud.apigeeregistry.v1.GetApiVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiVersionRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiVersionRequest build() { + com.google.cloud.apigeeregistry.v1.GetApiVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiVersionRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.GetApiVersionRequest result = new com.google.cloud.apigeeregistry.v1.GetApiVersionRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.GetApiVersionRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.GetApiVersionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetApiVersionRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.GetApiVersionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the version to retrieve.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * 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 name of the version to retrieve.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * 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 name of the version to retrieve.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the version to retrieve.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the version to retrieve.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetApiVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetApiVersionRequest) + private static final com.google.cloud.apigeeregistry.v1.GetApiVersionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetApiVersionRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetApiVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetApiVersionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetApiVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequestOrBuilder.java new file mode 100644 index 000000000000..68a28f7dc625 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface GetApiVersionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetApiVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the version to retrieve.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the version to retrieve.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequest.java new file mode 100644 index 000000000000..87cadef59fd4 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for GetArtifactContents.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetArtifactContentsRequest} + */ +public final class GetArtifactContentsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) + GetArtifactContentsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetArtifactContentsRequest.newBuilder() to construct. + private GetArtifactContentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetArtifactContentsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetArtifactContentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetArtifactContentsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.class, com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the artifact whose contents should be retrieved.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * 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 name of the artifact whose contents should be retrieved.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest other = (com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest 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.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest 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.apigeeregistry.v1.GetArtifactContentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetArtifactContents.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetArtifactContentsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) + com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.class, com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest build() { + com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest result = new com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the artifact whose contents should be retrieved.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * 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 name of the artifact whose contents should be retrieved.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * 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 name of the artifact whose contents should be retrieved.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the artifact whose contents should be retrieved.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the artifact whose contents should be retrieved.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) + private static final com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetArtifactContentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetArtifactContentsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequestOrBuilder.java new file mode 100644 index 000000000000..5d9e641d2ae7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface GetArtifactContentsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the artifact whose contents should be retrieved.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the artifact whose contents should be retrieved.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequest.java new file mode 100644 index 000000000000..0c53399a43be --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for GetArtifact.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetArtifactRequest} + */ +public final class GetArtifactRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetArtifactRequest) + GetArtifactRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetArtifactRequest.newBuilder() to construct. + private GetArtifactRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetArtifactRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetArtifactRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetArtifactRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetArtifactRequest.class, com.google.cloud.apigeeregistry.v1.GetArtifactRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the artifact to retrieve.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * 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 name of the artifact to retrieve.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetArtifactRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.GetArtifactRequest other = (com.google.cloud.apigeeregistry.v1.GetArtifactRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest 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.apigeeregistry.v1.GetArtifactRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest 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.apigeeregistry.v1.GetArtifactRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetArtifactRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetArtifact.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetArtifactRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetArtifactRequest) + com.google.cloud.apigeeregistry.v1.GetArtifactRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetArtifactRequest.class, com.google.cloud.apigeeregistry.v1.GetArtifactRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.GetArtifactRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetArtifactRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.GetArtifactRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetArtifactRequest build() { + com.google.cloud.apigeeregistry.v1.GetArtifactRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetArtifactRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.GetArtifactRequest result = new com.google.cloud.apigeeregistry.v1.GetArtifactRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.GetArtifactRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.GetArtifactRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetArtifactRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.GetArtifactRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.GetArtifactRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.GetArtifactRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the artifact to retrieve.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * 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 name of the artifact to retrieve.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * 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 name of the artifact to retrieve.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the artifact to retrieve.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the artifact to retrieve.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetArtifactRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetArtifactRequest) + private static final com.google.cloud.apigeeregistry.v1.GetArtifactRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetArtifactRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetArtifactRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetArtifactRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetArtifactRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequestOrBuilder.java new file mode 100644 index 000000000000..479cb91e7401 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface GetArtifactRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetArtifactRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the artifact to retrieve.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the artifact to retrieve.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequest.java new file mode 100644 index 000000000000..7c7373a127c3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for GetInstance.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetInstanceRequest} + */ +public final class GetInstanceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetInstanceRequest) + GetInstanceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetInstanceRequest.newBuilder() to construct. + private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetInstanceRequest.class, com.google.cloud.apigeeregistry.v1.GetInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the Instance to retrieve.
+   * Format: `projects/*/locations/*/instances/*`.
+   * 
+ * + * 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 name of the Instance to retrieve.
+   * Format: `projects/*/locations/*/instances/*`.
+   * 
+ * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.GetInstanceRequest other = (com.google.cloud.apigeeregistry.v1.GetInstanceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest 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.apigeeregistry.v1.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest 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.apigeeregistry.v1.GetInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetInstance.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.GetInstanceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetInstanceRequest) + com.google.cloud.apigeeregistry.v1.GetInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.GetInstanceRequest.class, com.google.cloud.apigeeregistry.v1.GetInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.GetInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.GetInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetInstanceRequest build() { + com.google.cloud.apigeeregistry.v1.GetInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetInstanceRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.GetInstanceRequest result = new com.google.cloud.apigeeregistry.v1.GetInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.GetInstanceRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.GetInstanceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetInstanceRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.GetInstanceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.GetInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.GetInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the Instance to retrieve.
+     * Format: `projects/*/locations/*/instances/*`.
+     * 
+ * + * 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 name of the Instance to retrieve.
+     * Format: `projects/*/locations/*/instances/*`.
+     * 
+ * + * 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 name of the Instance to retrieve.
+     * Format: `projects/*/locations/*/instances/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the Instance to retrieve.
+     * Format: `projects/*/locations/*/instances/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the Instance to retrieve.
+     * Format: `projects/*/locations/*/instances/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetInstanceRequest) + private static final com.google.cloud.apigeeregistry.v1.GetInstanceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetInstanceRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.GetInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..e9724dbc4271 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface GetInstanceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the Instance to retrieve.
+   * Format: `projects/*/locations/*/instances/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the Instance to retrieve.
+   * Format: `projects/*/locations/*/instances/*`.
+   * 
+ * + * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Instance.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Instance.java new file mode 100644 index 000000000000..0fa2dd61022c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Instance.java @@ -0,0 +1,2642 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * An Instance represents the instance resources of the Registry.
+ * Currently, only one instance is allowed for each project.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.Instance} + */ +public final class Instance extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.Instance) + InstanceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Instance.newBuilder() to construct. + private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Instance() { + name_ = ""; + state_ = 0; + stateMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Instance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Instance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + stateMessage_ = s; + break; + } + case 50: { + com.google.cloud.apigeeregistry.v1.Instance.Config.Builder subBuilder = null; + if (config_ != null) { + subBuilder = config_.toBuilder(); + } + config_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Instance.Config.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(config_); + config_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.Instance.class, com.google.cloud.apigeeregistry.v1.Instance.Builder.class); + } + + /** + *
+   * State of the Instance.
+   * 
+ * + * Protobuf enum {@code google.cloud.apigeeregistry.v1.Instance.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The Instance has not been initialized or has been deleted.
+     * 
+ * + * INACTIVE = 1; + */ + INACTIVE(1), + /** + *
+     * The Instance is being created.
+     * 
+ * + * CREATING = 2; + */ + CREATING(2), + /** + *
+     * The Instance has been created and is ready for use.
+     * 
+ * + * ACTIVE = 3; + */ + ACTIVE(3), + /** + *
+     * The Instance is being updated.
+     * 
+ * + * UPDATING = 4; + */ + UPDATING(4), + /** + *
+     * The Instance is being deleted.
+     * 
+ * + * DELETING = 5; + */ + DELETING(5), + /** + *
+     * The Instance encountered an error during a state change.
+     * 
+ * + * FAILED = 6; + */ + FAILED(6), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The Instance has not been initialized or has been deleted.
+     * 
+ * + * INACTIVE = 1; + */ + public static final int INACTIVE_VALUE = 1; + /** + *
+     * The Instance is being created.
+     * 
+ * + * CREATING = 2; + */ + public static final int CREATING_VALUE = 2; + /** + *
+     * The Instance has been created and is ready for use.
+     * 
+ * + * ACTIVE = 3; + */ + public static final int ACTIVE_VALUE = 3; + /** + *
+     * The Instance is being updated.
+     * 
+ * + * UPDATING = 4; + */ + public static final int UPDATING_VALUE = 4; + /** + *
+     * The Instance is being deleted.
+     * 
+ * + * DELETING = 5; + */ + public static final int DELETING_VALUE = 5; + /** + *
+     * The Instance encountered an error during a state change.
+     * 
+ * + * FAILED = 6; + */ + public static final int FAILED_VALUE = 6; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return INACTIVE; + case 2: return CREATING; + case 3: return ACTIVE; + case 4: return UPDATING; + case 5: return DELETING; + case 6: return FAILED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.Instance.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.apigeeregistry.v1.Instance.State) + } + + public interface ConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.Instance.Config) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Output only. The GCP location where the Instance resides.
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The location. + */ + java.lang.String getLocation(); + /** + *
+     * Output only. The GCP location where the Instance resides.
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for location. + */ + com.google.protobuf.ByteString + getLocationBytes(); + + /** + *
+     * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
+     * The CMEK name should follow the format of
+     * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
+     * where the `location` must match InstanceConfig.location.
+     * 
+ * + * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The cmekKeyName. + */ + java.lang.String getCmekKeyName(); + /** + *
+     * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
+     * The CMEK name should follow the format of
+     * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
+     * where the `location` must match InstanceConfig.location.
+     * 
+ * + * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cmekKeyName. + */ + com.google.protobuf.ByteString + getCmekKeyNameBytes(); + } + /** + *
+   * Available configurations to provision an Instance.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.Instance.Config} + */ + public static final class Config extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.Instance.Config) + ConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use Config.newBuilder() to construct. + private Config(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Config() { + location_ = ""; + cmekKeyName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Config(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Config( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + location_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + cmekKeyName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_Config_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_Config_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.Instance.Config.class, com.google.cloud.apigeeregistry.v1.Instance.Config.Builder.class); + } + + public static final int LOCATION_FIELD_NUMBER = 1; + private volatile java.lang.Object location_; + /** + *
+     * Output only. The GCP location where the Instance resides.
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + 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(); + location_ = s; + return s; + } + } + /** + *
+     * Output only. The GCP location where the Instance resides.
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CMEK_KEY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object cmekKeyName_; + /** + *
+     * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
+     * The CMEK name should follow the format of
+     * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
+     * where the `location` must match InstanceConfig.location.
+     * 
+ * + * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The cmekKeyName. + */ + @java.lang.Override + public java.lang.String getCmekKeyName() { + java.lang.Object ref = cmekKeyName_; + 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(); + cmekKeyName_ = s; + return s; + } + } + /** + *
+     * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
+     * The CMEK name should follow the format of
+     * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
+     * where the `location` must match InstanceConfig.location.
+     * 
+ * + * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cmekKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCmekKeyNameBytes() { + java.lang.Object ref = cmekKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cmekKeyName_ = 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.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmekKeyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cmekKeyName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmekKeyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cmekKeyName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.Instance.Config)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.Instance.Config other = (com.google.cloud.apigeeregistry.v1.Instance.Config) obj; + + if (!getLocation() + .equals(other.getLocation())) return false; + if (!getCmekKeyName() + .equals(other.getCmekKeyName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + CMEK_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCmekKeyName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Instance.Config 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.apigeeregistry.v1.Instance.Config parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Instance.Config 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.apigeeregistry.v1.Instance.Config parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Instance.Config parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Instance.Config parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.Instance.Config prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Available configurations to provision an Instance.
+     * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.Instance.Config} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.Instance.Config) + com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_Config_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_Config_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.Instance.Config.class, com.google.cloud.apigeeregistry.v1.Instance.Config.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.Instance.Config.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + location_ = ""; + + cmekKeyName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_Config_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance.Config getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.Instance.Config.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance.Config build() { + com.google.cloud.apigeeregistry.v1.Instance.Config result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance.Config buildPartial() { + com.google.cloud.apigeeregistry.v1.Instance.Config result = new com.google.cloud.apigeeregistry.v1.Instance.Config(this); + result.location_ = location_; + result.cmekKeyName_ = cmekKeyName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.Instance.Config) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.Instance.Config)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.Instance.Config other) { + if (other == com.google.cloud.apigeeregistry.v1.Instance.Config.getDefaultInstance()) return this; + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + onChanged(); + } + if (!other.getCmekKeyName().isEmpty()) { + cmekKeyName_ = other.cmekKeyName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.Instance.Config parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.Instance.Config) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object location_ = ""; + /** + *
+       * Output only. The GCP location where the Instance resides.
+       * 
+ * + * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Output only. The GCP location where the Instance resides.
+       * 
+ * + * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for location. + */ + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Output only. The GCP location where the Instance resides.
+       * 
+ * + * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + location_ = value; + onChanged(); + return this; + } + /** + *
+       * Output only. The GCP location where the Instance resides.
+       * 
+ * + * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearLocation() { + + location_ = getDefaultInstance().getLocation(); + onChanged(); + return this; + } + /** + *
+       * Output only. The GCP location where the Instance resides.
+       * 
+ * + * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + location_ = value; + onChanged(); + return this; + } + + private java.lang.Object cmekKeyName_ = ""; + /** + *
+       * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
+       * The CMEK name should follow the format of
+       * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
+       * where the `location` must match InstanceConfig.location.
+       * 
+ * + * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The cmekKeyName. + */ + public java.lang.String getCmekKeyName() { + java.lang.Object ref = cmekKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cmekKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
+       * The CMEK name should follow the format of
+       * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
+       * where the `location` must match InstanceConfig.location.
+       * 
+ * + * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cmekKeyName. + */ + public com.google.protobuf.ByteString + getCmekKeyNameBytes() { + java.lang.Object ref = cmekKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cmekKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
+       * The CMEK name should follow the format of
+       * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
+       * where the `location` must match InstanceConfig.location.
+       * 
+ * + * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The cmekKeyName to set. + * @return This builder for chaining. + */ + public Builder setCmekKeyName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cmekKeyName_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
+       * The CMEK name should follow the format of
+       * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
+       * where the `location` must match InstanceConfig.location.
+       * 
+ * + * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearCmekKeyName() { + + cmekKeyName_ = getDefaultInstance().getCmekKeyName(); + onChanged(); + return this; + } + /** + *
+       * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
+       * The CMEK name should follow the format of
+       * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
+       * where the `location` must match InstanceConfig.location.
+       * 
+ * + * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for cmekKeyName to set. + * @return This builder for chaining. + */ + public Builder setCmekKeyNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cmekKeyName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.Instance.Config) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.Instance.Config) + private static final com.google.cloud.apigeeregistry.v1.Instance.Config DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.Instance.Config(); + } + + public static com.google.cloud.apigeeregistry.v1.Instance.Config getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Config parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Config(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance.Config getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Format: `projects/*/locations/*/instance`.
+   * Currently only `locations/global` is supported.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Format: `projects/*/locations/*/instance`.
+   * Currently only `locations/global` is supported.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .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 updateTime_ != null; + } + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .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. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + *
+   * Output only. The current state of the Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.apigeeregistry.v1.Instance.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.apigeeregistry.v1.Instance.State result = com.google.cloud.apigeeregistry.v1.Instance.State.valueOf(state_); + return result == null ? com.google.cloud.apigeeregistry.v1.Instance.State.UNRECOGNIZED : result; + } + + public static final int STATE_MESSAGE_FIELD_NUMBER = 5; + private volatile java.lang.Object stateMessage_; + /** + *
+   * Output only. Extra information of Instance.State if the state is `FAILED`.
+   * 
+ * + * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + @java.lang.Override + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + 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(); + stateMessage_ = s; + return s; + } + } + /** + *
+   * Output only. Extra information of Instance.State if the state is `FAILED`.
+   * 
+ * + * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.apigeeregistry.v1.Instance.Config config_; + /** + *
+   * Required. Config of the Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return config_ != null; + } + /** + *
+   * Required. Config of the Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return The config. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance.Config getConfig() { + return config_ == null ? com.google.cloud.apigeeregistry.v1.Instance.Config.getDefaultInstance() : config_; + } + /** + *
+   * Required. Config of the Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder getConfigOrBuilder() { + return getConfig(); + } + + 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (state_ != com.google.cloud.apigeeregistry.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, stateMessage_); + } + if (config_ != null) { + output.writeMessage(6, getConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateTime()); + } + if (state_ != com.google.cloud.apigeeregistry.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, stateMessage_); + } + if (config_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.Instance)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.Instance other = (com.google.cloud.apigeeregistry.v1.Instance) obj; + + if (!getName() + .equals(other.getName())) 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 (state_ != other.state_) return false; + if (!getStateMessage() + .equals(other.getStateMessage())) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig() + .equals(other.getConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStateMessage().hashCode(); + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.Instance parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Instance 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.apigeeregistry.v1.Instance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Instance 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.apigeeregistry.v1.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.Instance parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Instance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Instance parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Instance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Instance parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.Instance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An Instance represents the instance resources of the Registry.
+   * Currently, only one instance is allowed for each project.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.Instance} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.Instance) + com.google.cloud.apigeeregistry.v1.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.Instance.class, com.google.cloud.apigeeregistry.v1.Instance.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.Instance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + state_ = 0; + + stateMessage_ = ""; + + if (configBuilder_ == null) { + config_ = null; + } else { + config_ = null; + configBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance build() { + com.google.cloud.apigeeregistry.v1.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance buildPartial() { + com.google.cloud.apigeeregistry.v1.Instance result = new com.google.cloud.apigeeregistry.v1.Instance(this); + result.name_ = name_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.state_ = state_; + result.stateMessage_ = stateMessage_; + if (configBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = configBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.Instance) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.Instance)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.Instance other) { + if (other == com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateMessage().isEmpty()) { + stateMessage_ = other.stateMessage_; + onChanged(); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.Instance parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.Instance) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Format: `projects/*/locations/*/instance`.
+     * Currently only `locations/global` is supported.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Format: `projects/*/locations/*/instance`.
+     * Currently only `locations/global` is supported.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Format: `projects/*/locations/*/instance`.
+     * Currently only `locations/global` is supported.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Format: `projects/*/locations/*/instance`.
+     * Currently only `locations/global` is supported.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Format: `projects/*/locations/*/instance`.
+     * Currently only `locations/global` is supported.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .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. Last update timestamp.
+     * 
+ * + * .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; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .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(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Last update timestamp.
+     * 
+ * + * .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. Last update timestamp.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.apigeeregistry.v1.Instance.State result = com.google.cloud.apigeeregistry.v1.Instance.State.valueOf(state_); + return result == null ? com.google.cloud.apigeeregistry.v1.Instance.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.apigeeregistry.v1.Instance.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateMessage_ = ""; + /** + *
+     * Output only. Extra information of Instance.State if the state is `FAILED`.
+     * 
+ * + * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Extra information of Instance.State if the state is `FAILED`.
+     * 
+ * + * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Extra information of Instance.State if the state is `FAILED`.
+     * 
+ * + * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + stateMessage_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. Extra information of Instance.State if the state is `FAILED`.
+     * 
+ * + * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearStateMessage() { + + stateMessage_ = getDefaultInstance().getStateMessage(); + onChanged(); + return this; + } + /** + *
+     * Output only. Extra information of Instance.State if the state is `FAILED`.
+     * 
+ * + * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + stateMessage_ = value; + onChanged(); + return this; + } + + private com.google.cloud.apigeeregistry.v1.Instance.Config config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Instance.Config, com.google.cloud.apigeeregistry.v1.Instance.Config.Builder, com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder> configBuilder_; + /** + *
+     * Required. Config of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return configBuilder_ != null || config_ != null; + } + /** + *
+     * Required. Config of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return The config. + */ + public com.google.cloud.apigeeregistry.v1.Instance.Config getConfig() { + if (configBuilder_ == null) { + return config_ == null ? com.google.cloud.apigeeregistry.v1.Instance.Config.getDefaultInstance() : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + *
+     * Required. Config of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setConfig(com.google.cloud.apigeeregistry.v1.Instance.Config value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Config of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setConfig( + com.google.cloud.apigeeregistry.v1.Instance.Config.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Config of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeConfig(com.google.cloud.apigeeregistry.v1.Instance.Config value) { + if (configBuilder_ == null) { + if (config_ != null) { + config_ = + com.google.cloud.apigeeregistry.v1.Instance.Config.newBuilder(config_).mergeFrom(value).buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + configBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Config of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + config_ = null; + onChanged(); + } else { + config_ = null; + configBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Config of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.Instance.Config.Builder getConfigBuilder() { + + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Config of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null ? + com.google.cloud.apigeeregistry.v1.Instance.Config.getDefaultInstance() : config_; + } + } + /** + *
+     * Required. Config of the Instance.
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Instance.Config, com.google.cloud.apigeeregistry.v1.Instance.Config.Builder, com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Instance.Config, com.google.cloud.apigeeregistry.v1.Instance.Config.Builder, com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder>( + getConfig(), + getParentForChildren(), + isClean()); + config_ = null; + } + return configBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.Instance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.Instance) + private static final com.google.cloud.apigeeregistry.v1.Instance DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.Instance(); + } + + public static com.google.cloud.apigeeregistry.v1.Instance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Instance(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceName.java new file mode 100644 index 000000000000..c67ae8d3e8e5 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InstanceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + + @Deprecated + protected InstanceName() { + project = null; + location = null; + instance = null; + } + + private InstanceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceName of(String project, String location, String instance) { + return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); + } + + public static String format(String project, String location, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .build() + .toString(); + } + + public static InstanceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE.validatedMatch( + formattedString, "InstanceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InstanceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE.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 (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE.instantiate( + "project", project, "location", location, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + InstanceName that = ((InstanceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance); + } + 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(instance); + return h; + } + + /** Builder for projects/{project}/locations/{location}/instances/{instance}. */ + public static class Builder { + private String project; + private String location; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InstanceName instanceName) { + this.project = instanceName.project; + this.location = instanceName.location; + this.instance = instanceName.instance; + } + + public InstanceName build() { + return new InstanceName(this); + } + } +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceOrBuilder.java new file mode 100644 index 000000000000..5f0c3843a042 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceOrBuilder.java @@ -0,0 +1,151 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface InstanceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.Instance) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Format: `projects/*/locations/*/instance`.
+   * Currently only `locations/global` is supported.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Format: `projects/*/locations/*/instance`.
+   * Currently only `locations/global` is supported.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.apigeeregistry.v1.Instance.State getState(); + + /** + *
+   * Output only. Extra information of Instance.State if the state is `FAILED`.
+   * 
+ * + * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + java.lang.String getStateMessage(); + /** + *
+   * Output only. Extra information of Instance.State if the state is `FAILED`.
+   * 
+ * + * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + com.google.protobuf.ByteString + getStateMessageBytes(); + + /** + *
+   * Required. Config of the Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + *
+   * Required. Config of the Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return The config. + */ + com.google.cloud.apigeeregistry.v1.Instance.Config getConfig(); + /** + *
+   * Required. Config of the Instance.
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder getConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequest.java new file mode 100644 index 000000000000..7b64b1e982f2 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequest.java @@ -0,0 +1,848 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for ListApiDeploymentRevisions.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest} + */ +public final class ListApiDeploymentRevisionsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) + ListApiDeploymentRevisionsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApiDeploymentRevisionsRequest.newBuilder() to construct. + private ListApiDeploymentRevisionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApiDeploymentRevisionsRequest() { + name_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApiDeploymentRevisionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApiDeploymentRevisionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the deployment to list revisions for.
+   * 
+ * + * 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 name of the deployment to list revisions for.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of revisions to return per page.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The page token, received from a previous ListApiDeploymentRevisions call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+   * The page token, received from a previous ListApiDeploymentRevisions call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * @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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest other = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest 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.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest 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.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListApiDeploymentRevisions.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest build() { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest result = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest(this); + result.name_ = name_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the deployment to list revisions for.
+     * 
+ * + * 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 name of the deployment to list revisions for.
+     * 
+ * + * 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 name of the deployment to list revisions for.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the deployment to list revisions for.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the deployment to list revisions for.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of revisions to return per page.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of revisions to return per page.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of revisions to return per page.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The page token, received from a previous ListApiDeploymentRevisions call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * The page token, received from a previous ListApiDeploymentRevisions call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * The page token, received from a previous ListApiDeploymentRevisions call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The page token, received from a previous ListApiDeploymentRevisions call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The page token, received from a previous ListApiDeploymentRevisions call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) + private static final com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApiDeploymentRevisionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApiDeploymentRevisionsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequestOrBuilder.java new file mode 100644 index 000000000000..a264d1fa4f18 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequestOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApiDeploymentRevisionsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the deployment to list revisions for.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the deployment to list revisions for.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The maximum number of revisions to return per page.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The page token, received from a previous ListApiDeploymentRevisions call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The page token, received from a previous ListApiDeploymentRevisions call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponse.java new file mode 100644 index 000000000000..70ca2024cb73 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Response message for ListApiDeploymentRevisionsResponse.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse} + */ +public final class ListApiDeploymentRevisionsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) + ListApiDeploymentRevisionsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApiDeploymentRevisionsResponse.newBuilder() to construct. + private ListApiDeploymentRevisionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApiDeploymentRevisionsResponse() { + apiDeployments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApiDeploymentRevisionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApiDeploymentRevisionsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + apiDeployments_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + apiDeployments_.add( + input.readMessage(com.google.cloud.apigeeregistry.v1.ApiDeployment.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + apiDeployments_ = java.util.Collections.unmodifiableList(apiDeployments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.Builder.class); + } + + public static final int API_DEPLOYMENTS_FIELD_NUMBER = 1; + private java.util.List apiDeployments_; + /** + *
+   * The revisions of the deployment.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + @java.lang.Override + public java.util.List getApiDeploymentsList() { + return apiDeployments_; + } + /** + *
+   * The revisions of the deployment.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + @java.lang.Override + public java.util.List + getApiDeploymentsOrBuilderList() { + return apiDeployments_; + } + /** + *
+   * The revisions of the deployment.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + @java.lang.Override + public int getApiDeploymentsCount() { + return apiDeployments_.size(); + } + /** + *
+   * The revisions of the deployment.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index) { + return apiDeployments_.get(index); + } + /** + *
+   * The revisions of the deployment.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( + int index) { + return apiDeployments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If 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.
+   * If 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 < apiDeployments_.size(); i++) { + output.writeMessage(1, apiDeployments_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < apiDeployments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, apiDeployments_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse other = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) obj; + + if (!getApiDeploymentsList() + .equals(other.getApiDeploymentsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getApiDeploymentsCount() > 0) { + hash = (37 * hash) + API_DEPLOYMENTS_FIELD_NUMBER; + hash = (53 * hash) + getApiDeploymentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse 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.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse 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.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListApiDeploymentRevisionsResponse.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getApiDeploymentsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (apiDeploymentsBuilder_ == null) { + apiDeployments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + apiDeploymentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse build() { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse result = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse(this); + int from_bitField0_ = bitField0_; + if (apiDeploymentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + apiDeployments_ = java.util.Collections.unmodifiableList(apiDeployments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.apiDeployments_ = apiDeployments_; + } else { + result.apiDeployments_ = apiDeploymentsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.getDefaultInstance()) return this; + if (apiDeploymentsBuilder_ == null) { + if (!other.apiDeployments_.isEmpty()) { + if (apiDeployments_.isEmpty()) { + apiDeployments_ = other.apiDeployments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureApiDeploymentsIsMutable(); + apiDeployments_.addAll(other.apiDeployments_); + } + onChanged(); + } + } else { + if (!other.apiDeployments_.isEmpty()) { + if (apiDeploymentsBuilder_.isEmpty()) { + apiDeploymentsBuilder_.dispose(); + apiDeploymentsBuilder_ = null; + apiDeployments_ = other.apiDeployments_; + bitField0_ = (bitField0_ & ~0x00000001); + apiDeploymentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getApiDeploymentsFieldBuilder() : null; + } else { + apiDeploymentsBuilder_.addAllMessages(other.apiDeployments_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List apiDeployments_ = + java.util.Collections.emptyList(); + private void ensureApiDeploymentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + apiDeployments_ = new java.util.ArrayList(apiDeployments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> apiDeploymentsBuilder_; + + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public java.util.List getApiDeploymentsList() { + if (apiDeploymentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(apiDeployments_); + } else { + return apiDeploymentsBuilder_.getMessageList(); + } + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public int getApiDeploymentsCount() { + if (apiDeploymentsBuilder_ == null) { + return apiDeployments_.size(); + } else { + return apiDeploymentsBuilder_.getCount(); + } + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index) { + if (apiDeploymentsBuilder_ == null) { + return apiDeployments_.get(index); + } else { + return apiDeploymentsBuilder_.getMessage(index); + } + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder setApiDeployments( + int index, com.google.cloud.apigeeregistry.v1.ApiDeployment value) { + if (apiDeploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiDeploymentsIsMutable(); + apiDeployments_.set(index, value); + onChanged(); + } else { + apiDeploymentsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder setApiDeployments( + int index, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { + if (apiDeploymentsBuilder_ == null) { + ensureApiDeploymentsIsMutable(); + apiDeployments_.set(index, builderForValue.build()); + onChanged(); + } else { + apiDeploymentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder addApiDeployments(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { + if (apiDeploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiDeploymentsIsMutable(); + apiDeployments_.add(value); + onChanged(); + } else { + apiDeploymentsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder addApiDeployments( + int index, com.google.cloud.apigeeregistry.v1.ApiDeployment value) { + if (apiDeploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiDeploymentsIsMutable(); + apiDeployments_.add(index, value); + onChanged(); + } else { + apiDeploymentsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder addApiDeployments( + com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { + if (apiDeploymentsBuilder_ == null) { + ensureApiDeploymentsIsMutable(); + apiDeployments_.add(builderForValue.build()); + onChanged(); + } else { + apiDeploymentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder addApiDeployments( + int index, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { + if (apiDeploymentsBuilder_ == null) { + ensureApiDeploymentsIsMutable(); + apiDeployments_.add(index, builderForValue.build()); + onChanged(); + } else { + apiDeploymentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder addAllApiDeployments( + java.lang.Iterable values) { + if (apiDeploymentsBuilder_ == null) { + ensureApiDeploymentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, apiDeployments_); + onChanged(); + } else { + apiDeploymentsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder clearApiDeployments() { + if (apiDeploymentsBuilder_ == null) { + apiDeployments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + apiDeploymentsBuilder_.clear(); + } + return this; + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder removeApiDeployments(int index) { + if (apiDeploymentsBuilder_ == null) { + ensureApiDeploymentsIsMutable(); + apiDeployments_.remove(index); + onChanged(); + } else { + apiDeploymentsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder getApiDeploymentsBuilder( + int index) { + return getApiDeploymentsFieldBuilder().getBuilder(index); + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( + int index) { + if (apiDeploymentsBuilder_ == null) { + return apiDeployments_.get(index); } else { + return apiDeploymentsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public java.util.List + getApiDeploymentsOrBuilderList() { + if (apiDeploymentsBuilder_ != null) { + return apiDeploymentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(apiDeployments_); + } + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder addApiDeploymentsBuilder() { + return getApiDeploymentsFieldBuilder().addBuilder( + com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance()); + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder addApiDeploymentsBuilder( + int index) { + return getApiDeploymentsFieldBuilder().addBuilder( + index, com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance()); + } + /** + *
+     * The revisions of the deployment.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public java.util.List + getApiDeploymentsBuilderList() { + return getApiDeploymentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> + getApiDeploymentsFieldBuilder() { + if (apiDeploymentsBuilder_ == null) { + apiDeploymentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder>( + apiDeployments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + apiDeployments_ = null; + } + return apiDeploymentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If 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.
+     * If 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.
+     * If 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; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If 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(); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) + private static final com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApiDeploymentRevisionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApiDeploymentRevisionsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponseOrBuilder.java new file mode 100644 index 000000000000..7c437627627b --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApiDeploymentRevisionsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The revisions of the deployment.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + java.util.List + getApiDeploymentsList(); + /** + *
+   * The revisions of the deployment.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index); + /** + *
+   * The revisions of the deployment.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + int getApiDeploymentsCount(); + /** + *
+   * The revisions of the deployment.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + java.util.List + getApiDeploymentsOrBuilderList(); + /** + *
+   * The revisions of the deployment.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If 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.
+   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequest.java new file mode 100644 index 000000000000..90e15f31a703 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequest.java @@ -0,0 +1,1054 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for ListApiDeployments.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest} + */ +public final class ListApiDeploymentsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) + ListApiDeploymentsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApiDeploymentsRequest.newBuilder() to construct. + private ListApiDeploymentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApiDeploymentsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApiDeploymentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApiDeploymentsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent, which owns this collection of deployments.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 deployments.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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_; + /** + *
+   * The maximum number of deployments to return.
+   * The service may return fewer than this value.
+   * If unspecified, at most 50 values will be returned.
+   * The maximum is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * A page token, received from a previous `ListApiDeployments` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiDeployments` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+   * A page token, received from a previous `ListApiDeployments` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiDeployments` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @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 FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest other = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest 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.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest 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.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListApiDeployments.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest build() { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest result = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent, which owns this collection of deployments.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 deployments.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 deployments.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of deployments.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of deployments.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of deployments to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of deployments to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of deployments to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * A page token, received from a previous `ListApiDeployments` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiDeployments` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * A page token, received from a previous `ListApiDeployments` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiDeployments` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * A page token, received from a previous `ListApiDeployments` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiDeployments` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A page token, received from a previous `ListApiDeployments` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiDeployments` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * A page token, received from a previous `ListApiDeployments` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiDeployments` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) + private static final com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApiDeploymentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApiDeploymentsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequestOrBuilder.java new file mode 100644 index 000000000000..21f5d58c4ae7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequestOrBuilder.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApiDeploymentsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent, which owns this collection of deployments.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 deployments.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of deployments to return.
+   * The service may return fewer than this value.
+   * If unspecified, at most 50 values will be returned.
+   * The maximum is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * A page token, received from a previous `ListApiDeployments` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiDeployments` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * A page token, received from a previous `ListApiDeployments` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiDeployments` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponse.java new file mode 100644 index 000000000000..51795021fca5 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Response message for ListApiDeployments.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse} + */ +public final class ListApiDeploymentsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) + ListApiDeploymentsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApiDeploymentsResponse.newBuilder() to construct. + private ListApiDeploymentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApiDeploymentsResponse() { + apiDeployments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApiDeploymentsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApiDeploymentsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + apiDeployments_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + apiDeployments_.add( + input.readMessage(com.google.cloud.apigeeregistry.v1.ApiDeployment.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + apiDeployments_ = java.util.Collections.unmodifiableList(apiDeployments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.Builder.class); + } + + public static final int API_DEPLOYMENTS_FIELD_NUMBER = 1; + private java.util.List apiDeployments_; + /** + *
+   * The deployments from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + @java.lang.Override + public java.util.List getApiDeploymentsList() { + return apiDeployments_; + } + /** + *
+   * The deployments from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + @java.lang.Override + public java.util.List + getApiDeploymentsOrBuilderList() { + return apiDeployments_; + } + /** + *
+   * The deployments from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + @java.lang.Override + public int getApiDeploymentsCount() { + return apiDeployments_.size(); + } + /** + *
+   * The deployments from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index) { + return apiDeployments_.get(index); + } + /** + *
+   * The deployments from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( + int index) { + return apiDeployments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If 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, which can be sent as `page_token` to retrieve the next page.
+   * If 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 < apiDeployments_.size(); i++) { + output.writeMessage(1, apiDeployments_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < apiDeployments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, apiDeployments_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse other = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) obj; + + if (!getApiDeploymentsList() + .equals(other.getApiDeploymentsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getApiDeploymentsCount() > 0) { + hash = (37 * hash) + API_DEPLOYMENTS_FIELD_NUMBER; + hash = (53 * hash) + getApiDeploymentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse 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.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse 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.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListApiDeployments.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getApiDeploymentsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (apiDeploymentsBuilder_ == null) { + apiDeployments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + apiDeploymentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse build() { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse result = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse(this); + int from_bitField0_ = bitField0_; + if (apiDeploymentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + apiDeployments_ = java.util.Collections.unmodifiableList(apiDeployments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.apiDeployments_ = apiDeployments_; + } else { + result.apiDeployments_ = apiDeploymentsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.getDefaultInstance()) return this; + if (apiDeploymentsBuilder_ == null) { + if (!other.apiDeployments_.isEmpty()) { + if (apiDeployments_.isEmpty()) { + apiDeployments_ = other.apiDeployments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureApiDeploymentsIsMutable(); + apiDeployments_.addAll(other.apiDeployments_); + } + onChanged(); + } + } else { + if (!other.apiDeployments_.isEmpty()) { + if (apiDeploymentsBuilder_.isEmpty()) { + apiDeploymentsBuilder_.dispose(); + apiDeploymentsBuilder_ = null; + apiDeployments_ = other.apiDeployments_; + bitField0_ = (bitField0_ & ~0x00000001); + apiDeploymentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getApiDeploymentsFieldBuilder() : null; + } else { + apiDeploymentsBuilder_.addAllMessages(other.apiDeployments_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List apiDeployments_ = + java.util.Collections.emptyList(); + private void ensureApiDeploymentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + apiDeployments_ = new java.util.ArrayList(apiDeployments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> apiDeploymentsBuilder_; + + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public java.util.List getApiDeploymentsList() { + if (apiDeploymentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(apiDeployments_); + } else { + return apiDeploymentsBuilder_.getMessageList(); + } + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public int getApiDeploymentsCount() { + if (apiDeploymentsBuilder_ == null) { + return apiDeployments_.size(); + } else { + return apiDeploymentsBuilder_.getCount(); + } + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index) { + if (apiDeploymentsBuilder_ == null) { + return apiDeployments_.get(index); + } else { + return apiDeploymentsBuilder_.getMessage(index); + } + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder setApiDeployments( + int index, com.google.cloud.apigeeregistry.v1.ApiDeployment value) { + if (apiDeploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiDeploymentsIsMutable(); + apiDeployments_.set(index, value); + onChanged(); + } else { + apiDeploymentsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder setApiDeployments( + int index, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { + if (apiDeploymentsBuilder_ == null) { + ensureApiDeploymentsIsMutable(); + apiDeployments_.set(index, builderForValue.build()); + onChanged(); + } else { + apiDeploymentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder addApiDeployments(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { + if (apiDeploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiDeploymentsIsMutable(); + apiDeployments_.add(value); + onChanged(); + } else { + apiDeploymentsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder addApiDeployments( + int index, com.google.cloud.apigeeregistry.v1.ApiDeployment value) { + if (apiDeploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiDeploymentsIsMutable(); + apiDeployments_.add(index, value); + onChanged(); + } else { + apiDeploymentsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder addApiDeployments( + com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { + if (apiDeploymentsBuilder_ == null) { + ensureApiDeploymentsIsMutable(); + apiDeployments_.add(builderForValue.build()); + onChanged(); + } else { + apiDeploymentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder addApiDeployments( + int index, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { + if (apiDeploymentsBuilder_ == null) { + ensureApiDeploymentsIsMutable(); + apiDeployments_.add(index, builderForValue.build()); + onChanged(); + } else { + apiDeploymentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder addAllApiDeployments( + java.lang.Iterable values) { + if (apiDeploymentsBuilder_ == null) { + ensureApiDeploymentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, apiDeployments_); + onChanged(); + } else { + apiDeploymentsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder clearApiDeployments() { + if (apiDeploymentsBuilder_ == null) { + apiDeployments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + apiDeploymentsBuilder_.clear(); + } + return this; + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public Builder removeApiDeployments(int index) { + if (apiDeploymentsBuilder_ == null) { + ensureApiDeploymentsIsMutable(); + apiDeployments_.remove(index); + onChanged(); + } else { + apiDeploymentsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder getApiDeploymentsBuilder( + int index) { + return getApiDeploymentsFieldBuilder().getBuilder(index); + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( + int index) { + if (apiDeploymentsBuilder_ == null) { + return apiDeployments_.get(index); } else { + return apiDeploymentsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public java.util.List + getApiDeploymentsOrBuilderList() { + if (apiDeploymentsBuilder_ != null) { + return apiDeploymentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(apiDeployments_); + } + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder addApiDeploymentsBuilder() { + return getApiDeploymentsFieldBuilder().addBuilder( + com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance()); + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder addApiDeploymentsBuilder( + int index) { + return getApiDeploymentsFieldBuilder().addBuilder( + index, com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance()); + } + /** + *
+     * The deployments from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + public java.util.List + getApiDeploymentsBuilderList() { + return getApiDeploymentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> + getApiDeploymentsFieldBuilder() { + if (apiDeploymentsBuilder_ == null) { + apiDeploymentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder>( + apiDeployments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + apiDeployments_ = null; + } + return apiDeploymentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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, which can be sent as `page_token` to retrieve the next page.
+     * If 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, which can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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(); + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) + private static final com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApiDeploymentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApiDeploymentsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponseOrBuilder.java new file mode 100644 index 000000000000..cdd1a747dca6 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApiDeploymentsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The deployments from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + java.util.List + getApiDeploymentsList(); + /** + *
+   * The deployments from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index); + /** + *
+   * The deployments from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + int getApiDeploymentsCount(); + /** + *
+   * The deployments from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + java.util.List + getApiDeploymentsOrBuilderList(); + /** + *
+   * The deployments from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; + */ + com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( + int index); + + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequest.java new file mode 100644 index 000000000000..d33bacc96bd5 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequest.java @@ -0,0 +1,848 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for ListApiSpecRevisions.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest} + */ +public final class ListApiSpecRevisionsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) + ListApiSpecRevisionsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApiSpecRevisionsRequest.newBuilder() to construct. + private ListApiSpecRevisionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApiSpecRevisionsRequest() { + name_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApiSpecRevisionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApiSpecRevisionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the spec to list revisions for.
+   * 
+ * + * 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 name of the spec to list revisions for.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of revisions to return per page.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The page token, received from a previous ListApiSpecRevisions call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+   * The page token, received from a previous ListApiSpecRevisions call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * @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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest other = (com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest 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.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest 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.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListApiSpecRevisions.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest build() { + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest result = new com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest(this); + result.name_ = name_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the spec to list revisions for.
+     * 
+ * + * 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 name of the spec to list revisions for.
+     * 
+ * + * 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 name of the spec to list revisions for.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec to list revisions for.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec to list revisions for.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of revisions to return per page.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of revisions to return per page.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of revisions to return per page.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The page token, received from a previous ListApiSpecRevisions call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * The page token, received from a previous ListApiSpecRevisions call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * The page token, received from a previous ListApiSpecRevisions call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The page token, received from a previous ListApiSpecRevisions call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The page token, received from a previous ListApiSpecRevisions call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) + private static final com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApiSpecRevisionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApiSpecRevisionsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequestOrBuilder.java new file mode 100644 index 000000000000..dcb85ef1cdc9 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequestOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApiSpecRevisionsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the spec to list revisions for.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the spec to list revisions for.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The maximum number of revisions to return per page.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The page token, received from a previous ListApiSpecRevisions call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The page token, received from a previous ListApiSpecRevisions call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponse.java new file mode 100644 index 000000000000..d62dc44192c6 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Response message for ListApiSpecRevisionsResponse.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse} + */ +public final class ListApiSpecRevisionsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) + ListApiSpecRevisionsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApiSpecRevisionsResponse.newBuilder() to construct. + private ListApiSpecRevisionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApiSpecRevisionsResponse() { + apiSpecs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApiSpecRevisionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApiSpecRevisionsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + apiSpecs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + apiSpecs_.add( + input.readMessage(com.google.cloud.apigeeregistry.v1.ApiSpec.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + apiSpecs_ = java.util.Collections.unmodifiableList(apiSpecs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.Builder.class); + } + + public static final int API_SPECS_FIELD_NUMBER = 1; + private java.util.List apiSpecs_; + /** + *
+   * The revisions of the spec.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + @java.lang.Override + public java.util.List getApiSpecsList() { + return apiSpecs_; + } + /** + *
+   * The revisions of the spec.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + @java.lang.Override + public java.util.List + getApiSpecsOrBuilderList() { + return apiSpecs_; + } + /** + *
+   * The revisions of the spec.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + @java.lang.Override + public int getApiSpecsCount() { + return apiSpecs_.size(); + } + /** + *
+   * The revisions of the spec.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index) { + return apiSpecs_.get(index); + } + /** + *
+   * The revisions of the spec.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( + int index) { + return apiSpecs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If 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.
+   * If 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 < apiSpecs_.size(); i++) { + output.writeMessage(1, apiSpecs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < apiSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, apiSpecs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse other = (com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) obj; + + if (!getApiSpecsList() + .equals(other.getApiSpecsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getApiSpecsCount() > 0) { + hash = (37 * hash) + API_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getApiSpecsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse 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.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse 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.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListApiSpecRevisionsResponse.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getApiSpecsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (apiSpecsBuilder_ == null) { + apiSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + apiSpecsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse build() { + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse result = new com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse(this); + int from_bitField0_ = bitField0_; + if (apiSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + apiSpecs_ = java.util.Collections.unmodifiableList(apiSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.apiSpecs_ = apiSpecs_; + } else { + result.apiSpecs_ = apiSpecsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.getDefaultInstance()) return this; + if (apiSpecsBuilder_ == null) { + if (!other.apiSpecs_.isEmpty()) { + if (apiSpecs_.isEmpty()) { + apiSpecs_ = other.apiSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureApiSpecsIsMutable(); + apiSpecs_.addAll(other.apiSpecs_); + } + onChanged(); + } + } else { + if (!other.apiSpecs_.isEmpty()) { + if (apiSpecsBuilder_.isEmpty()) { + apiSpecsBuilder_.dispose(); + apiSpecsBuilder_ = null; + apiSpecs_ = other.apiSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + apiSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getApiSpecsFieldBuilder() : null; + } else { + apiSpecsBuilder_.addAllMessages(other.apiSpecs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List apiSpecs_ = + java.util.Collections.emptyList(); + private void ensureApiSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + apiSpecs_ = new java.util.ArrayList(apiSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> apiSpecsBuilder_; + + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public java.util.List getApiSpecsList() { + if (apiSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(apiSpecs_); + } else { + return apiSpecsBuilder_.getMessageList(); + } + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public int getApiSpecsCount() { + if (apiSpecsBuilder_ == null) { + return apiSpecs_.size(); + } else { + return apiSpecsBuilder_.getCount(); + } + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index) { + if (apiSpecsBuilder_ == null) { + return apiSpecs_.get(index); + } else { + return apiSpecsBuilder_.getMessage(index); + } + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder setApiSpecs( + int index, com.google.cloud.apigeeregistry.v1.ApiSpec value) { + if (apiSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiSpecsIsMutable(); + apiSpecs_.set(index, value); + onChanged(); + } else { + apiSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder setApiSpecs( + int index, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { + if (apiSpecsBuilder_ == null) { + ensureApiSpecsIsMutable(); + apiSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + apiSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder addApiSpecs(com.google.cloud.apigeeregistry.v1.ApiSpec value) { + if (apiSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiSpecsIsMutable(); + apiSpecs_.add(value); + onChanged(); + } else { + apiSpecsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder addApiSpecs( + int index, com.google.cloud.apigeeregistry.v1.ApiSpec value) { + if (apiSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiSpecsIsMutable(); + apiSpecs_.add(index, value); + onChanged(); + } else { + apiSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder addApiSpecs( + com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { + if (apiSpecsBuilder_ == null) { + ensureApiSpecsIsMutable(); + apiSpecs_.add(builderForValue.build()); + onChanged(); + } else { + apiSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder addApiSpecs( + int index, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { + if (apiSpecsBuilder_ == null) { + ensureApiSpecsIsMutable(); + apiSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + apiSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder addAllApiSpecs( + java.lang.Iterable values) { + if (apiSpecsBuilder_ == null) { + ensureApiSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, apiSpecs_); + onChanged(); + } else { + apiSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder clearApiSpecs() { + if (apiSpecsBuilder_ == null) { + apiSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + apiSpecsBuilder_.clear(); + } + return this; + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder removeApiSpecs(int index) { + if (apiSpecsBuilder_ == null) { + ensureApiSpecsIsMutable(); + apiSpecs_.remove(index); + onChanged(); + } else { + apiSpecsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder getApiSpecsBuilder( + int index) { + return getApiSpecsFieldBuilder().getBuilder(index); + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( + int index) { + if (apiSpecsBuilder_ == null) { + return apiSpecs_.get(index); } else { + return apiSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public java.util.List + getApiSpecsOrBuilderList() { + if (apiSpecsBuilder_ != null) { + return apiSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(apiSpecs_); + } + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder addApiSpecsBuilder() { + return getApiSpecsFieldBuilder().addBuilder( + com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance()); + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder addApiSpecsBuilder( + int index) { + return getApiSpecsFieldBuilder().addBuilder( + index, com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance()); + } + /** + *
+     * The revisions of the spec.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public java.util.List + getApiSpecsBuilderList() { + return getApiSpecsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> + getApiSpecsFieldBuilder() { + if (apiSpecsBuilder_ == null) { + apiSpecsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder>( + apiSpecs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + apiSpecs_ = null; + } + return apiSpecsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If 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.
+     * If 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.
+     * If 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; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If 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(); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) + private static final com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApiSpecRevisionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApiSpecRevisionsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponseOrBuilder.java new file mode 100644 index 000000000000..d614627ebf12 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApiSpecRevisionsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The revisions of the spec.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + java.util.List + getApiSpecsList(); + /** + *
+   * The revisions of the spec.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index); + /** + *
+   * The revisions of the spec.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + int getApiSpecsCount(); + /** + *
+   * The revisions of the spec.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + java.util.List + getApiSpecsOrBuilderList(); + /** + *
+   * The revisions of the spec.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If 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.
+   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequest.java new file mode 100644 index 000000000000..edb074eb44c4 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequest.java @@ -0,0 +1,1054 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for ListApiSpecs.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecsRequest} + */ +public final class ListApiSpecsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiSpecsRequest) + ListApiSpecsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApiSpecsRequest.newBuilder() to construct. + private ListApiSpecsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApiSpecsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApiSpecsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApiSpecsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent, which owns this collection of specs.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * 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 specs.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * 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_; + /** + *
+   * The maximum number of specs to return.
+   * The service may return fewer than this value.
+   * If unspecified, at most 50 values will be returned.
+   * The maximum is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * A page token, received from a previous `ListApiSpecs` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiSpecs` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+   * A page token, received from a previous `ListApiSpecs` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiSpecs` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @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 FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields except contents.
+   * 
+ * + * string filter = 4; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields except contents.
+   * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest other = (com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest 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.apigeeregistry.v1.ListApiSpecsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest 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.apigeeregistry.v1.ListApiSpecsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListApiSpecs.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiSpecsRequest) + com.google.cloud.apigeeregistry.v1.ListApiSpecsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest build() { + com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest result = new com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent, which owns this collection of specs.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * 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 specs.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * 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 specs.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of specs.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of specs.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of specs to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of specs to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of specs to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * A page token, received from a previous `ListApiSpecs` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiSpecs` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * A page token, received from a previous `ListApiSpecs` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiSpecs` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * A page token, received from a previous `ListApiSpecs` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiSpecs` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A page token, received from a previous `ListApiSpecs` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiSpecs` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * A page token, received from a previous `ListApiSpecs` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiSpecs` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields except contents.
+     * 
+ * + * string filter = 4; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields except contents.
+     * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields except contents.
+     * 
+ * + * string filter = 4; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields except contents.
+     * 
+ * + * string filter = 4; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields except contents.
+     * 
+ * + * string filter = 4; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiSpecsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiSpecsRequest) + private static final com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApiSpecsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApiSpecsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequestOrBuilder.java new file mode 100644 index 000000000000..208db1f4bf7e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequestOrBuilder.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApiSpecsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiSpecsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent, which owns this collection of specs.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * 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 specs.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of specs to return.
+   * The service may return fewer than this value.
+   * If unspecified, at most 50 values will be returned.
+   * The maximum is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * A page token, received from a previous `ListApiSpecs` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiSpecs` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * A page token, received from a previous `ListApiSpecs` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiSpecs` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields except contents.
+   * 
+ * + * string filter = 4; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields except contents.
+   * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponse.java new file mode 100644 index 000000000000..c48efb626ca9 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Response message for ListApiSpecs.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecsResponse} + */ +public final class ListApiSpecsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiSpecsResponse) + ListApiSpecsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApiSpecsResponse.newBuilder() to construct. + private ListApiSpecsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApiSpecsResponse() { + apiSpecs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApiSpecsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApiSpecsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + apiSpecs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + apiSpecs_.add( + input.readMessage(com.google.cloud.apigeeregistry.v1.ApiSpec.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + apiSpecs_ = java.util.Collections.unmodifiableList(apiSpecs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.Builder.class); + } + + public static final int API_SPECS_FIELD_NUMBER = 1; + private java.util.List apiSpecs_; + /** + *
+   * The specs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + @java.lang.Override + public java.util.List getApiSpecsList() { + return apiSpecs_; + } + /** + *
+   * The specs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + @java.lang.Override + public java.util.List + getApiSpecsOrBuilderList() { + return apiSpecs_; + } + /** + *
+   * The specs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + @java.lang.Override + public int getApiSpecsCount() { + return apiSpecs_.size(); + } + /** + *
+   * The specs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index) { + return apiSpecs_.get(index); + } + /** + *
+   * The specs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( + int index) { + return apiSpecs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If 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, which can be sent as `page_token` to retrieve the next page.
+   * If 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 < apiSpecs_.size(); i++) { + output.writeMessage(1, apiSpecs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < apiSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, apiSpecs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse other = (com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse) obj; + + if (!getApiSpecsList() + .equals(other.getApiSpecsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getApiSpecsCount() > 0) { + hash = (37 * hash) + API_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getApiSpecsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse 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.apigeeregistry.v1.ListApiSpecsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse 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.apigeeregistry.v1.ListApiSpecsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListApiSpecs.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiSpecsResponse) + com.google.cloud.apigeeregistry.v1.ListApiSpecsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getApiSpecsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (apiSpecsBuilder_ == null) { + apiSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + apiSpecsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse build() { + com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse result = new com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse(this); + int from_bitField0_ = bitField0_; + if (apiSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + apiSpecs_ = java.util.Collections.unmodifiableList(apiSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.apiSpecs_ = apiSpecs_; + } else { + result.apiSpecs_ = apiSpecsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.getDefaultInstance()) return this; + if (apiSpecsBuilder_ == null) { + if (!other.apiSpecs_.isEmpty()) { + if (apiSpecs_.isEmpty()) { + apiSpecs_ = other.apiSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureApiSpecsIsMutable(); + apiSpecs_.addAll(other.apiSpecs_); + } + onChanged(); + } + } else { + if (!other.apiSpecs_.isEmpty()) { + if (apiSpecsBuilder_.isEmpty()) { + apiSpecsBuilder_.dispose(); + apiSpecsBuilder_ = null; + apiSpecs_ = other.apiSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + apiSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getApiSpecsFieldBuilder() : null; + } else { + apiSpecsBuilder_.addAllMessages(other.apiSpecs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List apiSpecs_ = + java.util.Collections.emptyList(); + private void ensureApiSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + apiSpecs_ = new java.util.ArrayList(apiSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> apiSpecsBuilder_; + + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public java.util.List getApiSpecsList() { + if (apiSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(apiSpecs_); + } else { + return apiSpecsBuilder_.getMessageList(); + } + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public int getApiSpecsCount() { + if (apiSpecsBuilder_ == null) { + return apiSpecs_.size(); + } else { + return apiSpecsBuilder_.getCount(); + } + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index) { + if (apiSpecsBuilder_ == null) { + return apiSpecs_.get(index); + } else { + return apiSpecsBuilder_.getMessage(index); + } + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder setApiSpecs( + int index, com.google.cloud.apigeeregistry.v1.ApiSpec value) { + if (apiSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiSpecsIsMutable(); + apiSpecs_.set(index, value); + onChanged(); + } else { + apiSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder setApiSpecs( + int index, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { + if (apiSpecsBuilder_ == null) { + ensureApiSpecsIsMutable(); + apiSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + apiSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder addApiSpecs(com.google.cloud.apigeeregistry.v1.ApiSpec value) { + if (apiSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiSpecsIsMutable(); + apiSpecs_.add(value); + onChanged(); + } else { + apiSpecsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder addApiSpecs( + int index, com.google.cloud.apigeeregistry.v1.ApiSpec value) { + if (apiSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiSpecsIsMutable(); + apiSpecs_.add(index, value); + onChanged(); + } else { + apiSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder addApiSpecs( + com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { + if (apiSpecsBuilder_ == null) { + ensureApiSpecsIsMutable(); + apiSpecs_.add(builderForValue.build()); + onChanged(); + } else { + apiSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder addApiSpecs( + int index, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { + if (apiSpecsBuilder_ == null) { + ensureApiSpecsIsMutable(); + apiSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + apiSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder addAllApiSpecs( + java.lang.Iterable values) { + if (apiSpecsBuilder_ == null) { + ensureApiSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, apiSpecs_); + onChanged(); + } else { + apiSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder clearApiSpecs() { + if (apiSpecsBuilder_ == null) { + apiSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + apiSpecsBuilder_.clear(); + } + return this; + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public Builder removeApiSpecs(int index) { + if (apiSpecsBuilder_ == null) { + ensureApiSpecsIsMutable(); + apiSpecs_.remove(index); + onChanged(); + } else { + apiSpecsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder getApiSpecsBuilder( + int index) { + return getApiSpecsFieldBuilder().getBuilder(index); + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( + int index) { + if (apiSpecsBuilder_ == null) { + return apiSpecs_.get(index); } else { + return apiSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public java.util.List + getApiSpecsOrBuilderList() { + if (apiSpecsBuilder_ != null) { + return apiSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(apiSpecs_); + } + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder addApiSpecsBuilder() { + return getApiSpecsFieldBuilder().addBuilder( + com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance()); + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder addApiSpecsBuilder( + int index) { + return getApiSpecsFieldBuilder().addBuilder( + index, com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance()); + } + /** + *
+     * The specs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + public java.util.List + getApiSpecsBuilderList() { + return getApiSpecsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> + getApiSpecsFieldBuilder() { + if (apiSpecsBuilder_ == null) { + apiSpecsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder>( + apiSpecs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + apiSpecs_ = null; + } + return apiSpecsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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, which can be sent as `page_token` to retrieve the next page.
+     * If 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, which can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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(); + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiSpecsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiSpecsResponse) + private static final com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApiSpecsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApiSpecsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponseOrBuilder.java new file mode 100644 index 000000000000..18aafc8c3380 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApiSpecsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiSpecsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The specs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + java.util.List + getApiSpecsList(); + /** + *
+   * The specs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index); + /** + *
+   * The specs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + int getApiSpecsCount(); + /** + *
+   * The specs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + java.util.List + getApiSpecsOrBuilderList(); + /** + *
+   * The specs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; + */ + com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( + int index); + + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequest.java new file mode 100644 index 000000000000..3ca421880623 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequest.java @@ -0,0 +1,1054 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for ListApiVersions.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiVersionsRequest} + */ +public final class ListApiVersionsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiVersionsRequest) + ListApiVersionsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApiVersionsRequest.newBuilder() to construct. + private ListApiVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApiVersionsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApiVersionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApiVersionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent, which owns this collection of versions.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 versions.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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_; + /** + *
+   * The maximum number of versions to return.
+   * The service may return fewer than this value.
+   * If unspecified, at most 50 values will be returned.
+   * The maximum is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * A page token, received from a previous `ListApiVersions` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiVersions` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+   * A page token, received from a previous `ListApiVersions` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiVersions` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @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 FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest other = (com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest 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.apigeeregistry.v1.ListApiVersionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest 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.apigeeregistry.v1.ListApiVersionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListApiVersions.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiVersionsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiVersionsRequest) + com.google.cloud.apigeeregistry.v1.ListApiVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest build() { + com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest result = new com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent, which owns this collection of versions.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 versions.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * 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 versions.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of versions.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of versions.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of versions to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of versions to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of versions to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * A page token, received from a previous `ListApiVersions` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiVersions` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * A page token, received from a previous `ListApiVersions` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiVersions` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * A page token, received from a previous `ListApiVersions` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiVersions` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A page token, received from a previous `ListApiVersions` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiVersions` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * A page token, received from a previous `ListApiVersions` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApiVersions` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiVersionsRequest) + private static final com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApiVersionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApiVersionsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequestOrBuilder.java new file mode 100644 index 000000000000..e6b628396556 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequestOrBuilder.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApiVersionsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent, which owns this collection of versions.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * 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 versions.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of versions to return.
+   * The service may return fewer than this value.
+   * If unspecified, at most 50 values will be returned.
+   * The maximum is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * A page token, received from a previous `ListApiVersions` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiVersions` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * A page token, received from a previous `ListApiVersions` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApiVersions` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponse.java new file mode 100644 index 000000000000..f0138d370a16 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Response message for ListApiVersions.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiVersionsResponse} + */ +public final class ListApiVersionsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiVersionsResponse) + ListApiVersionsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApiVersionsResponse.newBuilder() to construct. + private ListApiVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApiVersionsResponse() { + apiVersions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApiVersionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApiVersionsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + apiVersions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + apiVersions_.add( + input.readMessage(com.google.cloud.apigeeregistry.v1.ApiVersion.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + apiVersions_ = java.util.Collections.unmodifiableList(apiVersions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.Builder.class); + } + + public static final int API_VERSIONS_FIELD_NUMBER = 1; + private java.util.List apiVersions_; + /** + *
+   * The versions from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + @java.lang.Override + public java.util.List getApiVersionsList() { + return apiVersions_; + } + /** + *
+   * The versions from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + @java.lang.Override + public java.util.List + getApiVersionsOrBuilderList() { + return apiVersions_; + } + /** + *
+   * The versions from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + @java.lang.Override + public int getApiVersionsCount() { + return apiVersions_.size(); + } + /** + *
+   * The versions from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersions(int index) { + return apiVersions_.get(index); + } + /** + *
+   * The versions from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionsOrBuilder( + int index) { + return apiVersions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If 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, which can be sent as `page_token` to retrieve the next page.
+   * If 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 < apiVersions_.size(); i++) { + output.writeMessage(1, apiVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < apiVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, apiVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse other = (com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse) obj; + + if (!getApiVersionsList() + .equals(other.getApiVersionsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getApiVersionsCount() > 0) { + hash = (37 * hash) + API_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getApiVersionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse 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.apigeeregistry.v1.ListApiVersionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse 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.apigeeregistry.v1.ListApiVersionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListApiVersions.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiVersionsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiVersionsResponse) + com.google.cloud.apigeeregistry.v1.ListApiVersionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getApiVersionsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (apiVersionsBuilder_ == null) { + apiVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + apiVersionsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse build() { + com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse result = new com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse(this); + int from_bitField0_ = bitField0_; + if (apiVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + apiVersions_ = java.util.Collections.unmodifiableList(apiVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.apiVersions_ = apiVersions_; + } else { + result.apiVersions_ = apiVersionsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.getDefaultInstance()) return this; + if (apiVersionsBuilder_ == null) { + if (!other.apiVersions_.isEmpty()) { + if (apiVersions_.isEmpty()) { + apiVersions_ = other.apiVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureApiVersionsIsMutable(); + apiVersions_.addAll(other.apiVersions_); + } + onChanged(); + } + } else { + if (!other.apiVersions_.isEmpty()) { + if (apiVersionsBuilder_.isEmpty()) { + apiVersionsBuilder_.dispose(); + apiVersionsBuilder_ = null; + apiVersions_ = other.apiVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + apiVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getApiVersionsFieldBuilder() : null; + } else { + apiVersionsBuilder_.addAllMessages(other.apiVersions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List apiVersions_ = + java.util.Collections.emptyList(); + private void ensureApiVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + apiVersions_ = new java.util.ArrayList(apiVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> apiVersionsBuilder_; + + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public java.util.List getApiVersionsList() { + if (apiVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(apiVersions_); + } else { + return apiVersionsBuilder_.getMessageList(); + } + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public int getApiVersionsCount() { + if (apiVersionsBuilder_ == null) { + return apiVersions_.size(); + } else { + return apiVersionsBuilder_.getCount(); + } + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersions(int index) { + if (apiVersionsBuilder_ == null) { + return apiVersions_.get(index); + } else { + return apiVersionsBuilder_.getMessage(index); + } + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public Builder setApiVersions( + int index, com.google.cloud.apigeeregistry.v1.ApiVersion value) { + if (apiVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiVersionsIsMutable(); + apiVersions_.set(index, value); + onChanged(); + } else { + apiVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public Builder setApiVersions( + int index, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder builderForValue) { + if (apiVersionsBuilder_ == null) { + ensureApiVersionsIsMutable(); + apiVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + apiVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public Builder addApiVersions(com.google.cloud.apigeeregistry.v1.ApiVersion value) { + if (apiVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiVersionsIsMutable(); + apiVersions_.add(value); + onChanged(); + } else { + apiVersionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public Builder addApiVersions( + int index, com.google.cloud.apigeeregistry.v1.ApiVersion value) { + if (apiVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiVersionsIsMutable(); + apiVersions_.add(index, value); + onChanged(); + } else { + apiVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public Builder addApiVersions( + com.google.cloud.apigeeregistry.v1.ApiVersion.Builder builderForValue) { + if (apiVersionsBuilder_ == null) { + ensureApiVersionsIsMutable(); + apiVersions_.add(builderForValue.build()); + onChanged(); + } else { + apiVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public Builder addApiVersions( + int index, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder builderForValue) { + if (apiVersionsBuilder_ == null) { + ensureApiVersionsIsMutable(); + apiVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + apiVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public Builder addAllApiVersions( + java.lang.Iterable values) { + if (apiVersionsBuilder_ == null) { + ensureApiVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, apiVersions_); + onChanged(); + } else { + apiVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public Builder clearApiVersions() { + if (apiVersionsBuilder_ == null) { + apiVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + apiVersionsBuilder_.clear(); + } + return this; + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public Builder removeApiVersions(int index) { + if (apiVersionsBuilder_ == null) { + ensureApiVersionsIsMutable(); + apiVersions_.remove(index); + onChanged(); + } else { + apiVersionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiVersion.Builder getApiVersionsBuilder( + int index) { + return getApiVersionsFieldBuilder().getBuilder(index); + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionsOrBuilder( + int index) { + if (apiVersionsBuilder_ == null) { + return apiVersions_.get(index); } else { + return apiVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public java.util.List + getApiVersionsOrBuilderList() { + if (apiVersionsBuilder_ != null) { + return apiVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(apiVersions_); + } + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiVersion.Builder addApiVersionsBuilder() { + return getApiVersionsFieldBuilder().addBuilder( + com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance()); + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiVersion.Builder addApiVersionsBuilder( + int index) { + return getApiVersionsFieldBuilder().addBuilder( + index, com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance()); + } + /** + *
+     * The versions from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + public java.util.List + getApiVersionsBuilderList() { + return getApiVersionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> + getApiVersionsFieldBuilder() { + if (apiVersionsBuilder_ == null) { + apiVersionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder>( + apiVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + apiVersions_ = null; + } + return apiVersionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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, which can be sent as `page_token` to retrieve the next page.
+     * If 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, which can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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(); + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiVersionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiVersionsResponse) + private static final com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApiVersionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApiVersionsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponseOrBuilder.java new file mode 100644 index 000000000000..9e2e1a92d796 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApiVersionsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiVersionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The versions from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + java.util.List + getApiVersionsList(); + /** + *
+   * The versions from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersions(int index); + /** + *
+   * The versions from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + int getApiVersionsCount(); + /** + *
+   * The versions from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + java.util.List + getApiVersionsOrBuilderList(); + /** + *
+   * The versions from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; + */ + com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionsOrBuilder( + int index); + + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequest.java new file mode 100644 index 000000000000..bacfff48f6ee --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequest.java @@ -0,0 +1,1054 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for ListApis.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApisRequest} + */ +public final class ListApisRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApisRequest) + ListApisRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApisRequest.newBuilder() to construct. + private ListApisRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApisRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApisRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApisRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApisRequest.class, com.google.cloud.apigeeregistry.v1.ListApisRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent, which owns this collection of APIs.
+   * Format: `projects/*/locations/*`
+   * 
+ * + * 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 APIs.
+   * Format: `projects/*/locations/*`
+   * 
+ * + * 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_; + /** + *
+   * The maximum number of APIs to return.
+   * The service may return fewer than this value.
+   * If unspecified, at most 50 values will be returned.
+   * The maximum is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * A page token, received from a previous `ListApis` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApis` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+   * A page token, received from a previous `ListApis` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApis` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @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 FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApisRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApisRequest other = (com.google.cloud.apigeeregistry.v1.ListApisRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApisRequest 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.apigeeregistry.v1.ListApisRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApisRequest 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.apigeeregistry.v1.ListApisRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApisRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListApis.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApisRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApisRequest) + com.google.cloud.apigeeregistry.v1.ListApisRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApisRequest.class, com.google.cloud.apigeeregistry.v1.ListApisRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApisRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApisRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApisRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApisRequest build() { + com.google.cloud.apigeeregistry.v1.ListApisRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApisRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApisRequest result = new com.google.cloud.apigeeregistry.v1.ListApisRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApisRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApisRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApisRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApisRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApisRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApisRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent, which owns this collection of APIs.
+     * Format: `projects/*/locations/*`
+     * 
+ * + * 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 APIs.
+     * Format: `projects/*/locations/*`
+     * 
+ * + * 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 APIs.
+     * Format: `projects/*/locations/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of APIs.
+     * Format: `projects/*/locations/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of APIs.
+     * Format: `projects/*/locations/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of APIs to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of APIs to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of APIs to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * A page token, received from a previous `ListApis` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApis` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * A page token, received from a previous `ListApis` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApis` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * A page token, received from a previous `ListApis` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApis` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A page token, received from a previous `ListApis` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApis` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * A page token, received from a previous `ListApis` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListApis` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields.
+     * 
+ * + * string filter = 4; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApisRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApisRequest) + private static final com.google.cloud.apigeeregistry.v1.ListApisRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApisRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApisRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApisRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApisRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApisRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequestOrBuilder.java new file mode 100644 index 000000000000..236cced25d5f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequestOrBuilder.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApisRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApisRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent, which owns this collection of APIs.
+   * Format: `projects/*/locations/*`
+   * 
+ * + * 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 APIs.
+   * Format: `projects/*/locations/*`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of APIs to return.
+   * The service may return fewer than this value.
+   * If unspecified, at most 50 values will be returned.
+   * The maximum is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * A page token, received from a previous `ListApis` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApis` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * A page token, received from a previous `ListApis` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListApis` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields.
+   * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponse.java new file mode 100644 index 000000000000..c01abf8c5777 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Response message for ListApis.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApisResponse} + */ +public final class ListApisResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApisResponse) + ListApisResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListApisResponse.newBuilder() to construct. + private ListApisResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListApisResponse() { + apis_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListApisResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListApisResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + apis_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + apis_.add( + input.readMessage(com.google.cloud.apigeeregistry.v1.Api.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + apis_ = java.util.Collections.unmodifiableList(apis_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApisResponse.class, com.google.cloud.apigeeregistry.v1.ListApisResponse.Builder.class); + } + + public static final int APIS_FIELD_NUMBER = 1; + private java.util.List apis_; + /** + *
+   * The APIs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + @java.lang.Override + public java.util.List getApisList() { + return apis_; + } + /** + *
+   * The APIs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + @java.lang.Override + public java.util.List + getApisOrBuilderList() { + return apis_; + } + /** + *
+   * The APIs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + @java.lang.Override + public int getApisCount() { + return apis_.size(); + } + /** + *
+   * The APIs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Api getApis(int index) { + return apis_.get(index); + } + /** + *
+   * The APIs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApisOrBuilder( + int index) { + return apis_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If 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, which can be sent as `page_token` to retrieve the next page.
+   * If 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 < apis_.size(); i++) { + output.writeMessage(1, apis_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < apis_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, apis_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApisResponse)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListApisResponse other = (com.google.cloud.apigeeregistry.v1.ListApisResponse) obj; + + if (!getApisList() + .equals(other.getApisList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getApisCount() > 0) { + hash = (37 * hash) + APIS_FIELD_NUMBER; + hash = (53 * hash) + getApisList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApisResponse 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.apigeeregistry.v1.ListApisResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApisResponse 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.apigeeregistry.v1.ListApisResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApisResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListApis.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApisResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApisResponse) + com.google.cloud.apigeeregistry.v1.ListApisResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListApisResponse.class, com.google.cloud.apigeeregistry.v1.ListApisResponse.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListApisResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getApisFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (apisBuilder_ == null) { + apis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + apisBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApisResponse getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListApisResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApisResponse build() { + com.google.cloud.apigeeregistry.v1.ListApisResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApisResponse buildPartial() { + com.google.cloud.apigeeregistry.v1.ListApisResponse result = new com.google.cloud.apigeeregistry.v1.ListApisResponse(this); + int from_bitField0_ = bitField0_; + if (apisBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + apis_ = java.util.Collections.unmodifiableList(apis_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.apis_ = apis_; + } else { + result.apis_ = apisBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListApisResponse) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApisResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApisResponse other) { + if (other == com.google.cloud.apigeeregistry.v1.ListApisResponse.getDefaultInstance()) return this; + if (apisBuilder_ == null) { + if (!other.apis_.isEmpty()) { + if (apis_.isEmpty()) { + apis_ = other.apis_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureApisIsMutable(); + apis_.addAll(other.apis_); + } + onChanged(); + } + } else { + if (!other.apis_.isEmpty()) { + if (apisBuilder_.isEmpty()) { + apisBuilder_.dispose(); + apisBuilder_ = null; + apis_ = other.apis_; + bitField0_ = (bitField0_ & ~0x00000001); + apisBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getApisFieldBuilder() : null; + } else { + apisBuilder_.addAllMessages(other.apis_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListApisResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApisResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List apis_ = + java.util.Collections.emptyList(); + private void ensureApisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + apis_ = new java.util.ArrayList(apis_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> apisBuilder_; + + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public java.util.List getApisList() { + if (apisBuilder_ == null) { + return java.util.Collections.unmodifiableList(apis_); + } else { + return apisBuilder_.getMessageList(); + } + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public int getApisCount() { + if (apisBuilder_ == null) { + return apis_.size(); + } else { + return apisBuilder_.getCount(); + } + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public com.google.cloud.apigeeregistry.v1.Api getApis(int index) { + if (apisBuilder_ == null) { + return apis_.get(index); + } else { + return apisBuilder_.getMessage(index); + } + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public Builder setApis( + int index, com.google.cloud.apigeeregistry.v1.Api value) { + if (apisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApisIsMutable(); + apis_.set(index, value); + onChanged(); + } else { + apisBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public Builder setApis( + int index, com.google.cloud.apigeeregistry.v1.Api.Builder builderForValue) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.set(index, builderForValue.build()); + onChanged(); + } else { + apisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public Builder addApis(com.google.cloud.apigeeregistry.v1.Api value) { + if (apisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApisIsMutable(); + apis_.add(value); + onChanged(); + } else { + apisBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public Builder addApis( + int index, com.google.cloud.apigeeregistry.v1.Api value) { + if (apisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApisIsMutable(); + apis_.add(index, value); + onChanged(); + } else { + apisBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public Builder addApis( + com.google.cloud.apigeeregistry.v1.Api.Builder builderForValue) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.add(builderForValue.build()); + onChanged(); + } else { + apisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public Builder addApis( + int index, com.google.cloud.apigeeregistry.v1.Api.Builder builderForValue) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.add(index, builderForValue.build()); + onChanged(); + } else { + apisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public Builder addAllApis( + java.lang.Iterable values) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, apis_); + onChanged(); + } else { + apisBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public Builder clearApis() { + if (apisBuilder_ == null) { + apis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + apisBuilder_.clear(); + } + return this; + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public Builder removeApis(int index) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.remove(index); + onChanged(); + } else { + apisBuilder_.remove(index); + } + return this; + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public com.google.cloud.apigeeregistry.v1.Api.Builder getApisBuilder( + int index) { + return getApisFieldBuilder().getBuilder(index); + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApisOrBuilder( + int index) { + if (apisBuilder_ == null) { + return apis_.get(index); } else { + return apisBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public java.util.List + getApisOrBuilderList() { + if (apisBuilder_ != null) { + return apisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(apis_); + } + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public com.google.cloud.apigeeregistry.v1.Api.Builder addApisBuilder() { + return getApisFieldBuilder().addBuilder( + com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance()); + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public com.google.cloud.apigeeregistry.v1.Api.Builder addApisBuilder( + int index) { + return getApisFieldBuilder().addBuilder( + index, com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance()); + } + /** + *
+     * The APIs from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + public java.util.List + getApisBuilderList() { + return getApisFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> + getApisFieldBuilder() { + if (apisBuilder_ == null) { + apisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder>( + apis_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + apis_ = null; + } + return apisBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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, which can be sent as `page_token` to retrieve the next page.
+     * If 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, which can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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(); + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApisResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApisResponse) + private static final com.google.cloud.apigeeregistry.v1.ListApisResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApisResponse(); + } + + public static com.google.cloud.apigeeregistry.v1.ListApisResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApisResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListApisResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListApisResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponseOrBuilder.java new file mode 100644 index 000000000000..2d531a5768e2 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListApisResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApisResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The APIs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + java.util.List + getApisList(); + /** + *
+   * The APIs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + com.google.cloud.apigeeregistry.v1.Api getApis(int index); + /** + *
+   * The APIs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + int getApisCount(); + /** + *
+   * The APIs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + java.util.List + getApisOrBuilderList(); + /** + *
+   * The APIs from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; + */ + com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApisOrBuilder( + int index); + + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequest.java new file mode 100644 index 000000000000..481e53604fa8 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequest.java @@ -0,0 +1,1054 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for ListArtifacts.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListArtifactsRequest} + */ +public final class ListArtifactsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListArtifactsRequest) + ListArtifactsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListArtifactsRequest.newBuilder() to construct. + private ListArtifactsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListArtifactsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListArtifactsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListArtifactsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.class, com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent, which owns this collection of artifacts.
+   * Format: `{parent}`
+   * 
+ * + * 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 artifacts.
+   * Format: `{parent}`
+   * 
+ * + * 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_; + /** + *
+   * The maximum number of artifacts to return.
+   * The service may return fewer than this value.
+   * If unspecified, at most 50 values will be returned.
+   * The maximum is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * A page token, received from a previous `ListArtifacts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListArtifacts` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+   * A page token, received from a previous `ListArtifacts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListArtifacts` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @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 FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields except contents.
+   * 
+ * + * string filter = 4; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields except contents.
+   * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListArtifactsRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListArtifactsRequest other = (com.google.cloud.apigeeregistry.v1.ListArtifactsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest 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.apigeeregistry.v1.ListArtifactsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest 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.apigeeregistry.v1.ListArtifactsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListArtifactsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListArtifacts.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListArtifactsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListArtifactsRequest) + com.google.cloud.apigeeregistry.v1.ListArtifactsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.class, com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListArtifactsRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListArtifactsRequest build() { + com.google.cloud.apigeeregistry.v1.ListArtifactsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListArtifactsRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.ListArtifactsRequest result = new com.google.cloud.apigeeregistry.v1.ListArtifactsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListArtifactsRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListArtifactsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListArtifactsRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListArtifactsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent, which owns this collection of artifacts.
+     * Format: `{parent}`
+     * 
+ * + * 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 artifacts.
+     * Format: `{parent}`
+     * 
+ * + * 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 artifacts.
+     * Format: `{parent}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of artifacts.
+     * Format: `{parent}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent, which owns this collection of artifacts.
+     * Format: `{parent}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of artifacts to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of artifacts to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of artifacts to return.
+     * The service may return fewer than this value.
+     * If unspecified, at most 50 values will be returned.
+     * The maximum is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * A page token, received from a previous `ListArtifacts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListArtifacts` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * A page token, received from a previous `ListArtifacts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListArtifacts` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @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; + } + } + /** + *
+     * A page token, received from a previous `ListArtifacts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListArtifacts` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A page token, received from a previous `ListArtifacts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListArtifacts` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * A page token, received from a previous `ListArtifacts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListArtifacts` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields except contents.
+     * 
+ * + * string filter = 4; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields except contents.
+     * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields except contents.
+     * 
+ * + * string filter = 4; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields except contents.
+     * 
+ * + * string filter = 4; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * An expression that can be used to filter the list. Filters use the Common
+     * Expression Language and can refer to all message fields except contents.
+     * 
+ * + * string filter = 4; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListArtifactsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListArtifactsRequest) + private static final com.google.cloud.apigeeregistry.v1.ListArtifactsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListArtifactsRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListArtifactsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListArtifactsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListArtifactsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequestOrBuilder.java new file mode 100644 index 000000000000..111dbbb9a126 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequestOrBuilder.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListArtifactsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListArtifactsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent, which owns this collection of artifacts.
+   * Format: `{parent}`
+   * 
+ * + * 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 artifacts.
+   * Format: `{parent}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of artifacts to return.
+   * The service may return fewer than this value.
+   * If unspecified, at most 50 values will be returned.
+   * The maximum is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * A page token, received from a previous `ListArtifacts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListArtifacts` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * A page token, received from a previous `ListArtifacts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListArtifacts` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields except contents.
+   * 
+ * + * string filter = 4; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * An expression that can be used to filter the list. Filters use the Common
+   * Expression Language and can refer to all message fields except contents.
+   * 
+ * + * string filter = 4; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponse.java new file mode 100644 index 000000000000..49972c4d6a10 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Response message for ListArtifacts.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListArtifactsResponse} + */ +public final class ListArtifactsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListArtifactsResponse) + ListArtifactsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListArtifactsResponse.newBuilder() to construct. + private ListArtifactsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListArtifactsResponse() { + artifacts_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListArtifactsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListArtifactsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + artifacts_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + artifacts_.add( + input.readMessage(com.google.cloud.apigeeregistry.v1.Artifact.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + artifacts_ = java.util.Collections.unmodifiableList(artifacts_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.class, com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.Builder.class); + } + + public static final int ARTIFACTS_FIELD_NUMBER = 1; + private java.util.List artifacts_; + /** + *
+   * The artifacts from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + @java.lang.Override + public java.util.List getArtifactsList() { + return artifacts_; + } + /** + *
+   * The artifacts from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + @java.lang.Override + public java.util.List + getArtifactsOrBuilderList() { + return artifacts_; + } + /** + *
+   * The artifacts from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + @java.lang.Override + public int getArtifactsCount() { + return artifacts_.size(); + } + /** + *
+   * The artifacts from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Artifact getArtifacts(int index) { + return artifacts_.get(index); + } + /** + *
+   * The artifacts from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactsOrBuilder( + int index) { + return artifacts_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If 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, which can be sent as `page_token` to retrieve the next page.
+   * If 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 < artifacts_.size(); i++) { + output.writeMessage(1, artifacts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < artifacts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, artifacts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListArtifactsResponse)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ListArtifactsResponse other = (com.google.cloud.apigeeregistry.v1.ListArtifactsResponse) obj; + + if (!getArtifactsList() + .equals(other.getArtifactsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getArtifactsCount() > 0) { + hash = (37 * hash) + ARTIFACTS_FIELD_NUMBER; + hash = (53 * hash) + getArtifactsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse 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.apigeeregistry.v1.ListArtifactsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse 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.apigeeregistry.v1.ListArtifactsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListArtifactsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListArtifacts.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ListArtifactsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListArtifactsResponse) + com.google.cloud.apigeeregistry.v1.ListArtifactsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.class, com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getArtifactsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (artifactsBuilder_ == null) { + artifacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + artifactsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListArtifactsResponse getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListArtifactsResponse build() { + com.google.cloud.apigeeregistry.v1.ListArtifactsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListArtifactsResponse buildPartial() { + com.google.cloud.apigeeregistry.v1.ListArtifactsResponse result = new com.google.cloud.apigeeregistry.v1.ListArtifactsResponse(this); + int from_bitField0_ = bitField0_; + if (artifactsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + artifacts_ = java.util.Collections.unmodifiableList(artifacts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.artifacts_ = artifacts_; + } else { + result.artifacts_ = artifactsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ListArtifactsResponse) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ListArtifactsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListArtifactsResponse other) { + if (other == com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.getDefaultInstance()) return this; + if (artifactsBuilder_ == null) { + if (!other.artifacts_.isEmpty()) { + if (artifacts_.isEmpty()) { + artifacts_ = other.artifacts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureArtifactsIsMutable(); + artifacts_.addAll(other.artifacts_); + } + onChanged(); + } + } else { + if (!other.artifacts_.isEmpty()) { + if (artifactsBuilder_.isEmpty()) { + artifactsBuilder_.dispose(); + artifactsBuilder_ = null; + artifacts_ = other.artifacts_; + bitField0_ = (bitField0_ & ~0x00000001); + artifactsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getArtifactsFieldBuilder() : null; + } else { + artifactsBuilder_.addAllMessages(other.artifacts_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ListArtifactsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List artifacts_ = + java.util.Collections.emptyList(); + private void ensureArtifactsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + artifacts_ = new java.util.ArrayList(artifacts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> artifactsBuilder_; + + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public java.util.List getArtifactsList() { + if (artifactsBuilder_ == null) { + return java.util.Collections.unmodifiableList(artifacts_); + } else { + return artifactsBuilder_.getMessageList(); + } + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public int getArtifactsCount() { + if (artifactsBuilder_ == null) { + return artifacts_.size(); + } else { + return artifactsBuilder_.getCount(); + } + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public com.google.cloud.apigeeregistry.v1.Artifact getArtifacts(int index) { + if (artifactsBuilder_ == null) { + return artifacts_.get(index); + } else { + return artifactsBuilder_.getMessage(index); + } + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public Builder setArtifacts( + int index, com.google.cloud.apigeeregistry.v1.Artifact value) { + if (artifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArtifactsIsMutable(); + artifacts_.set(index, value); + onChanged(); + } else { + artifactsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public Builder setArtifacts( + int index, com.google.cloud.apigeeregistry.v1.Artifact.Builder builderForValue) { + if (artifactsBuilder_ == null) { + ensureArtifactsIsMutable(); + artifacts_.set(index, builderForValue.build()); + onChanged(); + } else { + artifactsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public Builder addArtifacts(com.google.cloud.apigeeregistry.v1.Artifact value) { + if (artifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArtifactsIsMutable(); + artifacts_.add(value); + onChanged(); + } else { + artifactsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public Builder addArtifacts( + int index, com.google.cloud.apigeeregistry.v1.Artifact value) { + if (artifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArtifactsIsMutable(); + artifacts_.add(index, value); + onChanged(); + } else { + artifactsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public Builder addArtifacts( + com.google.cloud.apigeeregistry.v1.Artifact.Builder builderForValue) { + if (artifactsBuilder_ == null) { + ensureArtifactsIsMutable(); + artifacts_.add(builderForValue.build()); + onChanged(); + } else { + artifactsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public Builder addArtifacts( + int index, com.google.cloud.apigeeregistry.v1.Artifact.Builder builderForValue) { + if (artifactsBuilder_ == null) { + ensureArtifactsIsMutable(); + artifacts_.add(index, builderForValue.build()); + onChanged(); + } else { + artifactsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public Builder addAllArtifacts( + java.lang.Iterable values) { + if (artifactsBuilder_ == null) { + ensureArtifactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, artifacts_); + onChanged(); + } else { + artifactsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public Builder clearArtifacts() { + if (artifactsBuilder_ == null) { + artifacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + artifactsBuilder_.clear(); + } + return this; + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public Builder removeArtifacts(int index) { + if (artifactsBuilder_ == null) { + ensureArtifactsIsMutable(); + artifacts_.remove(index); + onChanged(); + } else { + artifactsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public com.google.cloud.apigeeregistry.v1.Artifact.Builder getArtifactsBuilder( + int index) { + return getArtifactsFieldBuilder().getBuilder(index); + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactsOrBuilder( + int index) { + if (artifactsBuilder_ == null) { + return artifacts_.get(index); } else { + return artifactsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public java.util.List + getArtifactsOrBuilderList() { + if (artifactsBuilder_ != null) { + return artifactsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(artifacts_); + } + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public com.google.cloud.apigeeregistry.v1.Artifact.Builder addArtifactsBuilder() { + return getArtifactsFieldBuilder().addBuilder( + com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance()); + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public com.google.cloud.apigeeregistry.v1.Artifact.Builder addArtifactsBuilder( + int index) { + return getArtifactsFieldBuilder().addBuilder( + index, com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance()); + } + /** + *
+     * The artifacts from the specified publisher.
+     * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + public java.util.List + getArtifactsBuilderList() { + return getArtifactsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> + getArtifactsFieldBuilder() { + if (artifactsBuilder_ == null) { + artifactsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder>( + artifacts_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + artifacts_ = null; + } + return artifactsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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, which can be sent as `page_token` to retrieve the next page.
+     * If 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, which can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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(); + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If 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; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListArtifactsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListArtifactsResponse) + private static final com.google.cloud.apigeeregistry.v1.ListArtifactsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListArtifactsResponse(); + } + + public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListArtifactsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListArtifactsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ListArtifactsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponseOrBuilder.java new file mode 100644 index 000000000000..6e158639a9a8 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ListArtifactsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListArtifactsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The artifacts from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + java.util.List + getArtifactsList(); + /** + *
+   * The artifacts from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + com.google.cloud.apigeeregistry.v1.Artifact getArtifacts(int index); + /** + *
+   * The artifacts from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + int getArtifactsCount(); + /** + *
+   * The artifacts from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + java.util.List + getArtifactsOrBuilderList(); + /** + *
+   * The artifacts from the specified publisher.
+   * 
+ * + * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; + */ + com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactsOrBuilder( + int index); + + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/LocationName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/LocationName.java new file mode 100644 index 000000000000..4c3cc35bc06e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@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 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 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(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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadata.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadata.java new file mode 100644 index 000000000000..26d783d1a263 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadata.java @@ -0,0 +1,1658 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.OperationMetadata} + */ +public final class OperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.OperationMetadata) + OperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + verb_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + statusMessage_ = s; + break; + } + case 48: { + + cancellationRequested_ = input.readBool(); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + apiVersion_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.OperationMetadata.class, com.google.cloud.apigeeregistry.v1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private volatile java.lang.Object target_; + /** + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * @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; + } + } + /** + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * @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; + private volatile java.lang.Object verb_; + /** + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * @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; + } + } + /** + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * @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; + private volatile java.lang.Object statusMessage_; + /** + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * @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; + } + } + /** + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * @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 CANCELLATION_REQUESTED_FIELD_NUMBER = 6; + private boolean cancellationRequested_; + /** + *
+   * Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool cancellation_requested = 6; + * @return The cancellationRequested. + */ + @java.lang.Override + public boolean getCancellationRequested() { + return cancellationRequested_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object apiVersion_; + /** + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * @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; + } + } + /** + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * @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 (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (cancellationRequested_ != false) { + output.writeBool(6, cancellationRequested_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (cancellationRequested_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, cancellationRequested_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.OperationMetadata other = (com.google.cloud.apigeeregistry.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 (getCancellationRequested() + != other.getCancellationRequested()) return false; + if (!getApiVersion() + .equals(other.getApiVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (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) + CANCELLATION_REQUESTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCancellationRequested()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.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.apigeeregistry.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.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.apigeeregistry.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.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.apigeeregistry.v1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.OperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.OperationMetadata) + com.google.cloud.apigeeregistry.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.OperationMetadata.class, com.google.cloud.apigeeregistry.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + target_ = ""; + + verb_ = ""; + + statusMessage_ = ""; + + cancellationRequested_ = false; + + apiVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.OperationMetadata build() { + com.google.cloud.apigeeregistry.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.OperationMetadata buildPartial() { + com.google.cloud.apigeeregistry.v1.OperationMetadata result = new com.google.cloud.apigeeregistry.v1.OperationMetadata(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.target_ = target_; + result.verb_ = verb_; + result.statusMessage_ = statusMessage_; + result.cancellationRequested_ = cancellationRequested_; + result.apiVersion_ = apiVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.OperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.OperationMetadata other) { + if (other == com.google.cloud.apigeeregistry.v1.OperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + onChanged(); + } + if (other.getCancellationRequested() != false) { + setCancellationRequested(other.getCancellationRequested()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @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(); + } + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @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(); + } + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * @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; + } + } + /** + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * @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; + } + } + /** + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * @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; + onChanged(); + return this; + } + /** + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * @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; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * @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; + } + } + /** + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * @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; + } + } + /** + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * @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; + onChanged(); + return this; + } + /** + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * @return This builder for chaining. + */ + public Builder clearVerb() { + + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * @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; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * @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; + } + } + /** + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * @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; + } + } + /** + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * @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; + onChanged(); + return this; + } + /** + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + + statusMessage_ = getDefaultInstance().getStatusMessage(); + onChanged(); + return this; + } + /** + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * @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; + onChanged(); + return this; + } + + private boolean cancellationRequested_ ; + /** + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool cancellation_requested = 6; + * @return The cancellationRequested. + */ + @java.lang.Override + public boolean getCancellationRequested() { + return cancellationRequested_; + } + /** + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool cancellation_requested = 6; + * @param value The cancellationRequested to set. + * @return This builder for chaining. + */ + public Builder setCancellationRequested(boolean value) { + + cancellationRequested_ = value; + onChanged(); + return this; + } + /** + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool cancellation_requested = 6; + * @return This builder for chaining. + */ + public Builder clearCancellationRequested() { + + cancellationRequested_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * @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; + } + } + /** + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * @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; + } + } + /** + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * @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; + onChanged(); + return this; + } + /** + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = getDefaultInstance().getApiVersion(); + onChanged(); + return this; + } + /** + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * @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; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.OperationMetadata) + private static final com.google.cloud.apigeeregistry.v1.OperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.OperationMetadata(); + } + + public static com.google.cloud.apigeeregistry.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 { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..6c8392780a0d --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,156 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface OperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * @return The target. + */ + java.lang.String getTarget(); + /** + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * @return The bytes for target. + */ + com.google.protobuf.ByteString + getTargetBytes(); + + /** + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * @return The verb. + */ + java.lang.String getVerb(); + /** + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * @return The bytes for verb. + */ + com.google.protobuf.ByteString + getVerbBytes(); + + /** + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString + getStatusMessageBytes(); + + /** + *
+   * Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool cancellation_requested = 6; + * @return The cancellationRequested. + */ + boolean getCancellationRequested(); + + /** + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString + getApiVersionBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningServiceProto.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningServiceProto.java new file mode 100644 index 000000000000..f5117eb9a12c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningServiceProto.java @@ -0,0 +1,184 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public final class ProvisioningServiceProto { + private ProvisioningServiceProto() {} + 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_apigeeregistry_v1_CreateInstanceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apigeeregistry_v1_Instance_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apigeeregistry_v1_Instance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apigeeregistry_v1_Instance_Config_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apigeeregistry_v1_Instance_Config_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/apigeeregistry/v1/provisi" + + "oning_service.proto\022\036google.cloud.apigee" + + "registry.v1\032\034google/api/annotations.prot" + + "o\032\027google/api/client.proto\032\037google/api/f" + + "ield_behavior.proto\032\031google/api/resource" + + ".proto\032#google/longrunning/operations.pr" + + "oto\032\037google/protobuf/timestamp.proto\"\255\001\n" + + "\025CreateInstanceRequest\0229\n\006parent\030\001 \001(\tB)" + + "\340A\002\372A#\n!locations.googleapis.com/Locatio" + + "n\022\030\n\013instance_id\030\002 \001(\tB\003\340A\002\022?\n\010instance\030" + + "\003 \001(\0132(.google.cloud.apigeeregistry.v1.I" + + "nstanceB\003\340A\002\"U\n\025DeleteInstanceRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n&apigeeregistry.goog" + + "leapis.com/Instance\"R\n\022GetInstanceReques" + + "t\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&apigeeregistry." + + "googleapis.com/Instance\"\335\001\n\021OperationMet" + + "adata\022/\n\013create_time\030\001 \001(\0132\032.google.prot" + + "obuf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022\016\n\006target\030\003 \001(\t\022\014\n\004" + + "verb\030\004 \001(\t\022\026\n\016status_message\030\005 \001(\t\022\036\n\026ca" + + "ncellation_requested\030\006 \001(\010\022\023\n\013api_versio" + + "n\030\007 \001(\t\"\302\004\n\010Instance\022\014\n\004name\030\001 \001(\t\0224\n\013cr" + + "eate_time\030\002 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\022B\n\005state\030\004 \001(\0162.." + + "google.cloud.apigeeregistry.v1.Instance." + + "StateB\003\340A\003\022\032\n\rstate_message\030\005 \001(\tB\003\340A\003\022D" + + "\n\006config\030\006 \001(\0132/.google.cloud.apigeeregi" + + "stry.v1.Instance.ConfigB\003\340A\002\032;\n\006Config\022\025" + + "\n\010location\030\001 \001(\tB\003\340A\003\022\032\n\rcmek_key_name\030\002" + + " \001(\tB\003\340A\002\"n\n\005State\022\025\n\021STATE_UNSPECIFIED\020" + + "\000\022\014\n\010INACTIVE\020\001\022\014\n\010CREATING\020\002\022\n\n\006ACTIVE\020" + + "\003\022\014\n\010UPDATING\020\004\022\014\n\010DELETING\020\005\022\n\n\006FAILED\020" + + "\006:i\352Af\n&apigeeregistry.googleapis.com/In" + + "stance\022.google.cloud.apige" + + "eregistry.v1.ApiDeployment.AnnotationsEn" + + "try\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:}\352Az\n+apigeeregis" + + "try.googleapis.com/ApiDeployment\022Kprojec" + + "ts/{project}/locations/{location}/apis/{" + + "api}/deployments/{deployment}\"\267\005\n\010Artifa" + + "ct\022\014\n\004name\030\001 \001(\t\0224\n\013create_time\030\002 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\0224\n\013update" + + "_time\030\003 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\022\021\n\tmime_type\030\004 \001(\t\022\027\n\nsize_bytes\030\005 " + + "\001(\005B\003\340A\003\022\021\n\004hash\030\006 \001(\tB\003\340A\003\022\025\n\010contents\030" + + "\007 \001(\014B\003\340A\004:\332\003\352A\326\003\n&apigeeregistry.google" + + "apis.com/Artifact\022\n\004name\030\001 \001(\tB0\340A\002\372A*\n(" + + "apigeeregistry.googleapis.com/ApiVersion" + + "\"\276\001\n\027CreateApiVersionRequest\022@\n\006parent\030\001" + + " \001(\tB0\340A\002\372A*\022(apigeeregistry.googleapis." + + "com/ApiVersion\022D\n\013api_version\030\002 \001(\0132*.go" + + "ogle.cloud.apigeeregistry.v1.ApiVersionB" + + "\003\340A\002\022\033\n\016api_version_id\030\003 \001(\tB\003\340A\002\"\247\001\n\027Up" + + "dateApiVersionRequest\022D\n\013api_version\030\001 \001" + + "(\0132*.google.cloud.apigeeregistry.v1.ApiV" + + "ersionB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.googl" + + "e.protobuf.FieldMask\022\025\n\rallow_missing\030\003 " + + "\001(\010\"h\n\027DeleteApiVersionRequest\022>\n\004name\030\001" + + " \001(\tB0\340A\002\372A*\n(apigeeregistry.googleapis." + + "com/ApiVersion\022\r\n\005force\030\002 \001(\010\"\213\001\n\023ListAp" + + "iSpecsRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\022%a" + + "pigeeregistry.googleapis.com/ApiSpec\022\021\n\t" + + "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006f" + + "ilter\030\004 \001(\t\"k\n\024ListApiSpecsResponse\022:\n\ta" + + "pi_specs\030\001 \003(\0132\'.google.cloud.apigeeregi" + + "stry.v1.ApiSpec\022\027\n\017next_page_token\030\002 \001(\t" + + "\"P\n\021GetApiSpecRequest\022;\n\004name\030\001 \001(\tB-\340A\002" + + "\372A\'\n%apigeeregistry.googleapis.com/ApiSp" + + "ec\"X\n\031GetApiSpecContentsRequest\022;\n\004name\030" + + "\001 \001(\tB-\340A\002\372A\'\n%apigeeregistry.googleapis" + + ".com/ApiSpec\"\257\001\n\024CreateApiSpecRequest\022=\n" + + "\006parent\030\001 \001(\tB-\340A\002\372A\'\022%apigeeregistry.go" + + "ogleapis.com/ApiSpec\022>\n\010api_spec\030\002 \001(\0132\'" + + ".google.cloud.apigeeregistry.v1.ApiSpecB" + + "\003\340A\002\022\030\n\013api_spec_id\030\003 \001(\tB\003\340A\002\"\236\001\n\024Updat" + + "eApiSpecRequest\022>\n\010api_spec\030\001 \001(\0132\'.goog" + + "le.cloud.apigeeregistry.v1.ApiSpecB\003\340A\002\022" + + "/\n\013update_mask\030\002 \001(\0132\032.google.protobuf.F" + + "ieldMask\022\025\n\rallow_missing\030\003 \001(\010\"b\n\024Delet" + + "eApiSpecRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%a" + + "pigeeregistry.googleapis.com/ApiSpec\022\r\n\005" + + "force\030\002 \001(\010\"j\n\031TagApiSpecRevisionRequest" + + "\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%apigeeregistry.g" + + "oogleapis.com/ApiSpec\022\020\n\003tag\030\002 \001(\tB\003\340A\002\"" + + "\201\001\n\033ListApiSpecRevisionsRequest\022;\n\004name\030" + + "\001 \001(\tB-\340A\002\372A\'\n%apigeeregistry.googleapis" + + ".com/ApiSpec\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" + + "token\030\003 \001(\t\"s\n\034ListApiSpecRevisionsRespo" + + "nse\022:\n\tapi_specs\030\001 \003(\0132\'.google.cloud.ap" + + "igeeregistry.v1.ApiSpec\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"o\n\026RollbackApiSpecRequest\022;\n\004na" + + "me\030\001 \001(\tB-\340A\002\372A\'\n%apigeeregistry.googlea" + + "pis.com/ApiSpec\022\030\n\013revision_id\030\002 \001(\tB\003\340A" + + "\002\"[\n\034DeleteApiSpecRevisionRequest\022;\n\004nam" + + "e\030\001 \001(\tB-\340A\002\372A\'\n%apigeeregistry.googleap" + + "is.com/ApiSpec\"\227\001\n\031ListApiDeploymentsReq" + + "uest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\022+apigeeregi" + + "stry.googleapis.com/ApiDeployment\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filt" + + "er\030\004 \001(\t\"}\n\032ListApiDeploymentsResponse\022F" + + "\n\017api_deployments\030\001 \003(\0132-.google.cloud.a" + + "pigeeregistry.v1.ApiDeployment\022\027\n\017next_p" + + "age_token\030\002 \001(\t\"\\\n\027GetApiDeploymentReque" + + "st\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apigeeregistry" + + ".googleapis.com/ApiDeployment\"\315\001\n\032Create" + + "ApiDeploymentRequest\022C\n\006parent\030\001 \001(\tB3\340A" + + "\002\372A-\022+apigeeregistry.googleapis.com/ApiD" + + "eployment\022J\n\016api_deployment\030\002 \001(\0132-.goog" + + "le.cloud.apigeeregistry.v1.ApiDeployment" + + "B\003\340A\002\022\036\n\021api_deployment_id\030\003 \001(\tB\003\340A\002\"\260\001" + + "\n\032UpdateApiDeploymentRequest\022J\n\016api_depl" + + "oyment\030\001 \001(\0132-.google.cloud.apigeeregist" + + "ry.v1.ApiDeploymentB\003\340A\002\022/\n\013update_mask\030" + + "\002 \001(\0132\032.google.protobuf.FieldMask\022\025\n\rall" + + "ow_missing\030\003 \001(\010\"n\n\032DeleteApiDeploymentR" + + "equest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apigeeregi" + + "stry.googleapis.com/ApiDeployment\022\r\n\005for" + + "ce\030\002 \001(\010\"v\n\037TagApiDeploymentRevisionRequ" + + "est\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apigeeregistr" + + "y.googleapis.com/ApiDeployment\022\020\n\003tag\030\002 " + + "\001(\tB\003\340A\002\"\215\001\n!ListApiDeploymentRevisionsR" + + "equest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apigeeregi" + + "stry.googleapis.com/ApiDeployment\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\205\001\n\"Lis" + + "tApiDeploymentRevisionsResponse\022F\n\017api_d" + + "eployments\030\001 \003(\0132-.google.cloud.apigeere" + + "gistry.v1.ApiDeployment\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"{\n\034RollbackApiDeploymentRequest" + + "\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apigeeregistry.g" + + "oogleapis.com/ApiDeployment\022\030\n\013revision_" + + "id\030\002 \001(\tB\003\340A\002\"g\n\"DeleteApiDeploymentRevi" + + "sionRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apige" + + "eregistry.googleapis.com/ApiDeployment\"\215" + + "\001\n\024ListArtifactsRequest\022>\n\006parent\030\001 \001(\tB" + + ".\340A\002\372A(\022&apigeeregistry.googleapis.com/A" + + "rtifact\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + + "\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"m\n\025ListArtifactsR" + + "esponse\022;\n\tartifacts\030\001 \003(\0132(.google.clou" + + "d.apigeeregistry.v1.Artifact\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\"R\n\022GetArtifactRequest\022<\n\004n" + + "ame\030\001 \001(\tB.\340A\002\372A(\n&apigeeregistry.google" + + "apis.com/Artifact\"Z\n\032GetArtifactContents" + + "Request\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&apigeereg" + + "istry.googleapis.com/Artifact\"\262\001\n\025Create" + + "ArtifactRequest\022>\n\006parent\030\001 \001(\tB.\340A\002\372A(\022" + + "&apigeeregistry.googleapis.com/Artifact\022" + + "?\n\010artifact\030\002 \001(\0132(.google.cloud.apigeer" + + "egistry.v1.ArtifactB\003\340A\002\022\030\n\013artifact_id\030" + + "\003 \001(\tB\003\340A\002\"Y\n\026ReplaceArtifactRequest\022?\n\010" + + "artifact\030\001 \001(\0132(.google.cloud.apigeeregi" + + "stry.v1.ArtifactB\003\340A\002\"U\n\025DeleteArtifactR" + + "equest\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&apigeeregi" + + "stry.googleapis.com/Artifact2\300E\n\010Registr" + + "y\022\250\001\n\010ListApis\022/.google.cloud.apigeeregi" + + "stry.v1.ListApisRequest\0320.google.cloud.a" + + "pigeeregistry.v1.ListApisResponse\"9\202\323\344\223\002" + + "*\022(/v1/{parent=projects/*/locations/*}/a" + + "pis\332A\006parent\022\225\001\n\006GetApi\022-.google.cloud.a" + + "pigeeregistry.v1.GetApiRequest\032#.google." + + "cloud.apigeeregistry.v1.Api\"7\202\323\344\223\002*\022(/v1" + + "/{name=projects/*/locations/*/apis/*}\332A\004" + + "name\022\255\001\n\tCreateApi\0220.google.cloud.apigee" + + "registry.v1.CreateApiRequest\032#.google.cl" + + "oud.apigeeregistry.v1.Api\"I\202\323\344\223\002/\"(/v1/{" + + "parent=projects/*/locations/*}/apis:\003api" + + "\332A\021parent,api,api_id\022\257\001\n\tUpdateApi\0220.goo" + + "gle.cloud.apigeeregistry.v1.UpdateApiReq" + + "uest\032#.google.cloud.apigeeregistry.v1.Ap" + + "i\"K\202\323\344\223\00232,/v1/{api.name=projects/*/loca" + + "tions/*/apis/*}:\003api\332A\017api,update_mask\022\216" + + "\001\n\tDeleteApi\0220.google.cloud.apigeeregist" + + "ry.v1.DeleteApiRequest\032\026.google.protobuf" + + ".Empty\"7\202\323\344\223\002**(/v1/{name=projects/*/loc" + + "ations/*/apis/*}\332A\004name\022\310\001\n\017ListApiVersi" + + "ons\0226.google.cloud.apigeeregistry.v1.Lis" + + "tApiVersionsRequest\0327.google.cloud.apige" + + "eregistry.v1.ListApiVersionsResponse\"D\202\323" + + "\344\223\0025\0223/v1/{parent=projects/*/locations/*" + + "/apis/*}/versions\332A\006parent\022\265\001\n\rGetApiVer" + + "sion\0224.google.cloud.apigeeregistry.v1.Ge" + + "tApiVersionRequest\032*.google.cloud.apigee" + + "registry.v1.ApiVersion\"B\202\323\344\223\0025\0223/v1/{nam" + + "e=projects/*/locations/*/apis/*/versions" + + "/*}\332A\004name\022\345\001\n\020CreateApiVersion\0227.google" + + ".cloud.apigeeregistry.v1.CreateApiVersio" + + "nRequest\032*.google.cloud.apigeeregistry.v" + + "1.ApiVersion\"l\202\323\344\223\002B\"3/v1/{parent=projec" + + "ts/*/locations/*/apis/*}/versions:\013api_v" + + "ersion\332A!parent,api_version,api_version_" + + "id\022\347\001\n\020UpdateApiVersion\0227.google.cloud.a" + + "pigeeregistry.v1.UpdateApiVersionRequest" + + "\032*.google.cloud.apigeeregistry.v1.ApiVer" + + "sion\"n\202\323\344\223\002N2?/v1/{api_version.name=proj" + + "ects/*/locations/*/apis/*/versions/*}:\013a" + + "pi_version\332A\027api_version,update_mask\022\247\001\n" + + "\020DeleteApiVersion\0227.google.cloud.apigeer" + + "egistry.v1.DeleteApiVersionRequest\032\026.goo" + + "gle.protobuf.Empty\"B\202\323\344\223\0025*3/v1/{name=pr" + + "ojects/*/locations/*/apis/*/versions/*}\332" + + "A\004name\022\307\001\n\014ListApiSpecs\0223.google.cloud.a" + + "pigeeregistry.v1.ListApiSpecsRequest\0324.g" + + "oogle.cloud.apigeeregistry.v1.ListApiSpe" + + "csResponse\"L\202\323\344\223\002=\022;/v1/{parent=projects" + + "/*/locations/*/apis/*/versions/*}/specs\332" + + "A\006parent\022\264\001\n\nGetApiSpec\0221.google.cloud.a" + + "pigeeregistry.v1.GetApiSpecRequest\032\'.goo" + + "gle.cloud.apigeeregistry.v1.ApiSpec\"J\202\323\344" + + "\223\002=\022;/v1/{name=projects/*/locations/*/ap" + + "is/*/versions/*/specs/*}\332A\004name\022\275\001\n\022GetA" + + "piSpecContents\0229.google.cloud.apigeeregi" + + "stry.v1.GetApiSpecContentsRequest\032\024.goog" + + "le.api.HttpBody\"V\202\323\344\223\002I\022G/v1/{name=proje" + + "cts/*/locations/*/apis/*/versions/*/spec" + + "s/*}:getContents\332A\004name\022\333\001\n\rCreateApiSpe" + + "c\0224.google.cloud.apigeeregistry.v1.Creat" + + "eApiSpecRequest\032\'.google.cloud.apigeereg" + + "istry.v1.ApiSpec\"k\202\323\344\223\002G\";/v1/{parent=pr" + + "ojects/*/locations/*/apis/*/versions/*}/" + + "specs:\010api_spec\332A\033parent,api_spec,api_sp" + + "ec_id\022\335\001\n\rUpdateApiSpec\0224.google.cloud.a" + + "pigeeregistry.v1.UpdateApiSpecRequest\032\'." + + "google.cloud.apigeeregistry.v1.ApiSpec\"m" + + "\202\323\344\223\002P2D/v1/{api_spec.name=projects/*/lo" + + "cations/*/apis/*/versions/*/specs/*}:\010ap" + + "i_spec\332A\024api_spec,update_mask\022\251\001\n\rDelete" + + "ApiSpec\0224.google.cloud.apigeeregistry.v1" + + ".DeleteApiSpecRequest\032\026.google.protobuf." + + "Empty\"J\202\323\344\223\002=*;/v1/{name=projects/*/loca" + + "tions/*/apis/*/versions/*/specs/*}\332A\004nam" + + "e\022\314\001\n\022TagApiSpecRevision\0229.google.cloud." + + "apigeeregistry.v1.TagApiSpecRevisionRequ" + + "est\032\'.google.cloud.apigeeregistry.v1.Api" + + "Spec\"R\202\323\344\223\002L\"G/v1/{name=projects/*/locat" + + "ions/*/apis/*/versions/*/specs/*}:tagRev" + + "ision:\001*\022\344\001\n\024ListApiSpecRevisions\022;.goog" + + "le.cloud.apigeeregistry.v1.ListApiSpecRe" + + "visionsRequest\032<.google.cloud.apigeeregi" + + "stry.v1.ListApiSpecRevisionsResponse\"Q\202\323" + + "\344\223\002K\022I/v1/{name=projects/*/locations/*/a" + + "pis/*/versions/*/specs/*}:listRevisions\022" + + "\303\001\n\017RollbackApiSpec\0226.google.cloud.apige" + + "eregistry.v1.RollbackApiSpecRequest\032\'.go" + + "ogle.cloud.apigeeregistry.v1.ApiSpec\"O\202\323" + + "\344\223\002I\"D/v1/{name=projects/*/locations/*/a" + + "pis/*/versions/*/specs/*}:rollback:\001*\022\331\001" + + "\n\025DeleteApiSpecRevision\022<.google.cloud.a" + + "pigeeregistry.v1.DeleteApiSpecRevisionRe" + + "quest\032\'.google.cloud.apigeeregistry.v1.A" + + "piSpec\"Y\202\323\344\223\002L*J/v1/{name=projects/*/loc" + + "ations/*/apis/*/versions/*/specs/*}:dele" + + "teRevision\332A\004name\022\324\001\n\022ListApiDeployments" + + "\0229.google.cloud.apigeeregistry.v1.ListAp" + + "iDeploymentsRequest\032:.google.cloud.apige" + + "eregistry.v1.ListApiDeploymentsResponse\"" + + "G\202\323\344\223\0028\0226/v1/{parent=projects/*/location" + + "s/*/apis/*}/deployments\332A\006parent\022\301\001\n\020Get" + + "ApiDeployment\0227.google.cloud.apigeeregis" + + "try.v1.GetApiDeploymentRequest\032-.google." + + "cloud.apigeeregistry.v1.ApiDeployment\"E\202" + + "\323\344\223\0028\0226/v1/{name=projects/*/locations/*/" + + "apis/*/deployments/*}\332A\004name\022\372\001\n\023CreateA" + + "piDeployment\022:.google.cloud.apigeeregist" + + "ry.v1.CreateApiDeploymentRequest\032-.googl" + + "e.cloud.apigeeregistry.v1.ApiDeployment\"" + + "x\202\323\344\223\002H\"6/v1/{parent=projects/*/location" + + "s/*/apis/*}/deployments:\016api_deployment\332" + + "A\'parent,api_deployment,api_deployment_i" + + "d\022\374\001\n\023UpdateApiDeployment\022:.google.cloud" + + ".apigeeregistry.v1.UpdateApiDeploymentRe" + + "quest\032-.google.cloud.apigeeregistry.v1.A" + + "piDeployment\"z\202\323\344\223\002W2E/v1/{api_deploymen" + + "t.name=projects/*/locations/*/apis/*/dep" + + "loyments/*}:\016api_deployment\332A\032api_deploy" + + "ment,update_mask\022\260\001\n\023DeleteApiDeployment" + + "\022:.google.cloud.apigeeregistry.v1.Delete" + + "ApiDeploymentRequest\032\026.google.protobuf.E" + + "mpty\"E\202\323\344\223\0028*6/v1/{name=projects/*/locat" + + "ions/*/apis/*/deployments/*}\332A\004name\022\331\001\n\030" + + "TagApiDeploymentRevision\022?.google.cloud." + + "apigeeregistry.v1.TagApiDeploymentRevisi" + + "onRequest\032-.google.cloud.apigeeregistry." + + "v1.ApiDeployment\"M\202\323\344\223\002G\"B/v1/{name=proj" + + "ects/*/locations/*/apis/*/deployments/*}" + + ":tagRevision:\001*\022\361\001\n\032ListApiDeploymentRev" + + "isions\022A.google.cloud.apigeeregistry.v1." + + "ListApiDeploymentRevisionsRequest\032B.goog" + + "le.cloud.apigeeregistry.v1.ListApiDeploy" + + "mentRevisionsResponse\"L\202\323\344\223\002F\022D/v1/{name" + + "=projects/*/locations/*/apis/*/deploymen" + + "ts/*}:listRevisions\022\320\001\n\025RollbackApiDeplo" + + "yment\022<.google.cloud.apigeeregistry.v1.R" + + "ollbackApiDeploymentRequest\032-.google.clo" + + "ud.apigeeregistry.v1.ApiDeployment\"J\202\323\344\223" + + "\002D\"?/v1/{name=projects/*/locations/*/api" + + "s/*/deployments/*}:rollback:\001*\022\346\001\n\033Delet" + + "eApiDeploymentRevision\022B.google.cloud.ap" + + "igeeregistry.v1.DeleteApiDeploymentRevis" + + "ionRequest\032-.google.cloud.apigeeregistry" + + ".v1.ApiDeployment\"T\202\323\344\223\002G*E/v1/{name=pro" + + "jects/*/locations/*/apis/*/deployments/*" + + "}:deleteRevision\332A\004name\022\312\003\n\rListArtifact" + + "s\0224.google.cloud.apigeeregistry.v1.ListA" + + "rtifactsRequest\0325.google.cloud.apigeereg" + + "istry.v1.ListArtifactsResponse\"\313\002\202\323\344\223\002\273\002" + + "\022-/v1/{parent=projects/*/locations/*}/ar" + + "tifactsZ6\0224/v1/{parent=projects/*/locati" + + "ons/*/apis/*}/artifactsZA\022?/v1/{parent=p" + + "rojects/*/locations/*/apis/*/versions/*}" + + "/artifactsZI\022G/v1/{parent=projects/*/loc" + + "ations/*/apis/*/versions/*/specs/*}/arti" + + "factsZD\022B/v1/{parent=projects/*/location" + + "s/*/apis/*/deployments/*}/artifacts\332A\006pa" + + "rent\022\267\003\n\013GetArtifact\0222.google.cloud.apig" + + "eeregistry.v1.GetArtifactRequest\032(.googl" + + "e.cloud.apigeeregistry.v1.Artifact\"\311\002\202\323\344" + + "\223\002\273\002\022-/v1/{name=projects/*/locations/*/a" + + "rtifacts/*}Z6\0224/v1/{name=projects/*/loca" + + "tions/*/apis/*/artifacts/*}ZA\022?/v1/{name" + + "=projects/*/locations/*/apis/*/versions/" + + "*/artifacts/*}ZI\022G/v1/{name=projects/*/l" + + "ocations/*/apis/*/versions/*/specs/*/art" + + "ifacts/*}ZD\022B/v1/{name=projects/*/locati" + + "ons/*/apis/*/deployments/*/artifacts/*}\332" + + "A\004name\022\357\003\n\023GetArtifactContents\022:.google." + + "cloud.apigeeregistry.v1.GetArtifactConte" + + "ntsRequest\032\024.google.api.HttpBody\"\205\003\202\323\344\223\002" + + "\367\002\0229/v1/{name=projects/*/locations/*/art" + + "ifacts/*}:getContentsZB\022@/v1/{name=proje" + + "cts/*/locations/*/apis/*/artifacts/*}:ge" + + "tContentsZM\022K/v1/{name=projects/*/locati" + + "ons/*/apis/*/versions/*/artifacts/*}:get" + + "ContentsZU\022S/v1/{name=projects/*/locatio" + + "ns/*/apis/*/versions/*/specs/*/artifacts" + + "/*}:getContentsZP\022N/v1/{name=projects/*/" + + "locations/*/apis/*/deployments/*/artifac" + + "ts/*}:getContents\332A\004name\022\206\004\n\016CreateArtif" + + "act\0225.google.cloud.apigeeregistry.v1.Cre" + + "ateArtifactRequest\032(.google.cloud.apigee" + + "registry.v1.Artifact\"\222\003\202\323\344\223\002\355\002\"-/v1/{par" + + "ent=projects/*/locations/*}/artifacts:\010a" + + "rtifactZ@\"4/v1/{parent=projects/*/locati" + + "ons/*/apis/*}/artifacts:\010artifactZK\"?/v1" + + "/{parent=projects/*/locations/*/apis/*/v" + + "ersions/*}/artifacts:\010artifactZS\"G/v1/{p" + + "arent=projects/*/locations/*/apis/*/vers" + + "ions/*/specs/*}/artifacts:\010artifactZN\"B/" + + "v1/{parent=projects/*/locations/*/apis/*" + + "/deployments/*}/artifacts:\010artifact\332A\033pa" + + "rent,artifact,artifact_id\022\242\004\n\017ReplaceArt" + + "ifact\0226.google.cloud.apigeeregistry.v1.R" + + "eplaceArtifactRequest\032(.google.cloud.api" + + "geeregistry.v1.Artifact\"\254\003\202\323\344\223\002\232\003\0326/v1/{" + + "artifact.name=projects/*/locations/*/art" + + "ifacts/*}:\010artifactZI\032=/v1/{artifact.nam" + + "e=projects/*/locations/*/apis/*/artifact" + + "s/*}:\010artifactZT\032H/v1/{artifact.name=pro" + + "jects/*/locations/*/apis/*/versions/*/ar" + + "tifacts/*}:\010artifactZ\\\032P/v1/{artifact.na" + + "me=projects/*/locations/*/apis/*/version" + + "s/*/specs/*/artifacts/*}:\010artifactZW\032K/v" + + "1/{artifact.name=projects/*/locations/*/" + + "apis/*/deployments/*/artifacts/*}:\010artif" + + "act\332A\010artifact\022\253\003\n\016DeleteArtifact\0225.goog" + + "le.cloud.apigeeregistry.v1.DeleteArtifac" + + "tRequest\032\026.google.protobuf.Empty\"\311\002\202\323\344\223\002" + + "\273\002*-/v1/{name=projects/*/locations/*/art" + + "ifacts/*}Z6*4/v1/{name=projects/*/locati" + + "ons/*/apis/*/artifacts/*}ZA*?/v1/{name=p" + + "rojects/*/locations/*/apis/*/versions/*/" + + "artifacts/*}ZI*G/v1/{name=projects/*/loc" + + "ations/*/apis/*/versions/*/specs/*/artif" + + "acts/*}ZD*B/v1/{name=projects/*/location" + + "s/*/apis/*/deployments/*/artifacts/*}\332A\004" + + "name\032Q\312A\035apigeeregistry.googleapis.com\322A" + + ".https://www.googleapis.com/auth/cloud-p" + + "latformB\360\001\n\"com.google.cloud.apigeeregis" + + "try.v1B\024RegistryServiceProtoP\001ZLgoogle.g" + + "olang.org/genproto/googleapis/cloud/apig" + + "eeregistry/v1;apigeeregistry\252\002\036Google.Cl" + + "oud.ApigeeRegistry.V1\312\002\036Google\\Cloud\\Api" + + "geeRegistry\\V1\352\002!Google::Cloud::ApigeeRe" + + "gistry::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.HttpBodyProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.apigeeregistry.v1.RegistryModelsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", }); + internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_descriptor, + new java.lang.String[] { "Apis", "NextPageToken", }); + internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_descriptor, + new java.lang.String[] { "Parent", "Api", "ApiId", }); + internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_descriptor, + new java.lang.String[] { "Api", "UpdateMask", "AllowMissing", }); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_descriptor, + new java.lang.String[] { "Name", "Force", }); + internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", }); + internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_descriptor, + new java.lang.String[] { "ApiVersions", "NextPageToken", }); + internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_descriptor, + new java.lang.String[] { "Parent", "ApiVersion", "ApiVersionId", }); + internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_descriptor, + new java.lang.String[] { "ApiVersion", "UpdateMask", "AllowMissing", }); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_descriptor, + new java.lang.String[] { "Name", "Force", }); + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", }); + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_descriptor, + new java.lang.String[] { "ApiSpecs", "NextPageToken", }); + internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_descriptor, + new java.lang.String[] { "Parent", "ApiSpec", "ApiSpecId", }); + internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_descriptor, + new java.lang.String[] { "ApiSpec", "UpdateMask", "AllowMissing", }); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_descriptor, + new java.lang.String[] { "Name", "Force", }); + internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_descriptor, + new java.lang.String[] { "Name", "Tag", }); + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_descriptor, + new java.lang.String[] { "Name", "PageSize", "PageToken", }); + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_descriptor, + new java.lang.String[] { "ApiSpecs", "NextPageToken", }); + internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_descriptor, + new java.lang.String[] { "Name", "RevisionId", }); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", }); + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_descriptor, + new java.lang.String[] { "ApiDeployments", "NextPageToken", }); + internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_descriptor, + new java.lang.String[] { "Parent", "ApiDeployment", "ApiDeploymentId", }); + internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_descriptor, + new java.lang.String[] { "ApiDeployment", "UpdateMask", "AllowMissing", }); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_descriptor, + new java.lang.String[] { "Name", "Force", }); + internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_descriptor, + new java.lang.String[] { "Name", "Tag", }); + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_descriptor, + new java.lang.String[] { "Name", "PageSize", "PageToken", }); + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_descriptor, + new java.lang.String[] { "ApiDeployments", "NextPageToken", }); + internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_descriptor, + new java.lang.String[] { "Name", "RevisionId", }); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", }); + internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_descriptor, + new java.lang.String[] { "Artifacts", "NextPageToken", }); + internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_descriptor, + new java.lang.String[] { "Parent", "Artifact", "ArtifactId", }); + internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_descriptor, + new java.lang.String[] { "Artifact", }); + internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_descriptor, + new java.lang.String[] { "Name", }); + 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.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.HttpBodyProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.apigeeregistry.v1.RegistryModelsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequest.java new file mode 100644 index 000000000000..a23347f99215 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequest.java @@ -0,0 +1,689 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for ReplaceArtifact.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ReplaceArtifactRequest} + */ +public final class ReplaceArtifactRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) + ReplaceArtifactRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReplaceArtifactRequest.newBuilder() to construct. + private ReplaceArtifactRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReplaceArtifactRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReplaceArtifactRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReplaceArtifactRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.apigeeregistry.v1.Artifact.Builder subBuilder = null; + if (artifact_ != null) { + subBuilder = artifact_.toBuilder(); + } + artifact_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Artifact.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(artifact_); + artifact_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.class, com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.Builder.class); + } + + public static final int ARTIFACT_FIELD_NUMBER = 1; + private com.google.cloud.apigeeregistry.v1.Artifact artifact_; + /** + *
+   * Required. The artifact to replace.
+   * The `name` field is used to identify the artifact to replace.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the artifact field is set. + */ + @java.lang.Override + public boolean hasArtifact() { + return artifact_ != null; + } + /** + *
+   * Required. The artifact to replace.
+   * The `name` field is used to identify the artifact to replace.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The artifact. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Artifact getArtifact() { + return artifact_ == null ? com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; + } + /** + *
+   * Required. The artifact to replace.
+   * The `name` field is used to identify the artifact to replace.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder() { + return getArtifact(); + } + + 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 (artifact_ != null) { + output.writeMessage(1, getArtifact()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (artifact_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getArtifact()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest other = (com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) obj; + + if (hasArtifact() != other.hasArtifact()) return false; + if (hasArtifact()) { + if (!getArtifact() + .equals(other.getArtifact())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasArtifact()) { + hash = (37 * hash) + ARTIFACT_FIELD_NUMBER; + hash = (53 * hash) + getArtifact().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest 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.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest 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.apigeeregistry.v1.ReplaceArtifactRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ReplaceArtifact.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.ReplaceArtifactRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) + com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.class, com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (artifactBuilder_ == null) { + artifact_ = null; + } else { + artifact_ = null; + artifactBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest build() { + com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest result = new com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest(this); + if (artifactBuilder_ == null) { + result.artifact_ = artifact_; + } else { + result.artifact_ = artifactBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.getDefaultInstance()) return this; + if (other.hasArtifact()) { + mergeArtifact(other.getArtifact()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.apigeeregistry.v1.Artifact artifact_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> artifactBuilder_; + /** + *
+     * Required. The artifact to replace.
+     * The `name` field is used to identify the artifact to replace.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the artifact field is set. + */ + public boolean hasArtifact() { + return artifactBuilder_ != null || artifact_ != null; + } + /** + *
+     * Required. The artifact to replace.
+     * The `name` field is used to identify the artifact to replace.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The artifact. + */ + public com.google.cloud.apigeeregistry.v1.Artifact getArtifact() { + if (artifactBuilder_ == null) { + return artifact_ == null ? com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; + } else { + return artifactBuilder_.getMessage(); + } + } + /** + *
+     * Required. The artifact to replace.
+     * The `name` field is used to identify the artifact to replace.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setArtifact(com.google.cloud.apigeeregistry.v1.Artifact value) { + if (artifactBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + artifact_ = value; + onChanged(); + } else { + artifactBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The artifact to replace.
+     * The `name` field is used to identify the artifact to replace.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setArtifact( + com.google.cloud.apigeeregistry.v1.Artifact.Builder builderForValue) { + if (artifactBuilder_ == null) { + artifact_ = builderForValue.build(); + onChanged(); + } else { + artifactBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The artifact to replace.
+     * The `name` field is used to identify the artifact to replace.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeArtifact(com.google.cloud.apigeeregistry.v1.Artifact value) { + if (artifactBuilder_ == null) { + if (artifact_ != null) { + artifact_ = + com.google.cloud.apigeeregistry.v1.Artifact.newBuilder(artifact_).mergeFrom(value).buildPartial(); + } else { + artifact_ = value; + } + onChanged(); + } else { + artifactBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The artifact to replace.
+     * The `name` field is used to identify the artifact to replace.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearArtifact() { + if (artifactBuilder_ == null) { + artifact_ = null; + onChanged(); + } else { + artifact_ = null; + artifactBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The artifact to replace.
+     * The `name` field is used to identify the artifact to replace.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.Artifact.Builder getArtifactBuilder() { + + onChanged(); + return getArtifactFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The artifact to replace.
+     * The `name` field is used to identify the artifact to replace.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder() { + if (artifactBuilder_ != null) { + return artifactBuilder_.getMessageOrBuilder(); + } else { + return artifact_ == null ? + com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; + } + } + /** + *
+     * Required. The artifact to replace.
+     * The `name` field is used to identify the artifact to replace.
+     * Format: `{parent}/artifacts/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> + getArtifactFieldBuilder() { + if (artifactBuilder_ == null) { + artifactBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder>( + getArtifact(), + getParentForChildren(), + isClean()); + artifact_ = null; + } + return artifactBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) + private static final com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReplaceArtifactRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReplaceArtifactRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequestOrBuilder.java new file mode 100644 index 000000000000..bf7c70fa60b1 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequestOrBuilder.java @@ -0,0 +1,42 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface ReplaceArtifactRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The artifact to replace.
+   * The `name` field is used to identify the artifact to replace.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the artifact field is set. + */ + boolean hasArtifact(); + /** + *
+   * Required. The artifact to replace.
+   * The `name` field is used to identify the artifact to replace.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The artifact. + */ + com.google.cloud.apigeeregistry.v1.Artifact getArtifact(); + /** + *
+   * Required. The artifact to replace.
+   * The `name` field is used to identify the artifact to replace.
+   * Format: `{parent}/artifacts/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequest.java new file mode 100644 index 000000000000..efe37867d375 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequest.java @@ -0,0 +1,775 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for RollbackApiDeployment.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest} + */ +public final class RollbackApiDeploymentRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) + RollbackApiDeploymentRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RollbackApiDeploymentRequest.newBuilder() to construct. + private RollbackApiDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RollbackApiDeploymentRequest() { + name_ = ""; + revisionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RollbackApiDeploymentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RollbackApiDeploymentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + revisionId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The deployment being rolled back.
+   * 
+ * + * 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 deployment being rolled back.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object revisionId_; + /** + *
+   * Required. The revision ID to roll back to.
+   * It must be a revision of the same deployment.
+   *   Example: `c7cfa2a8`
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + 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(); + revisionId_ = s; + return s; + } + } + /** + *
+   * Required. The revision ID to roll back to.
+   * It must be a revision of the same deployment.
+   *   Example: `c7cfa2a8`
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revisionId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revisionId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest other = (com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRevisionId() + .equals(other.getRevisionId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest 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.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest 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.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for RollbackApiDeployment.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) + com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + revisionId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest build() { + com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest result = new com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest(this); + result.name_ = name_; + result.revisionId_ = revisionId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRevisionId().isEmpty()) { + revisionId_ = other.revisionId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The deployment being rolled back.
+     * 
+ * + * 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 deployment being rolled back.
+     * 
+ * + * 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 deployment being rolled back.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The deployment being rolled back.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The deployment being rolled back.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object revisionId_ = ""; + /** + *
+     * Required. The revision ID to roll back to.
+     * It must be a revision of the same deployment.
+     *   Example: `c7cfa2a8`
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The revision ID to roll back to.
+     * It must be a revision of the same deployment.
+     *   Example: `c7cfa2a8`
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The revision ID to roll back to.
+     * It must be a revision of the same deployment.
+     *   Example: `c7cfa2a8`
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + revisionId_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The revision ID to roll back to.
+     * It must be a revision of the same deployment.
+     *   Example: `c7cfa2a8`
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + + revisionId_ = getDefaultInstance().getRevisionId(); + onChanged(); + return this; + } + /** + *
+     * Required. The revision ID to roll back to.
+     * It must be a revision of the same deployment.
+     *   Example: `c7cfa2a8`
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + revisionId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) + private static final com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RollbackApiDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RollbackApiDeploymentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequestOrBuilder.java new file mode 100644 index 000000000000..a5f0850588e1 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequestOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface RollbackApiDeploymentRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The deployment being rolled back.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The deployment being rolled back.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The revision ID to roll back to.
+   * It must be a revision of the same deployment.
+   *   Example: `c7cfa2a8`
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + *
+   * Required. The revision ID to roll back to.
+   * It must be a revision of the same deployment.
+   *   Example: `c7cfa2a8`
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString + getRevisionIdBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequest.java new file mode 100644 index 000000000000..2300d903b9d5 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequest.java @@ -0,0 +1,775 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for RollbackApiSpec.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.RollbackApiSpecRequest} + */ +public final class RollbackApiSpecRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) + RollbackApiSpecRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RollbackApiSpecRequest.newBuilder() to construct. + private RollbackApiSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RollbackApiSpecRequest() { + name_ = ""; + revisionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RollbackApiSpecRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RollbackApiSpecRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + revisionId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The spec being rolled back.
+   * 
+ * + * 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 spec being rolled back.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object revisionId_; + /** + *
+   * Required. The revision ID to roll back to.
+   * It must be a revision of the same spec.
+   *   Example: `c7cfa2a8`
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + 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(); + revisionId_ = s; + return s; + } + } + /** + *
+   * Required. The revision ID to roll back to.
+   * It must be a revision of the same spec.
+   *   Example: `c7cfa2a8`
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revisionId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revisionId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest other = (com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRevisionId() + .equals(other.getRevisionId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest 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.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest 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.apigeeregistry.v1.RollbackApiSpecRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for RollbackApiSpec.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.RollbackApiSpecRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) + com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + revisionId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest build() { + com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest result = new com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest(this); + result.name_ = name_; + result.revisionId_ = revisionId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRevisionId().isEmpty()) { + revisionId_ = other.revisionId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The spec being rolled back.
+     * 
+ * + * 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 spec being rolled back.
+     * 
+ * + * 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 spec being rolled back.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The spec being rolled back.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The spec being rolled back.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object revisionId_ = ""; + /** + *
+     * Required. The revision ID to roll back to.
+     * It must be a revision of the same spec.
+     *   Example: `c7cfa2a8`
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The revision ID to roll back to.
+     * It must be a revision of the same spec.
+     *   Example: `c7cfa2a8`
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The revision ID to roll back to.
+     * It must be a revision of the same spec.
+     *   Example: `c7cfa2a8`
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + revisionId_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The revision ID to roll back to.
+     * It must be a revision of the same spec.
+     *   Example: `c7cfa2a8`
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + + revisionId_ = getDefaultInstance().getRevisionId(); + onChanged(); + return this; + } + /** + *
+     * Required. The revision ID to roll back to.
+     * It must be a revision of the same spec.
+     *   Example: `c7cfa2a8`
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + revisionId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) + private static final com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RollbackApiSpecRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RollbackApiSpecRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequestOrBuilder.java new file mode 100644 index 000000000000..eb92cc220edb --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequestOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface RollbackApiSpecRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The spec being rolled back.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The spec being rolled back.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The revision ID to roll back to.
+   * It must be a revision of the same spec.
+   *   Example: `c7cfa2a8`
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + *
+   * Required. The revision ID to roll back to.
+   * It must be a revision of the same spec.
+   *   Example: `c7cfa2a8`
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString + getRevisionIdBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequest.java new file mode 100644 index 000000000000..e4425d52902b --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequest.java @@ -0,0 +1,768 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for TagApiDeploymentRevision.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest} + */ +public final class TagApiDeploymentRevisionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) + TagApiDeploymentRevisionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use TagApiDeploymentRevisionRequest.newBuilder() to construct. + private TagApiDeploymentRevisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TagApiDeploymentRevisionRequest() { + name_ = ""; + tag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TagApiDeploymentRevisionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TagApiDeploymentRevisionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + tag_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.class, com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the deployment to be tagged, including the revision ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the deployment to be tagged, including the revision 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; + } + } + + public static final int TAG_FIELD_NUMBER = 2; + private volatile java.lang.Object tag_; + /** + *
+   * Required. The tag to apply.
+   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tag. + */ + @java.lang.Override + public java.lang.String getTag() { + java.lang.Object ref = tag_; + 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(); + tag_ = s; + return s; + } + } + /** + *
+   * Required. The tag to apply.
+   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tag_ = 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest other = (com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getTag() + .equals(other.getTag())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest 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.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest 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.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for TagApiDeploymentRevision.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) + com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.class, com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + tag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest build() { + com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest result = new com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest(this); + result.name_ = name_; + result.tag_ = tag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getTag().isEmpty()) { + tag_ = other.tag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the deployment to be tagged, including the revision ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the deployment to be tagged, including the revision ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the deployment to be tagged, including the revision ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the deployment to be tagged, including the revision ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the deployment to be tagged, including the revision ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object tag_ = ""; + /** + *
+     * Required. The tag to apply.
+     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tag. + */ + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The tag to apply.
+     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tag. + */ + public com.google.protobuf.ByteString + getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The tag to apply.
+     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The tag to set. + * @return This builder for chaining. + */ + public Builder setTag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tag_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The tag to apply.
+     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearTag() { + + tag_ = getDefaultInstance().getTag(); + onChanged(); + return this; + } + /** + *
+     * Required. The tag to apply.
+     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for tag to set. + * @return This builder for chaining. + */ + public Builder setTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tag_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) + private static final com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TagApiDeploymentRevisionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TagApiDeploymentRevisionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequestOrBuilder.java new file mode 100644 index 000000000000..639ec269f3a7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequestOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface TagApiDeploymentRevisionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the deployment to be tagged, including the revision ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the deployment to be tagged, including the revision ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The tag to apply.
+   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tag. + */ + java.lang.String getTag(); + /** + *
+   * Required. The tag to apply.
+   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tag. + */ + com.google.protobuf.ByteString + getTagBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequest.java new file mode 100644 index 000000000000..ef9b4a9c17e4 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequest.java @@ -0,0 +1,768 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for TagApiSpecRevision.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest} + */ +public final class TagApiSpecRevisionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) + TagApiSpecRevisionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use TagApiSpecRevisionRequest.newBuilder() to construct. + private TagApiSpecRevisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TagApiSpecRevisionRequest() { + name_ = ""; + tag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TagApiSpecRevisionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TagApiSpecRevisionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + tag_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.class, com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the spec to be tagged, including the revision ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the spec to be tagged, including the revision 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; + } + } + + public static final int TAG_FIELD_NUMBER = 2; + private volatile java.lang.Object tag_; + /** + *
+   * Required. The tag to apply.
+   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tag. + */ + @java.lang.Override + public java.lang.String getTag() { + java.lang.Object ref = tag_; + 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(); + tag_ = s; + return s; + } + } + /** + *
+   * Required. The tag to apply.
+   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tag_ = 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest other = (com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getTag() + .equals(other.getTag())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest 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.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest 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.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for TagApiSpecRevision.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) + com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.class, com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + tag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest build() { + com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest result = new com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest(this); + result.name_ = name_; + result.tag_ = tag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getTag().isEmpty()) { + tag_ = other.tag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the spec to be tagged, including the revision ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the spec to be tagged, including the revision ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the spec to be tagged, including the revision ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec to be tagged, including the revision ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the spec to be tagged, including the revision ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object tag_ = ""; + /** + *
+     * Required. The tag to apply.
+     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tag. + */ + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The tag to apply.
+     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tag. + */ + public com.google.protobuf.ByteString + getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The tag to apply.
+     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The tag to set. + * @return This builder for chaining. + */ + public Builder setTag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tag_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The tag to apply.
+     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearTag() { + + tag_ = getDefaultInstance().getTag(); + onChanged(); + return this; + } + /** + *
+     * Required. The tag to apply.
+     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for tag to set. + * @return This builder for chaining. + */ + public Builder setTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tag_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) + private static final com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TagApiSpecRevisionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TagApiSpecRevisionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequestOrBuilder.java new file mode 100644 index 000000000000..70227dbf3d49 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequestOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface TagApiSpecRevisionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the spec to be tagged, including the revision ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the spec to be tagged, including the revision ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The tag to apply.
+   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tag. + */ + java.lang.String getTag(); + /** + *
+   * Required. The tag to apply.
+   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tag. + */ + com.google.protobuf.ByteString + getTagBytes(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequest.java new file mode 100644 index 000000000000..531de8cad8b3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequest.java @@ -0,0 +1,1046 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for UpdateApiDeployment.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest} + */ +public final class UpdateApiDeploymentRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) + UpdateApiDeploymentRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateApiDeploymentRequest.newBuilder() to construct. + private UpdateApiDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateApiDeploymentRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateApiDeploymentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateApiDeploymentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder subBuilder = null; + if (apiDeployment_ != null) { + subBuilder = apiDeployment_.toBuilder(); + } + apiDeployment_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiDeployment.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(apiDeployment_); + apiDeployment_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + + allowMissing_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.Builder.class); + } + + public static final int API_DEPLOYMENT_FIELD_NUMBER = 1; + private com.google.cloud.apigeeregistry.v1.ApiDeployment apiDeployment_; + /** + *
+   * Required. The deployment to update.
+   * The `name` field is used to identify the deployment to update.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiDeployment field is set. + */ + @java.lang.Override + public boolean hasApiDeployment() { + return apiDeployment_ != null; + } + /** + *
+   * Required. The deployment to update.
+   * The `name` field is used to identify the deployment to update.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiDeployment. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment() { + return apiDeployment_ == null ? com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; + } + /** + *
+   * Required. The deployment to update.
+   * The `name` field is used to identify the deployment to update.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder() { + return getApiDeployment(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_; + /** + *
+   * If set to true, and the deployment is not found, a new deployment will be
+   * created. In this situation, `update_mask` is ignored.
+   * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + 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 (apiDeployment_ != null) { + output.writeMessage(1, getApiDeployment()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (apiDeployment_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getApiDeployment()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, allowMissing_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest other = (com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) obj; + + if (hasApiDeployment() != other.hasApiDeployment()) return false; + if (hasApiDeployment()) { + if (!getApiDeployment() + .equals(other.getApiDeployment())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (getAllowMissing() + != other.getAllowMissing()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasApiDeployment()) { + hash = (37 * hash) + API_DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getApiDeployment().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowMissing()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest 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.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest 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.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for UpdateApiDeployment.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) + com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (apiDeploymentBuilder_ == null) { + apiDeployment_ = null; + } else { + apiDeployment_ = null; + apiDeploymentBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + allowMissing_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest build() { + com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest result = new com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest(this); + if (apiDeploymentBuilder_ == null) { + result.apiDeployment_ = apiDeployment_; + } else { + result.apiDeployment_ = apiDeploymentBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + result.allowMissing_ = allowMissing_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.getDefaultInstance()) return this; + if (other.hasApiDeployment()) { + mergeApiDeployment(other.getApiDeployment()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.apigeeregistry.v1.ApiDeployment apiDeployment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> apiDeploymentBuilder_; + /** + *
+     * Required. The deployment to update.
+     * The `name` field is used to identify the deployment to update.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiDeployment field is set. + */ + public boolean hasApiDeployment() { + return apiDeploymentBuilder_ != null || apiDeployment_ != null; + } + /** + *
+     * Required. The deployment to update.
+     * The `name` field is used to identify the deployment to update.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiDeployment. + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment() { + if (apiDeploymentBuilder_ == null) { + return apiDeployment_ == null ? com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; + } else { + return apiDeploymentBuilder_.getMessage(); + } + } + /** + *
+     * Required. The deployment to update.
+     * The `name` field is used to identify the deployment to update.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiDeployment(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { + if (apiDeploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiDeployment_ = value; + onChanged(); + } else { + apiDeploymentBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The deployment to update.
+     * The `name` field is used to identify the deployment to update.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiDeployment( + com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { + if (apiDeploymentBuilder_ == null) { + apiDeployment_ = builderForValue.build(); + onChanged(); + } else { + apiDeploymentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The deployment to update.
+     * The `name` field is used to identify the deployment to update.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeApiDeployment(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { + if (apiDeploymentBuilder_ == null) { + if (apiDeployment_ != null) { + apiDeployment_ = + com.google.cloud.apigeeregistry.v1.ApiDeployment.newBuilder(apiDeployment_).mergeFrom(value).buildPartial(); + } else { + apiDeployment_ = value; + } + onChanged(); + } else { + apiDeploymentBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The deployment to update.
+     * The `name` field is used to identify the deployment to update.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearApiDeployment() { + if (apiDeploymentBuilder_ == null) { + apiDeployment_ = null; + onChanged(); + } else { + apiDeployment_ = null; + apiDeploymentBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The deployment to update.
+     * The `name` field is used to identify the deployment to update.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder getApiDeploymentBuilder() { + + onChanged(); + return getApiDeploymentFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The deployment to update.
+     * The `name` field is used to identify the deployment to update.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder() { + if (apiDeploymentBuilder_ != null) { + return apiDeploymentBuilder_.getMessageOrBuilder(); + } else { + return apiDeployment_ == null ? + com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; + } + } + /** + *
+     * Required. The deployment to update.
+     * The `name` field is used to identify the deployment to update.
+     * Format: `projects/*/locations/*/apis/*/deployments/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> + getApiDeploymentFieldBuilder() { + if (apiDeploymentBuilder_ == null) { + apiDeploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder>( + getApiDeployment(), + getParentForChildren(), + isClean()); + apiDeployment_ = null; + } + return apiDeploymentBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @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(); + } + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private boolean allowMissing_ ; + /** + *
+     * If set to true, and the deployment is not found, a new deployment will be
+     * created. In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + *
+     * If set to true, and the deployment is not found, a new deployment will be
+     * created. In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + *
+     * If set to true, and the deployment is not found, a new deployment will be
+     * created. In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) + private static final com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateApiDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateApiDeploymentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequestOrBuilder.java new file mode 100644 index 000000000000..b1999f194b95 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequestOrBuilder.java @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface UpdateApiDeploymentRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The deployment to update.
+   * The `name` field is used to identify the deployment to update.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiDeployment field is set. + */ + boolean hasApiDeployment(); + /** + *
+   * Required. The deployment to update.
+   * The `name` field is used to identify the deployment to update.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiDeployment. + */ + com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment(); + /** + *
+   * Required. The deployment to update.
+   * The `name` field is used to identify the deployment to update.
+   * Format: `projects/*/locations/*/apis/*/deployments/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder(); + + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * If set to true, and the deployment is not found, a new deployment will be
+   * created. In this situation, `update_mask` is ignored.
+   * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequest.java new file mode 100644 index 000000000000..93956dcac044 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequest.java @@ -0,0 +1,1046 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for UpdateApi.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiRequest} + */ +public final class UpdateApiRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.UpdateApiRequest) + UpdateApiRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateApiRequest.newBuilder() to construct. + private UpdateApiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateApiRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateApiRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateApiRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.apigeeregistry.v1.Api.Builder subBuilder = null; + if (api_ != null) { + subBuilder = api_.toBuilder(); + } + api_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Api.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(api_); + api_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + + allowMissing_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.UpdateApiRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiRequest.Builder.class); + } + + public static final int API_FIELD_NUMBER = 1; + private com.google.cloud.apigeeregistry.v1.Api api_; + /** + *
+   * Required. The API to update.
+   * The `name` field is used to identify the API to update.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the api field is set. + */ + @java.lang.Override + public boolean hasApi() { + return api_ != null; + } + /** + *
+   * Required. The API to update.
+   * The `name` field is used to identify the API to update.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The api. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.Api getApi() { + return api_ == null ? com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; + } + /** + *
+   * Required. The API to update.
+   * The `name` field is used to identify the API to update.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder() { + return getApi(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_; + /** + *
+   * If set to true, and the API is not found, a new API will be created.
+   * In this situation, `update_mask` is ignored.
+   * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + 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 (api_ != null) { + output.writeMessage(1, getApi()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (api_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getApi()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, allowMissing_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.UpdateApiRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.UpdateApiRequest other = (com.google.cloud.apigeeregistry.v1.UpdateApiRequest) obj; + + if (hasApi() != other.hasApi()) return false; + if (hasApi()) { + if (!getApi() + .equals(other.getApi())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (getAllowMissing() + != other.getAllowMissing()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasApi()) { + hash = (37 * hash) + API_FIELD_NUMBER; + hash = (53 * hash) + getApi().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowMissing()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest 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.apigeeregistry.v1.UpdateApiRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest 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.apigeeregistry.v1.UpdateApiRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.UpdateApiRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for UpdateApi.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.UpdateApiRequest) + com.google.cloud.apigeeregistry.v1.UpdateApiRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.UpdateApiRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.UpdateApiRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (apiBuilder_ == null) { + api_ = null; + } else { + api_ = null; + apiBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + allowMissing_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.UpdateApiRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiRequest build() { + com.google.cloud.apigeeregistry.v1.UpdateApiRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.UpdateApiRequest result = new com.google.cloud.apigeeregistry.v1.UpdateApiRequest(this); + if (apiBuilder_ == null) { + result.api_ = api_; + } else { + result.api_ = apiBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + result.allowMissing_ = allowMissing_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.UpdateApiRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.UpdateApiRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.UpdateApiRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.UpdateApiRequest.getDefaultInstance()) return this; + if (other.hasApi()) { + mergeApi(other.getApi()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.UpdateApiRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.UpdateApiRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.apigeeregistry.v1.Api api_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> apiBuilder_; + /** + *
+     * Required. The API to update.
+     * The `name` field is used to identify the API to update.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the api field is set. + */ + public boolean hasApi() { + return apiBuilder_ != null || api_ != null; + } + /** + *
+     * Required. The API to update.
+     * The `name` field is used to identify the API to update.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The api. + */ + public com.google.cloud.apigeeregistry.v1.Api getApi() { + if (apiBuilder_ == null) { + return api_ == null ? com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; + } else { + return apiBuilder_.getMessage(); + } + } + /** + *
+     * Required. The API to update.
+     * The `name` field is used to identify the API to update.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApi(com.google.cloud.apigeeregistry.v1.Api value) { + if (apiBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + api_ = value; + onChanged(); + } else { + apiBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The API to update.
+     * The `name` field is used to identify the API to update.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApi( + com.google.cloud.apigeeregistry.v1.Api.Builder builderForValue) { + if (apiBuilder_ == null) { + api_ = builderForValue.build(); + onChanged(); + } else { + apiBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The API to update.
+     * The `name` field is used to identify the API to update.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeApi(com.google.cloud.apigeeregistry.v1.Api value) { + if (apiBuilder_ == null) { + if (api_ != null) { + api_ = + com.google.cloud.apigeeregistry.v1.Api.newBuilder(api_).mergeFrom(value).buildPartial(); + } else { + api_ = value; + } + onChanged(); + } else { + apiBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The API to update.
+     * The `name` field is used to identify the API to update.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearApi() { + if (apiBuilder_ == null) { + api_ = null; + onChanged(); + } else { + api_ = null; + apiBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The API to update.
+     * The `name` field is used to identify the API to update.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.Api.Builder getApiBuilder() { + + onChanged(); + return getApiFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The API to update.
+     * The `name` field is used to identify the API to update.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder() { + if (apiBuilder_ != null) { + return apiBuilder_.getMessageOrBuilder(); + } else { + return api_ == null ? + com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; + } + } + /** + *
+     * Required. The API to update.
+     * The `name` field is used to identify the API to update.
+     * Format: `projects/*/locations/*/apis/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> + getApiFieldBuilder() { + if (apiBuilder_ == null) { + apiBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder>( + getApi(), + getParentForChildren(), + isClean()); + api_ = null; + } + return apiBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @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(); + } + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private boolean allowMissing_ ; + /** + *
+     * If set to true, and the API is not found, a new API will be created.
+     * In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + *
+     * If set to true, and the API is not found, a new API will be created.
+     * In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + *
+     * If set to true, and the API is not found, a new API will be created.
+     * In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.UpdateApiRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.UpdateApiRequest) + private static final com.google.cloud.apigeeregistry.v1.UpdateApiRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.UpdateApiRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateApiRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateApiRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequestOrBuilder.java new file mode 100644 index 000000000000..9a5df215bf40 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequestOrBuilder.java @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface UpdateApiRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.UpdateApiRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The API to update.
+   * The `name` field is used to identify the API to update.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the api field is set. + */ + boolean hasApi(); + /** + *
+   * Required. The API to update.
+   * The `name` field is used to identify the API to update.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The api. + */ + com.google.cloud.apigeeregistry.v1.Api getApi(); + /** + *
+   * Required. The API to update.
+   * The `name` field is used to identify the API to update.
+   * Format: `projects/*/locations/*/apis/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder(); + + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * If set to true, and the API is not found, a new API will be created.
+   * In this situation, `update_mask` is ignored.
+   * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequest.java new file mode 100644 index 000000000000..cebba06da545 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequest.java @@ -0,0 +1,1046 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for UpdateApiSpec.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiSpecRequest} + */ +public final class UpdateApiSpecRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) + UpdateApiSpecRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateApiSpecRequest.newBuilder() to construct. + private UpdateApiSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateApiSpecRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateApiSpecRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateApiSpecRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.apigeeregistry.v1.ApiSpec.Builder subBuilder = null; + if (apiSpec_ != null) { + subBuilder = apiSpec_.toBuilder(); + } + apiSpec_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(apiSpec_); + apiSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + + allowMissing_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.Builder.class); + } + + public static final int API_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.apigeeregistry.v1.ApiSpec apiSpec_; + /** + *
+   * Required. The spec to update.
+   * The `name` field is used to identify the spec to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiSpec field is set. + */ + @java.lang.Override + public boolean hasApiSpec() { + return apiSpec_ != null; + } + /** + *
+   * Required. The spec to update.
+   * The `name` field is used to identify the spec to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiSpec. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec() { + return apiSpec_ == null ? com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; + } + /** + *
+   * Required. The spec to update.
+   * The `name` field is used to identify the spec to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder() { + return getApiSpec(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_; + /** + *
+   * If set to true, and the spec is not found, a new spec will be created.
+   * In this situation, `update_mask` is ignored.
+   * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + 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 (apiSpec_ != null) { + output.writeMessage(1, getApiSpec()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (apiSpec_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getApiSpec()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, allowMissing_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest other = (com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) obj; + + if (hasApiSpec() != other.hasApiSpec()) return false; + if (hasApiSpec()) { + if (!getApiSpec() + .equals(other.getApiSpec())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (getAllowMissing() + != other.getAllowMissing()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasApiSpec()) { + hash = (37 * hash) + API_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getApiSpec().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowMissing()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest 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.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest 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.apigeeregistry.v1.UpdateApiSpecRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for UpdateApiSpec.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiSpecRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) + com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (apiSpecBuilder_ == null) { + apiSpec_ = null; + } else { + apiSpec_ = null; + apiSpecBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + allowMissing_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest build() { + com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest result = new com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest(this); + if (apiSpecBuilder_ == null) { + result.apiSpec_ = apiSpec_; + } else { + result.apiSpec_ = apiSpecBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + result.allowMissing_ = allowMissing_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.getDefaultInstance()) return this; + if (other.hasApiSpec()) { + mergeApiSpec(other.getApiSpec()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.apigeeregistry.v1.ApiSpec apiSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> apiSpecBuilder_; + /** + *
+     * Required. The spec to update.
+     * The `name` field is used to identify the spec to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiSpec field is set. + */ + public boolean hasApiSpec() { + return apiSpecBuilder_ != null || apiSpec_ != null; + } + /** + *
+     * Required. The spec to update.
+     * The `name` field is used to identify the spec to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiSpec. + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec() { + if (apiSpecBuilder_ == null) { + return apiSpec_ == null ? com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; + } else { + return apiSpecBuilder_.getMessage(); + } + } + /** + *
+     * Required. The spec to update.
+     * The `name` field is used to identify the spec to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiSpec(com.google.cloud.apigeeregistry.v1.ApiSpec value) { + if (apiSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiSpec_ = value; + onChanged(); + } else { + apiSpecBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The spec to update.
+     * The `name` field is used to identify the spec to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiSpec( + com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { + if (apiSpecBuilder_ == null) { + apiSpec_ = builderForValue.build(); + onChanged(); + } else { + apiSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The spec to update.
+     * The `name` field is used to identify the spec to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeApiSpec(com.google.cloud.apigeeregistry.v1.ApiSpec value) { + if (apiSpecBuilder_ == null) { + if (apiSpec_ != null) { + apiSpec_ = + com.google.cloud.apigeeregistry.v1.ApiSpec.newBuilder(apiSpec_).mergeFrom(value).buildPartial(); + } else { + apiSpec_ = value; + } + onChanged(); + } else { + apiSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The spec to update.
+     * The `name` field is used to identify the spec to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearApiSpec() { + if (apiSpecBuilder_ == null) { + apiSpec_ = null; + onChanged(); + } else { + apiSpec_ = null; + apiSpecBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The spec to update.
+     * The `name` field is used to identify the spec to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder getApiSpecBuilder() { + + onChanged(); + return getApiSpecFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The spec to update.
+     * The `name` field is used to identify the spec to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder() { + if (apiSpecBuilder_ != null) { + return apiSpecBuilder_.getMessageOrBuilder(); + } else { + return apiSpec_ == null ? + com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; + } + } + /** + *
+     * Required. The spec to update.
+     * The `name` field is used to identify the spec to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> + getApiSpecFieldBuilder() { + if (apiSpecBuilder_ == null) { + apiSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder>( + getApiSpec(), + getParentForChildren(), + isClean()); + apiSpec_ = null; + } + return apiSpecBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @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(); + } + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private boolean allowMissing_ ; + /** + *
+     * If set to true, and the spec is not found, a new spec will be created.
+     * In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + *
+     * If set to true, and the spec is not found, a new spec will be created.
+     * In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + *
+     * If set to true, and the spec is not found, a new spec will be created.
+     * In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) + private static final com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateApiSpecRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateApiSpecRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequestOrBuilder.java new file mode 100644 index 000000000000..861f3f7a9945 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequestOrBuilder.java @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface UpdateApiSpecRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The spec to update.
+   * The `name` field is used to identify the spec to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiSpec field is set. + */ + boolean hasApiSpec(); + /** + *
+   * Required. The spec to update.
+   * The `name` field is used to identify the spec to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiSpec. + */ + com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec(); + /** + *
+   * Required. The spec to update.
+   * The `name` field is used to identify the spec to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder(); + + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * If set to true, and the spec is not found, a new spec will be created.
+   * In this situation, `update_mask` is ignored.
+   * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequest.java new file mode 100644 index 000000000000..3ce4158ca094 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequest.java @@ -0,0 +1,1046 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +/** + *
+ * Request message for UpdateApiVersion.
+ * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiVersionRequest} + */ +public final class UpdateApiVersionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) + UpdateApiVersionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateApiVersionRequest.newBuilder() to construct. + private UpdateApiVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateApiVersionRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateApiVersionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateApiVersionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.apigeeregistry.v1.ApiVersion.Builder subBuilder = null; + if (apiVersion_ != null) { + subBuilder = apiVersion_.toBuilder(); + } + apiVersion_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiVersion.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(apiVersion_); + apiVersion_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + + allowMissing_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.Builder.class); + } + + public static final int API_VERSION_FIELD_NUMBER = 1; + private com.google.cloud.apigeeregistry.v1.ApiVersion apiVersion_; + /** + *
+   * Required. The version to update.
+   * The `name` field is used to identify the version to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiVersion field is set. + */ + @java.lang.Override + public boolean hasApiVersion() { + return apiVersion_ != null; + } + /** + *
+   * Required. The version to update.
+   * The `name` field is used to identify the version to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiVersion. + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion() { + return apiVersion_ == null ? com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; + } + /** + *
+   * Required. The version to update.
+   * The `name` field is used to identify the version to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder() { + return getApiVersion(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_; + /** + *
+   * If set to true, and the version is not found, a new version will be
+   * created. In this situation, `update_mask` is ignored.
+   * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + 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 (apiVersion_ != null) { + output.writeMessage(1, getApiVersion()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (apiVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getApiVersion()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, allowMissing_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest other = (com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) obj; + + if (hasApiVersion() != other.hasApiVersion()) return false; + if (hasApiVersion()) { + if (!getApiVersion() + .equals(other.getApiVersion())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (getAllowMissing() + != other.getAllowMissing()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasApiVersion()) { + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowMissing()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest 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.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest 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.apigeeregistry.v1.UpdateApiVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for UpdateApiVersion.
+   * 
+ * + * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiVersionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) + com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (apiVersionBuilder_ == null) { + apiVersion_ = null; + } else { + apiVersion_ = null; + apiVersionBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + allowMissing_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest getDefaultInstanceForType() { + return com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest build() { + com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest buildPartial() { + com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest result = new com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest(this); + if (apiVersionBuilder_ == null) { + result.apiVersion_ = apiVersion_; + } else { + result.apiVersion_ = apiVersionBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + result.allowMissing_ = allowMissing_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) { + return mergeFrom((com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest other) { + if (other == com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.getDefaultInstance()) return this; + if (other.hasApiVersion()) { + mergeApiVersion(other.getApiVersion()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.apigeeregistry.v1.ApiVersion apiVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> apiVersionBuilder_; + /** + *
+     * Required. The version to update.
+     * The `name` field is used to identify the version to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiVersion field is set. + */ + public boolean hasApiVersion() { + return apiVersionBuilder_ != null || apiVersion_ != null; + } + /** + *
+     * Required. The version to update.
+     * The `name` field is used to identify the version to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiVersion. + */ + public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion() { + if (apiVersionBuilder_ == null) { + return apiVersion_ == null ? com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; + } else { + return apiVersionBuilder_.getMessage(); + } + } + /** + *
+     * Required. The version to update.
+     * The `name` field is used to identify the version to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiVersion(com.google.cloud.apigeeregistry.v1.ApiVersion value) { + if (apiVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + onChanged(); + } else { + apiVersionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The version to update.
+     * The `name` field is used to identify the version to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApiVersion( + com.google.cloud.apigeeregistry.v1.ApiVersion.Builder builderForValue) { + if (apiVersionBuilder_ == null) { + apiVersion_ = builderForValue.build(); + onChanged(); + } else { + apiVersionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The version to update.
+     * The `name` field is used to identify the version to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeApiVersion(com.google.cloud.apigeeregistry.v1.ApiVersion value) { + if (apiVersionBuilder_ == null) { + if (apiVersion_ != null) { + apiVersion_ = + com.google.cloud.apigeeregistry.v1.ApiVersion.newBuilder(apiVersion_).mergeFrom(value).buildPartial(); + } else { + apiVersion_ = value; + } + onChanged(); + } else { + apiVersionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The version to update.
+     * The `name` field is used to identify the version to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearApiVersion() { + if (apiVersionBuilder_ == null) { + apiVersion_ = null; + onChanged(); + } else { + apiVersion_ = null; + apiVersionBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The version to update.
+     * The `name` field is used to identify the version to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiVersion.Builder getApiVersionBuilder() { + + onChanged(); + return getApiVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The version to update.
+     * The `name` field is used to identify the version to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder() { + if (apiVersionBuilder_ != null) { + return apiVersionBuilder_.getMessageOrBuilder(); + } else { + return apiVersion_ == null ? + com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; + } + } + /** + *
+     * Required. The version to update.
+     * The `name` field is used to identify the version to update.
+     * Format: `projects/*/locations/*/apis/*/versions/*`
+     * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> + getApiVersionFieldBuilder() { + if (apiVersionBuilder_ == null) { + apiVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder>( + getApiVersion(), + getParentForChildren(), + isClean()); + apiVersion_ = null; + } + return apiVersionBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @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(); + } + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The list of fields to be updated. If omitted, all fields are updated that
+     * are set in the request message (fields set to default values are ignored).
+     * If an asterisk "*" is specified, all fields are updated, including fields
+     * that are unspecified/default in the request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private boolean allowMissing_ ; + /** + *
+     * If set to true, and the version is not found, a new version will be
+     * created. In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + *
+     * If set to true, and the version is not found, a new version will be
+     * created. In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + *
+     * If set to true, and the version is not found, a new version will be
+     * created. In this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) + private static final com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest(); + } + + public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateApiVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateApiVersionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequestOrBuilder.java new file mode 100644 index 000000000000..3c6d21a9379f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequestOrBuilder.java @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apigeeregistry/v1/registry_service.proto + +package com.google.cloud.apigeeregistry.v1; + +public interface UpdateApiVersionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The version to update.
+   * The `name` field is used to identify the version to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the apiVersion field is set. + */ + boolean hasApiVersion(); + /** + *
+   * Required. The version to update.
+   * The `name` field is used to identify the version to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The apiVersion. + */ + com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion(); + /** + *
+   * Required. The version to update.
+   * The `name` field is used to identify the version to update.
+   * Format: `projects/*/locations/*/apis/*/versions/*`
+   * 
+ * + * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder(); + + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The list of fields to be updated. If omitted, all fields are updated that
+   * are set in the request message (fields set to default values are ignored).
+   * If an asterisk "*" is specified, all fields are updated, including fields
+   * that are unspecified/default in the request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * If set to true, and the version is not found, a new version will be
+   * created. In this situation, `update_mask` is ignored.
+   * 
+ * + * bool allow_missing = 3; + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/provisioning_service.proto b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/provisioning_service.proto new file mode 100644 index 000000000000..9e7baee5866a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/provisioning_service.proto @@ -0,0 +1,205 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.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.apigeeregistry.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/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; +option java_multiple_files = true; +option java_outer_classname = "ProvisioningServiceProto"; +option java_package = "com.google.cloud.apigeeregistry.v1"; +option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1"; +option ruby_package = "Google::Cloud::ApigeeRegistry::V1"; + +// The service that is used for managing the data plane provisioning of the +// Registry. +service Provisioning { + option (google.api.default_host) = "apigeeregistry.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Provisions instance resources for the Registry. + rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/instances" + body: "instance" + }; + option (google.api.method_signature) = "parent,instance,instance_id"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Deletes the Registry instance. + rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single Instance. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for CreateInstance. +message CreateInstanceRequest { + // Required. Parent resource of the Instance, of the form: `projects/*/locations/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Identifier to assign to the Instance. Must be unique within scope of the + // parent resource. + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Instance. + Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteInstance. +message DeleteInstanceRequest { + // Required. The name of the Instance to delete. + // Format: `projects/*/locations/*/instances/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Instance" + } + ]; +} + +// Request message for GetInstance. +message GetInstanceRequest { + // Required. The name of the Instance to retrieve. + // Format: `projects/*/locations/*/instances/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Instance" + } + ]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Server-defined resource path for the target of the operation. + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_message = 5; + + // Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool cancellation_requested = 6; + + // API version used to start the operation. + string api_version = 7; +} + +// An Instance represents the instance resources of the Registry. +// Currently, only one instance is allowed for each project. +message Instance { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + }; + + // State of the Instance. + enum State { + // The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0; + + // The Instance has not been initialized or has been deleted. + INACTIVE = 1; + + // The Instance is being created. + CREATING = 2; + + // The Instance has been created and is ready for use. + ACTIVE = 3; + + // The Instance is being updated. + UPDATING = 4; + + // The Instance is being deleted. + DELETING = 5; + + // The Instance encountered an error during a state change. + FAILED = 6; + } + + // Available configurations to provision an Instance. + message Config { + // Output only. The GCP location where the Instance resides. + string location = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The Customer Managed Encryption Key (CMEK) used for data encryption. + // The CMEK name should follow the format of + // `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`, + // where the `location` must match InstanceConfig.location. + string cmek_key_name = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Format: `projects/*/locations/*/instance`. + // Currently only `locations/global` is supported. + string name = 1; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the Instance. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Extra information of Instance.State if the state is `FAILED`. + string state_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Config of the Instance. + Config config = 6 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_models.proto b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_models.proto new file mode 100644 index 000000000000..8411f9ecf7ff --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_models.proto @@ -0,0 +1,364 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.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.apigeeregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; +option java_multiple_files = true; +option java_outer_classname = "RegistryModelsProto"; +option java_package = "com.google.cloud.apigeeregistry.v1"; +option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1"; +option ruby_package = "Google::Cloud::ApigeeRegistry::V1"; + +// A top-level description of an API. +// Produced by producers and are commitments to provide services. +message Api { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/Api" + pattern: "projects/{project}/locations/{location}/apis/{api}" + }; + + // Resource name. + string name = 1; + + // Human-meaningful name. + string display_name = 2; + + // A detailed description. + string description = 3; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A user-definable description of the availability of this service. + // Format: free-form, but we expect single words that describe availability, + // e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN". + string availability = 6; + + // The recommended version of the API. + // Format: `apis/{api}/versions/{version}` + string recommended_version = 7 [(google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiVersion" + }]; + + // The recommended deployment of the API. + // Format: `apis/{api}/deployments/{deployment}` + string recommended_deployment = 8 [(google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + }]; + + // Labels attach identifying metadata to resources. Identifying metadata can + // be used to filter list operations. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores, and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one resource (System + // labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with + // `apigeeregistry.googleapis.com/` and cannot be changed. + map labels = 9; + + // Annotations attach non-identifying metadata to resources. + // + // Annotation keys and values are less restricted than those of labels, but + // should be generally used for small values of broad interest. Larger, topic- + // specific metadata should be stored in Artifacts. + map annotations = 10; +} + +// Describes a particular version of an API. +// ApiVersions are what consumers actually use. +message ApiVersion { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/ApiVersion" + pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}" + }; + + // Resource name. + string name = 1; + + // Human-meaningful name. + string display_name = 2; + + // A detailed description. + string description = 3; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A user-definable description of the lifecycle phase of this API version. + // Format: free-form, but we expect single words that describe API maturity, + // e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", + // "DEPRECATED", "RETIRED". + string state = 6; + + // Labels attach identifying metadata to resources. Identifying metadata can + // be used to filter list operations. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one resource (System + // labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with + // `apigeeregistry.googleapis.com/` and cannot be changed. + map labels = 7; + + // Annotations attach non-identifying metadata to resources. + // + // Annotation keys and values are less restricted than those of labels, but + // should be generally used for small values of broad interest. Larger, topic- + // specific metadata should be stored in Artifacts. + map annotations = 8; +} + +// Describes a version of an API in a structured way. +// ApiSpecs provide formal descriptions that consumers can use to use a version. +// ApiSpec resources are intended to be fully-resolved descriptions of an +// ApiVersion. When specs consist of multiple files, these should be bundled +// together (e.g., in a zip archive) and stored as a unit. Multiple specs can +// exist to provide representations in different API description formats. +// Synchronization of these representations would be provided by tooling and +// background services. +message ApiSpec { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}" + }; + + // Resource name. + string name = 1; + + // A possibly-hierarchical name used to refer to the spec from other specs. + string filename = 2; + + // A detailed description. + string description = 3; + + // Output only. Immutable. The revision ID of the spec. + // A new revision is committed whenever the spec contents are changed. + // The format is an 8-character hexadecimal string. + string revision_id = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. Creation timestamp; when the spec resource was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Revision creation timestamp; when the represented revision was created. + google.protobuf.Timestamp revision_create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp: when the represented revision was last modified. + google.protobuf.Timestamp revision_update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A style (format) descriptor for this spec that is specified as a Media Type + // (https://en.wikipedia.org/wiki/Media_type). Possible values include + // `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and + // `application/vnd.apigee.graphql`, with possible suffixes representing + // compression types. These hypothetical names are defined in the vendor tree + // defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. + // Content types can specify compression. Currently only GZip compression is + // supported (indicated with "+gzip"). + string mime_type = 8; + + // Output only. The size of the spec file in bytes. If the spec is gzipped, this is the + // size of the uncompressed spec. + int32 size_bytes = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is + // the hash of the uncompressed spec. + string hash = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The original source URI of the spec (if one exists). + // This is an external location that can be used for reference purposes + // but which may not be authoritative since this external resource may + // change after the spec is retrieved. + string source_uri = 11; + + // Input only. The contents of the spec. + // Provided by API callers when specs are created or updated. + // To access the contents of a spec, use GetApiSpecContents. + bytes contents = 12 [(google.api.field_behavior) = INPUT_ONLY]; + + // Labels attach identifying metadata to resources. Identifying metadata can + // be used to filter list operations. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one resource (System + // labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with + // `apigeeregistry.googleapis.com/` and cannot be changed. + map labels = 14; + + // Annotations attach non-identifying metadata to resources. + // + // Annotation keys and values are less restricted than those of labels, but + // should be generally used for small values of broad interest. Larger, topic- + // specific metadata should be stored in Artifacts. + map annotations = 15; +} + +// Describes a service running at particular address that +// provides a particular version of an API. ApiDeployments have revisions which +// correspond to different configurations of a single deployment in time. +// Revision identifiers should be updated whenever the served API spec or +// endpoint address changes. +message ApiDeployment { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + pattern: "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}" + }; + + // Resource name. + string name = 1; + + // Human-meaningful name. + string display_name = 2; + + // A detailed description. + string description = 3; + + // Output only. Immutable. The revision ID of the deployment. + // A new revision is committed whenever the deployment contents are changed. + // The format is an 8-character hexadecimal string. + string revision_id = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. Creation timestamp; when the deployment resource was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Revision creation timestamp; when the represented revision was created. + google.protobuf.Timestamp revision_create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp: when the represented revision was last modified. + google.protobuf.Timestamp revision_update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The full resource name (including revision ID) of the spec of the API being + // served by the deployment. Changes to this value will update the revision. + // Format: `apis/{api}/deployments/{deployment}` + string api_spec_revision = 8 [(google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + }]; + + // The address where the deployment is serving. Changes to this value will + // update the revision. + string endpoint_uri = 9; + + // The address of the external channel of the API (e.g., the Developer + // Portal). Changes to this value will not affect the revision. + string external_channel_uri = 10; + + // Text briefly identifying the intended audience of the API. Changes to this + // value will not affect the revision. + string intended_audience = 11; + + // Text briefly describing how to access the endpoint. Changes to this value + // will not affect the revision. + string access_guidance = 12; + + // Labels attach identifying metadata to resources. Identifying metadata can + // be used to filter list operations. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one resource (System + // labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with + // `apigeeregistry.googleapis.com/` and cannot be changed. + map labels = 14; + + // Annotations attach non-identifying metadata to resources. + // + // Annotation keys and values are less restricted than those of labels, but + // should be generally used for small values of broad interest. Larger, topic- + // specific metadata should be stored in Artifacts. + map annotations = 15; +} + +// Artifacts of resources. Artifacts are unique (single-value) per resource +// and are used to store metadata that is too large or numerous to be stored +// directly on the resource. Since artifacts are stored separately from parent +// resources, they should generally be used for metadata that is needed +// infrequently, i.e., not for display in primary views of the resource but +// perhaps displayed or downloaded upon request. The `ListArtifacts` method +// allows artifacts to be quickly enumerated and checked for presence without +// downloading their (potentially-large) contents. +message Artifact { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/Artifact" + pattern: "projects/{project}/locations/{location}/artifacts/{artifact}" + pattern: "projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}" + pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}" + pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}" + pattern: "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}" + }; + + // Resource name. + string name = 1; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A content type specifier for the artifact. + // Content type specifiers are Media Types + // (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" + // parameter that specifies a schema for the stored information. + // Content types can specify compression. Currently only GZip compression is + // supported (indicated with "+gzip"). + string mime_type = 4; + + // Output only. The size of the artifact in bytes. If the artifact is gzipped, this is + // the size of the uncompressed artifact. + int32 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, + // this is the hash of the uncompressed artifact. + string hash = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Input only. The contents of the artifact. + // Provided by API callers when artifacts are created or replaced. + // To access the contents of an artifact, use GetArtifactContents. + bytes contents = 7 [(google.api.field_behavior) = INPUT_ONLY]; +} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_service.proto b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_service.proto new file mode 100644 index 000000000000..1eec64e8b8f2 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_service.proto @@ -0,0 +1,1133 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.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.apigeeregistry.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/httpbody.proto"; +import "google/api/resource.proto"; +import "google/cloud/apigeeregistry/v1/registry_models.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; +option java_multiple_files = true; +option java_outer_classname = "RegistryServiceProto"; +option java_package = "com.google.cloud.apigeeregistry.v1"; +option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1"; +option ruby_package = "Google::Cloud::ApigeeRegistry::V1"; + +// The Registry service allows teams to manage descriptions of APIs. +service Registry { + option (google.api.default_host) = "apigeeregistry.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Returns matching APIs. + rpc ListApis(ListApisRequest) returns (ListApisResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/apis" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns a specified API. + rpc GetApi(GetApiRequest) returns (Api) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a specified API. + rpc CreateApi(CreateApiRequest) returns (Api) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/apis" + body: "api" + }; + option (google.api.method_signature) = "parent,api,api_id"; + } + + // Used to modify a specified API. + rpc UpdateApi(UpdateApiRequest) returns (Api) { + option (google.api.http) = { + patch: "/v1/{api.name=projects/*/locations/*/apis/*}" + body: "api" + }; + option (google.api.method_signature) = "api,update_mask"; + } + + // Removes a specified API and all of the resources that it + // owns. + rpc DeleteApi(DeleteApiRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns matching versions. + rpc ListApiVersions(ListApiVersionsRequest) returns (ListApiVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/apis/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns a specified version. + rpc GetApiVersion(GetApiVersionRequest) returns (ApiVersion) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a specified version. + rpc CreateApiVersion(CreateApiVersionRequest) returns (ApiVersion) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/apis/*}/versions" + body: "api_version" + }; + option (google.api.method_signature) = "parent,api_version,api_version_id"; + } + + // Used to modify a specified version. + rpc UpdateApiVersion(UpdateApiVersionRequest) returns (ApiVersion) { + option (google.api.http) = { + patch: "/v1/{api_version.name=projects/*/locations/*/apis/*/versions/*}" + body: "api_version" + }; + option (google.api.method_signature) = "api_version,update_mask"; + } + + // Removes a specified version and all of the resources that + // it owns. + rpc DeleteApiVersion(DeleteApiVersionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns matching specs. + rpc ListApiSpecs(ListApiSpecsRequest) returns (ListApiSpecsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns a specified spec. + rpc GetApiSpec(GetApiSpecRequest) returns (ApiSpec) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns the contents of a specified spec. + // If specs are stored with GZip compression, the default behavior + // is to return the spec uncompressed (the mime_type response field + // indicates the exact format returned). + rpc GetApiSpecContents(GetApiSpecContentsRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:getContents" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a specified spec. + rpc CreateApiSpec(CreateApiSpecRequest) returns (ApiSpec) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs" + body: "api_spec" + }; + option (google.api.method_signature) = "parent,api_spec,api_spec_id"; + } + + // Used to modify a specified spec. + rpc UpdateApiSpec(UpdateApiSpecRequest) returns (ApiSpec) { + option (google.api.http) = { + patch: "/v1/{api_spec.name=projects/*/locations/*/apis/*/versions/*/specs/*}" + body: "api_spec" + }; + option (google.api.method_signature) = "api_spec,update_mask"; + } + + // Removes a specified spec, all revisions, and all child + // resources (e.g., artifacts). + rpc DeleteApiSpec(DeleteApiSpecRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Adds a tag to a specified revision of a spec. + rpc TagApiSpecRevision(TagApiSpecRevisionRequest) returns (ApiSpec) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision" + body: "*" + }; + } + + // Lists all revisions of a spec. + // Revisions are returned in descending order of revision creation time. + rpc ListApiSpecRevisions(ListApiSpecRevisionsRequest) returns (ListApiSpecRevisionsResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:listRevisions" + }; + } + + // Sets the current revision to a specified prior revision. + // Note that this creates a new revision with a new revision ID. + rpc RollbackApiSpec(RollbackApiSpecRequest) returns (ApiSpec) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:rollback" + body: "*" + }; + } + + // Deletes a revision of a spec. + rpc DeleteApiSpecRevision(DeleteApiSpecRevisionRequest) returns (ApiSpec) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision" + }; + option (google.api.method_signature) = "name"; + } + + // Returns matching deployments. + rpc ListApiDeployments(ListApiDeploymentsRequest) returns (ListApiDeploymentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/apis/*}/deployments" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns a specified deployment. + rpc GetApiDeployment(GetApiDeploymentRequest) returns (ApiDeployment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a specified deployment. + rpc CreateApiDeployment(CreateApiDeploymentRequest) returns (ApiDeployment) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/apis/*}/deployments" + body: "api_deployment" + }; + option (google.api.method_signature) = "parent,api_deployment,api_deployment_id"; + } + + // Used to modify a specified deployment. + rpc UpdateApiDeployment(UpdateApiDeploymentRequest) returns (ApiDeployment) { + option (google.api.http) = { + patch: "/v1/{api_deployment.name=projects/*/locations/*/apis/*/deployments/*}" + body: "api_deployment" + }; + option (google.api.method_signature) = "api_deployment,update_mask"; + } + + // Removes a specified deployment, all revisions, and all + // child resources (e.g., artifacts). + rpc DeleteApiDeployment(DeleteApiDeploymentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Adds a tag to a specified revision of a + // deployment. + rpc TagApiDeploymentRevision(TagApiDeploymentRevisionRequest) returns (ApiDeployment) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:tagRevision" + body: "*" + }; + } + + // Lists all revisions of a deployment. + // Revisions are returned in descending order of revision creation time. + rpc ListApiDeploymentRevisions(ListApiDeploymentRevisionsRequest) returns (ListApiDeploymentRevisionsResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:listRevisions" + }; + } + + // Sets the current revision to a specified prior + // revision. Note that this creates a new revision with a new revision ID. + rpc RollbackApiDeployment(RollbackApiDeploymentRequest) returns (ApiDeployment) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:rollback" + body: "*" + }; + } + + // Deletes a revision of a deployment. + rpc DeleteApiDeploymentRevision(DeleteApiDeploymentRevisionRequest) returns (ApiDeployment) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision" + }; + option (google.api.method_signature) = "name"; + } + + // Returns matching artifacts. + rpc ListArtifacts(ListArtifactsRequest) returns (ListArtifactsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/artifacts" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/apis/*}/artifacts" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Returns a specified artifact. + rpc GetArtifact(GetArtifactRequest) returns (Artifact) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/artifacts/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Returns the contents of a specified artifact. + // If artifacts are stored with GZip compression, the default behavior + // is to return the artifact uncompressed (the mime_type response field + // indicates the exact format returned). + rpc GetArtifactContents(GetArtifactContentsRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/artifacts/*}:getContents" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}:getContents" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getContents" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getContents" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:getContents" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a specified artifact. + rpc CreateArtifact(CreateArtifactRequest) returns (Artifact) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/artifacts" + body: "artifact" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/apis/*}/artifacts" + body: "artifact" + } + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts" + body: "artifact" + } + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts" + body: "artifact" + } + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts" + body: "artifact" + } + }; + option (google.api.method_signature) = "parent,artifact,artifact_id"; + } + + // Used to replace a specified artifact. + rpc ReplaceArtifact(ReplaceArtifactRequest) returns (Artifact) { + option (google.api.http) = { + put: "/v1/{artifact.name=projects/*/locations/*/artifacts/*}" + body: "artifact" + additional_bindings { + put: "/v1/{artifact.name=projects/*/locations/*/apis/*/artifacts/*}" + body: "artifact" + } + additional_bindings { + put: "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/artifacts/*}" + body: "artifact" + } + additional_bindings { + put: "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}" + body: "artifact" + } + additional_bindings { + put: "/v1/{artifact.name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}" + body: "artifact" + } + }; + option (google.api.method_signature) = "artifact"; + } + + // Removes a specified artifact. + rpc DeleteArtifact(DeleteArtifactRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/artifacts/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}" + } + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}" + } + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}" + } + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for ListApis. +message ListApisRequest { + // Required. The parent, which owns this collection of APIs. + // Format: `projects/*/locations/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/Api" + } + ]; + + // The maximum number of APIs to return. + // The service may return fewer than this value. + // If unspecified, at most 50 values will be returned. + // The maximum is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListApis` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListApis` must match + // the call that provided the page token. + string page_token = 3; + + // An expression that can be used to filter the list. Filters use the Common + // Expression Language and can refer to all message fields. + string filter = 4; +} + +// Response message for ListApis. +message ListApisResponse { + // The APIs from the specified publisher. + repeated Api apis = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for GetApi. +message GetApiRequest { + // Required. The name of the API to retrieve. + // Format: `projects/*/locations/*/apis/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Api" + } + ]; +} + +// Request message for CreateApi. +message CreateApiRequest { + // Required. The parent, which owns this collection of APIs. + // Format: `projects/*/locations/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/Api" + } + ]; + + // Required. The API to create. + Api api = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the API, which will become the final component of + // the API's resource name. + // + // This value should be 4-63 characters, and valid characters + // are /[a-z][0-9]-/. + // + // Following AIP-162, IDs must not have the form of a UUID. + string api_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateApi. +message UpdateApiRequest { + // Required. The API to update. + // + // The `name` field is used to identify the API to update. + // Format: `projects/*/locations/*/apis/*` + Api api = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. If omitted, all fields are updated that + // are set in the request message (fields set to default values are ignored). + // If an asterisk "*" is specified, all fields are updated, including fields + // that are unspecified/default in the request. + google.protobuf.FieldMask update_mask = 2; + + // If set to true, and the API is not found, a new API will be created. + // In this situation, `update_mask` is ignored. + bool allow_missing = 3; +} + +// Request message for DeleteApi. +message DeleteApiRequest { + // Required. The name of the API to delete. + // Format: `projects/*/locations/*/apis/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Api" + } + ]; + + // If set to true, any child resources will also be deleted. + // (Otherwise, the request will only work if there are no child resources.) + bool force = 2; +} + +// Request message for ListApiVersions. +message ListApiVersionsRequest { + // Required. The parent, which owns this collection of versions. + // Format: `projects/*/locations/*/apis/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiVersion" + } + ]; + + // The maximum number of versions to return. + // The service may return fewer than this value. + // If unspecified, at most 50 values will be returned. + // The maximum is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListApiVersions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListApiVersions` must + // match the call that provided the page token. + string page_token = 3; + + // An expression that can be used to filter the list. Filters use the Common + // Expression Language and can refer to all message fields. + string filter = 4; +} + +// Response message for ListApiVersions. +message ListApiVersionsResponse { + // The versions from the specified publisher. + repeated ApiVersion api_versions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for GetApiVersion. +message GetApiVersionRequest { + // Required. The name of the version to retrieve. + // Format: `projects/*/locations/*/apis/*/versions/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiVersion" + } + ]; +} + +// Request message for CreateApiVersion. +message CreateApiVersionRequest { + // Required. The parent, which owns this collection of versions. + // Format: `projects/*/locations/*/apis/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiVersion" + } + ]; + + // Required. The version to create. + ApiVersion api_version = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the version, which will become the final component of + // the version's resource name. + // + // This value should be 1-63 characters, and valid characters + // are /[a-z][0-9]-/. + // + // Following AIP-162, IDs must not have the form of a UUID. + string api_version_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateApiVersion. +message UpdateApiVersionRequest { + // Required. The version to update. + // + // The `name` field is used to identify the version to update. + // Format: `projects/*/locations/*/apis/*/versions/*` + ApiVersion api_version = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. If omitted, all fields are updated that + // are set in the request message (fields set to default values are ignored). + // If an asterisk "*" is specified, all fields are updated, including fields + // that are unspecified/default in the request. + google.protobuf.FieldMask update_mask = 2; + + // If set to true, and the version is not found, a new version will be + // created. In this situation, `update_mask` is ignored. + bool allow_missing = 3; +} + +// Request message for DeleteApiVersion. +message DeleteApiVersionRequest { + // Required. The name of the version to delete. + // Format: `projects/*/locations/*/apis/*/versions/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiVersion" + } + ]; + + // If set to true, any child resources will also be deleted. + // (Otherwise, the request will only work if there are no child resources.) + bool force = 2; +} + +// Request message for ListApiSpecs. +message ListApiSpecsRequest { + // Required. The parent, which owns this collection of specs. + // Format: `projects/*/locations/*/apis/*/versions/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // The maximum number of specs to return. + // The service may return fewer than this value. + // If unspecified, at most 50 values will be returned. + // The maximum is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListApiSpecs` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListApiSpecs` must match + // the call that provided the page token. + string page_token = 3; + + // An expression that can be used to filter the list. Filters use the Common + // Expression Language and can refer to all message fields except contents. + string filter = 4; +} + +// Response message for ListApiSpecs. +message ListApiSpecsResponse { + // The specs from the specified publisher. + repeated ApiSpec api_specs = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for GetApiSpec. +message GetApiSpecRequest { + // Required. The name of the spec to retrieve. + // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; +} + +// Request message for GetApiSpecContents. +message GetApiSpecContentsRequest { + // Required. The name of the spec whose contents should be retrieved. + // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; +} + +// Request message for CreateApiSpec. +message CreateApiSpecRequest { + // Required. The parent, which owns this collection of specs. + // Format: `projects/*/locations/*/apis/*/versions/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // Required. The spec to create. + ApiSpec api_spec = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the spec, which will become the final component of + // the spec's resource name. + // + // This value should be 4-63 characters, and valid characters + // are /[a-z][0-9]-/. + // + // Following AIP-162, IDs must not have the form of a UUID. + string api_spec_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateApiSpec. +message UpdateApiSpecRequest { + // Required. The spec to update. + // + // The `name` field is used to identify the spec to update. + // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + ApiSpec api_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. If omitted, all fields are updated that + // are set in the request message (fields set to default values are ignored). + // If an asterisk "*" is specified, all fields are updated, including fields + // that are unspecified/default in the request. + google.protobuf.FieldMask update_mask = 2; + + // If set to true, and the spec is not found, a new spec will be created. + // In this situation, `update_mask` is ignored. + bool allow_missing = 3; +} + +// Request message for DeleteApiSpec. +message DeleteApiSpecRequest { + // Required. The name of the spec to delete. + // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // If set to true, any child resources will also be deleted. + // (Otherwise, the request will only work if there are no child resources.) + bool force = 2; +} + +// Request message for TagApiSpecRevision. +message TagApiSpecRevisionRequest { + // Required. The name of the spec to be tagged, including the revision ID. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // Required. The tag to apply. + // The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + string tag = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListApiSpecRevisions. +message ListApiSpecRevisionsRequest { + // Required. The name of the spec to list revisions for. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // The maximum number of revisions to return per page. + int32 page_size = 2; + + // The page token, received from a previous ListApiSpecRevisions call. + // Provide this to retrieve the subsequent page. + string page_token = 3; +} + +// Response message for ListApiSpecRevisionsResponse. +message ListApiSpecRevisionsResponse { + // The revisions of the spec. + repeated ApiSpec api_specs = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for RollbackApiSpec. +message RollbackApiSpecRequest { + // Required. The spec being rolled back. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // Required. The revision ID to roll back to. + // It must be a revision of the same spec. + // + // Example: `c7cfa2a8` + string revision_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteApiSpecRevision. +message DeleteApiSpecRevisionRequest { + // Required. The name of the spec revision to be deleted, + // with a revision ID explicitly included. + // + // Example: + // `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; +} + +// Request message for ListApiDeployments. +message ListApiDeploymentsRequest { + // Required. The parent, which owns this collection of deployments. + // Format: `projects/*/locations/*/apis/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // The maximum number of deployments to return. + // The service may return fewer than this value. + // If unspecified, at most 50 values will be returned. + // The maximum is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListApiDeployments` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListApiDeployments` must + // match the call that provided the page token. + string page_token = 3; + + // An expression that can be used to filter the list. Filters use the Common + // Expression Language and can refer to all message fields. + string filter = 4; +} + +// Response message for ListApiDeployments. +message ListApiDeploymentsResponse { + // The deployments from the specified publisher. + repeated ApiDeployment api_deployments = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for GetApiDeployment. +message GetApiDeploymentRequest { + // Required. The name of the deployment to retrieve. + // Format: `projects/*/locations/*/apis/*/deployments/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; +} + +// Request message for CreateApiDeployment. +message CreateApiDeploymentRequest { + // Required. The parent, which owns this collection of deployments. + // Format: `projects/*/locations/*/apis/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // Required. The deployment to create. + ApiDeployment api_deployment = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the deployment, which will become the final component of + // the deployment's resource name. + // + // This value should be 4-63 characters, and valid characters + // are /[a-z][0-9]-/. + // + // Following AIP-162, IDs must not have the form of a UUID. + string api_deployment_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateApiDeployment. +message UpdateApiDeploymentRequest { + // Required. The deployment to update. + // + // The `name` field is used to identify the deployment to update. + // Format: `projects/*/locations/*/apis/*/deployments/*` + ApiDeployment api_deployment = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. If omitted, all fields are updated that + // are set in the request message (fields set to default values are ignored). + // If an asterisk "*" is specified, all fields are updated, including fields + // that are unspecified/default in the request. + google.protobuf.FieldMask update_mask = 2; + + // If set to true, and the deployment is not found, a new deployment will be + // created. In this situation, `update_mask` is ignored. + bool allow_missing = 3; +} + +// Request message for DeleteApiDeployment. +message DeleteApiDeploymentRequest { + // Required. The name of the deployment to delete. + // Format: `projects/*/locations/*/apis/*/deployments/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // If set to true, any child resources will also be deleted. + // (Otherwise, the request will only work if there are no child resources.) + bool force = 2; +} + +// Request message for TagApiDeploymentRevision. +message TagApiDeploymentRevisionRequest { + // Required. The name of the deployment to be tagged, including the revision ID. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // Required. The tag to apply. + // The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + string tag = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListApiDeploymentRevisions. +message ListApiDeploymentRevisionsRequest { + // Required. The name of the deployment to list revisions for. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // The maximum number of revisions to return per page. + int32 page_size = 2; + + // The page token, received from a previous ListApiDeploymentRevisions call. + // Provide this to retrieve the subsequent page. + string page_token = 3; +} + +// Response message for ListApiDeploymentRevisionsResponse. +message ListApiDeploymentRevisionsResponse { + // The revisions of the deployment. + repeated ApiDeployment api_deployments = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for RollbackApiDeployment. +message RollbackApiDeploymentRequest { + // Required. The deployment being rolled back. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // Required. The revision ID to roll back to. + // It must be a revision of the same deployment. + // + // Example: `c7cfa2a8` + string revision_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteApiDeploymentRevision. +message DeleteApiDeploymentRevisionRequest { + // Required. The name of the deployment revision to be deleted, + // with a revision ID explicitly included. + // + // Example: + // `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; +} + +// Request message for ListArtifacts. +message ListArtifactsRequest { + // Required. The parent, which owns this collection of artifacts. + // Format: `{parent}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/Artifact" + } + ]; + + // The maximum number of artifacts to return. + // The service may return fewer than this value. + // If unspecified, at most 50 values will be returned. + // The maximum is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListArtifacts` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListArtifacts` must + // match the call that provided the page token. + string page_token = 3; + + // An expression that can be used to filter the list. Filters use the Common + // Expression Language and can refer to all message fields except contents. + string filter = 4; +} + +// Response message for ListArtifacts. +message ListArtifactsResponse { + // The artifacts from the specified publisher. + repeated Artifact artifacts = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for GetArtifact. +message GetArtifactRequest { + // Required. The name of the artifact to retrieve. + // Format: `{parent}/artifacts/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Artifact" + } + ]; +} + +// Request message for GetArtifactContents. +message GetArtifactContentsRequest { + // Required. The name of the artifact whose contents should be retrieved. + // Format: `{parent}/artifacts/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Artifact" + } + ]; +} + +// Request message for CreateArtifact. +message CreateArtifactRequest { + // Required. The parent, which owns this collection of artifacts. + // Format: `{parent}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/Artifact" + } + ]; + + // Required. The artifact to create. + Artifact artifact = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the artifact, which will become the final component of + // the artifact's resource name. + // + // This value should be 4-63 characters, and valid characters + // are /[a-z][0-9]-/. + // + // Following AIP-162, IDs must not have the form of a UUID. + string artifact_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ReplaceArtifact. +message ReplaceArtifactRequest { + // Required. The artifact to replace. + // + // The `name` field is used to identify the artifact to replace. + // Format: `{parent}/artifacts/*` + Artifact artifact = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteArtifact. +message DeleteArtifactRequest { + // Required. The name of the artifact to delete. + // Format: `{parent}/artifacts/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Artifact" + } + ]; +} diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..7ed2b66cc1a2 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.cloud.apigeeregistry.v1.ProvisioningSettings; +import com.google.cloud.apigeeregistry.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 for illustrative purposes only. + // It may require modifications to work in your environment. + ProvisioningSettings provisioningSettings = + ProvisioningSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings); + } +} +// [END apigeeregistry_v1_generated_provisioningclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..9c595e67ae4c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_create_setcredentialsprovider1_sync] +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.cloud.apigeeregistry.v1.ProvisioningSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ProvisioningSettings provisioningSettings = + ProvisioningSettings.newBuilder() + .setTransportChannelProvider( + ProvisioningSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings); + } +} +// [END apigeeregistry_v1_generated_provisioningclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a7932a245133 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_create_setendpoint_sync] +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.cloud.apigeeregistry.v1.ProvisioningSettings; +import com.google.cloud.apigeeregistry.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 for illustrative purposes only. + // It may require modifications to work in your environment. + ProvisioningSettings provisioningSettings = + ProvisioningSettings.newBuilder().setEndpoint(myEndpoint).build(); + ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings); + } +} +// [END apigeeregistry_v1_generated_provisioningclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstance.java new file mode 100644 index 000000000000..2f07bdb318e7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstance.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_createinstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.CreateInstanceRequest; +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.longrunning.Operation; + +public class AsyncCreateInstance { + + public static void main(String[] args) throws Exception { + asyncCreateInstance(); + } + + public static void asyncCreateInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInstanceId("instanceId902024336") + .setInstance(Instance.newBuilder().build()) + .build(); + ApiFuture future = provisioningClient.createInstanceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_createinstance_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstanceLRO.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstanceLRO.java new file mode 100644 index 000000000000..c833e9369536 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstanceLRO.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_createinstance_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.apigeeregistry.v1.CreateInstanceRequest; +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.OperationMetadata; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; + +public class AsyncCreateInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncCreateInstanceLRO(); + } + + public static void asyncCreateInstanceLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInstanceId("instanceId902024336") + .setInstance(Instance.newBuilder().build()) + .build(); + OperationFuture future = + provisioningClient.createInstanceOperationCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_createinstance_lro_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstance.java new file mode 100644 index 000000000000..92c93e247bf8 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstance.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_createinstance_sync] +import com.google.cloud.apigeeregistry.v1.CreateInstanceRequest; +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; + +public class SyncCreateInstance { + + public static void main(String[] args) throws Exception { + syncCreateInstance(); + } + + public static void syncCreateInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInstanceId("instanceId902024336") + .setInstance(Instance.newBuilder().build()) + .build(); + Instance response = provisioningClient.createInstanceAsync(request).get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_createinstance_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java new file mode 100644 index 000000000000..90ddc8d13351 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_createinstance_locationnameinstancestring_sync] +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; + +public class SyncCreateInstanceLocationnameInstanceString { + + public static void main(String[] args) throws Exception { + syncCreateInstanceLocationnameInstanceString(); + } + + public static void syncCreateInstanceLocationnameInstanceString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + Instance response = + provisioningClient.createInstanceAsync(parent, instance, instanceId).get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_createinstance_locationnameinstancestring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceStringInstanceString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceStringInstanceString.java new file mode 100644 index 000000000000..85d8fe03fc92 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceStringInstanceString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_createinstance_stringinstancestring_sync] +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; + +public class SyncCreateInstanceStringInstanceString { + + public static void main(String[] args) throws Exception { + syncCreateInstanceStringInstanceString(); + } + + public static void syncCreateInstanceStringInstanceString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + Instance response = + provisioningClient.createInstanceAsync(parent, instance, instanceId).get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_createinstance_stringinstancestring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstance.java new file mode 100644 index 000000000000..0d9e7c478a5d --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstance.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_deleteinstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; +import com.google.cloud.apigeeregistry.v1.InstanceName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteInstance { + + public static void main(String[] args) throws Exception { + asyncDeleteInstance(); + } + + public static void asyncDeleteInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + ApiFuture future = provisioningClient.deleteInstanceCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_deleteinstance_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstanceLRO.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstanceLRO.java new file mode 100644 index 000000000000..5aee2bfab73a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstanceLRO.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_deleteinstance_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; +import com.google.cloud.apigeeregistry.v1.InstanceName; +import com.google.cloud.apigeeregistry.v1.OperationMetadata; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteInstanceLRO(); + } + + public static void asyncDeleteInstanceLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + OperationFuture future = + provisioningClient.deleteInstanceOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_deleteinstance_lro_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstance.java new file mode 100644 index 000000000000..20d0aa3b3852 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstance.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_deleteinstance_sync] +import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; +import com.google.cloud.apigeeregistry.v1.InstanceName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.protobuf.Empty; + +public class SyncDeleteInstance { + + public static void main(String[] args) throws Exception { + syncDeleteInstance(); + } + + public static void syncDeleteInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + provisioningClient.deleteInstanceAsync(request).get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_deleteinstance_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceInstancename.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceInstancename.java new file mode 100644 index 000000000000..c78a6ea34202 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceInstancename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_deleteinstance_instancename_sync] +import com.google.cloud.apigeeregistry.v1.InstanceName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.protobuf.Empty; + +public class SyncDeleteInstanceInstancename { + + public static void main(String[] args) throws Exception { + syncDeleteInstanceInstancename(); + } + + public static void syncDeleteInstanceInstancename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + provisioningClient.deleteInstanceAsync(name).get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_deleteinstance_instancename_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceString.java new file mode 100644 index 000000000000..723e84892037 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_deleteinstance_string_sync] +import com.google.cloud.apigeeregistry.v1.InstanceName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.protobuf.Empty; + +public class SyncDeleteInstanceString { + + public static void main(String[] args) throws Exception { + syncDeleteInstanceString(); + } + + public static void syncDeleteInstanceString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + provisioningClient.deleteInstanceAsync(name).get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_deleteinstance_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/AsyncGetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..71633093c27e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_getiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = provisioningClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_getiampolicy_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/SyncGetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..1d2d226fc301 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_getiampolicy_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = provisioningClient.getIamPolicy(request); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_getiampolicy_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/AsyncGetInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/AsyncGetInstance.java new file mode 100644 index 000000000000..cc2907bc093b --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/AsyncGetInstance.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_getinstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.InstanceName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; + +public class AsyncGetInstance { + + public static void main(String[] args) throws Exception { + asyncGetInstance(); + } + + public static void asyncGetInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + ApiFuture future = provisioningClient.getInstanceCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_getinstance_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstance.java new file mode 100644 index 000000000000..59af41717ec3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstance.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_getinstance_sync] +import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.InstanceName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; + +public class SyncGetInstance { + + public static void main(String[] args) throws Exception { + syncGetInstance(); + } + + public static void syncGetInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + Instance response = provisioningClient.getInstance(request); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_getinstance_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceInstancename.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceInstancename.java new file mode 100644 index 000000000000..99c07baa87b2 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceInstancename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_getinstance_instancename_sync] +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.InstanceName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; + +public class SyncGetInstanceInstancename { + + public static void main(String[] args) throws Exception { + syncGetInstanceInstancename(); + } + + public static void syncGetInstanceInstancename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + Instance response = provisioningClient.getInstance(name); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_getinstance_instancename_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceString.java new file mode 100644 index 000000000000..c37db372518c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_getinstance_string_sync] +import com.google.cloud.apigeeregistry.v1.Instance; +import com.google.cloud.apigeeregistry.v1.InstanceName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; + +public class SyncGetInstanceString { + + public static void main(String[] args) throws Exception { + syncGetInstanceString(); + } + + public static void syncGetInstanceString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + Instance response = provisioningClient.getInstance(name); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_getinstance_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..b82b9c9e4d5a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/AsyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_getlocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = provisioningClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_getlocation_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/SyncGetLocation.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..93c4fd8b7417 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/SyncGetLocation.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_getlocation_sync] +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = provisioningClient.getLocation(request); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_getlocation_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocations.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..3474f4eedc53 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocations.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_listlocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + provisioningClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_listlocations_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..b15ebe2d2d2c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,58 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_listlocations_paged_async] +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = provisioningClient.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 apigeeregistry_v1_generated_provisioningclient_listlocations_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/SyncListLocations.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..c65c77944d6c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/SyncListLocations.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_listlocations_sync] +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : provisioningClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_listlocations_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/AsyncSetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..3c154c08e0fb --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_setiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = provisioningClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_setiampolicy_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/SyncSetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..875bc7b1ebb1 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_setiampolicy_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = provisioningClient.setIamPolicy(request); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_setiampolicy_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/AsyncTestIamPermissions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..402d314655c7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_testiampermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + provisioningClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_testiampermissions_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/SyncTestIamPermissions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..e64ccfdf8e27 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningclient_testiampermissions_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ProvisioningClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = provisioningClient.testIamPermissions(request); + } + } +} +// [END apigeeregistry_v1_generated_provisioningclient_testiampermissions_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningsettings/getinstance/SyncGetInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningsettings/getinstance/SyncGetInstance.java new file mode 100644 index 000000000000..12ae495cc54f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningsettings/getinstance/SyncGetInstance.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_provisioningsettings_getinstance_sync] +import com.google.cloud.apigeeregistry.v1.ProvisioningSettings; +import java.time.Duration; + +public class SyncGetInstance { + + public static void main(String[] args) throws Exception { + syncGetInstance(); + } + + public static void syncGetInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ProvisioningSettings.Builder provisioningSettingsBuilder = ProvisioningSettings.newBuilder(); + provisioningSettingsBuilder + .getInstanceSettings() + .setRetrySettings( + provisioningSettingsBuilder + .getInstanceSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProvisioningSettings provisioningSettings = provisioningSettingsBuilder.build(); + } +} +// [END apigeeregistry_v1_generated_provisioningsettings_getinstance_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..e50c1c96865c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.RegistrySettings; +import com.google.cloud.apigeeregistry.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 for illustrative purposes only. + // It may require modifications to work in your environment. + RegistrySettings registrySettings = + RegistrySettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegistryClient registryClient = RegistryClient.create(registrySettings); + } +} +// [END apigeeregistry_v1_generated_registryclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..ec90195c9f28 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_create_setcredentialsprovider1_sync] +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.RegistrySettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + RegistrySettings registrySettings = + RegistrySettings.newBuilder() + .setTransportChannelProvider( + RegistrySettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + RegistryClient registryClient = RegistryClient.create(registrySettings); + } +} +// [END apigeeregistry_v1_generated_registryclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..68bff4bde6ba --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_create_setendpoint_sync] +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.RegistrySettings; +import com.google.cloud.apigeeregistry.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 for illustrative purposes only. + // It may require modifications to work in your environment. + RegistrySettings registrySettings = + RegistrySettings.newBuilder().setEndpoint(myEndpoint).build(); + RegistryClient registryClient = RegistryClient.create(registrySettings); + } +} +// [END apigeeregistry_v1_generated_registryclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/AsyncCreateApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/AsyncCreateApi.java new file mode 100644 index 000000000000..fd41b160e7ee --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/AsyncCreateApi.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapi_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.CreateApiRequest; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncCreateApi { + + public static void main(String[] args) throws Exception { + asyncCreateApi(); + } + + public static void asyncCreateApi() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + CreateApiRequest request = + CreateApiRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setApi(Api.newBuilder().build()) + .setApiId("apiId93021397") + .build(); + ApiFuture future = registryClient.createApiCallable().futureCall(request); + // Do something. + Api response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapi_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApi.java new file mode 100644 index 000000000000..8089157dcd0c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApi.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapi_sync] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.CreateApiRequest; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApi { + + public static void main(String[] args) throws Exception { + syncCreateApi(); + } + + public static void syncCreateApi() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + CreateApiRequest request = + CreateApiRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setApi(Api.newBuilder().build()) + .setApiId("apiId93021397") + .build(); + Api response = registryClient.createApi(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapi_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiLocationnameApiString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiLocationnameApiString.java new file mode 100644 index 000000000000..b51e77ec5858 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiLocationnameApiString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapi_locationnameapistring_sync] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApiLocationnameApiString { + + public static void main(String[] args) throws Exception { + syncCreateApiLocationnameApiString(); + } + + public static void syncCreateApiLocationnameApiString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Api api = Api.newBuilder().build(); + String apiId = "apiId93021397"; + Api response = registryClient.createApi(parent, api, apiId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapi_locationnameapistring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiStringApiString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiStringApiString.java new file mode 100644 index 000000000000..7c597efbd903 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiStringApiString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapi_stringapistring_sync] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApiStringApiString { + + public static void main(String[] args) throws Exception { + syncCreateApiStringApiString(); + } + + public static void syncCreateApiStringApiString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Api api = Api.newBuilder().build(); + String apiId = "apiId93021397"; + Api response = registryClient.createApi(parent, api, apiId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapi_stringapistring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/AsyncCreateApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/AsyncCreateApiDeployment.java new file mode 100644 index 000000000000..415c10bdc0ba --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/AsyncCreateApiDeployment.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapideployment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncCreateApiDeployment { + + public static void main(String[] args) throws Exception { + asyncCreateApiDeployment(); + } + + public static void asyncCreateApiDeployment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + CreateApiDeploymentRequest request = + CreateApiDeploymentRequest.newBuilder() + .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setApiDeployment(ApiDeployment.newBuilder().build()) + .setApiDeploymentId("apiDeploymentId-1299472902") + .build(); + ApiFuture future = + registryClient.createApiDeploymentCallable().futureCall(request); + // Do something. + ApiDeployment response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapideployment_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeployment.java new file mode 100644 index 000000000000..4a71057d1471 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeployment.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapideployment_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApiDeployment { + + public static void main(String[] args) throws Exception { + syncCreateApiDeployment(); + } + + public static void syncCreateApiDeployment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + CreateApiDeploymentRequest request = + CreateApiDeploymentRequest.newBuilder() + .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setApiDeployment(ApiDeployment.newBuilder().build()) + .setApiDeploymentId("apiDeploymentId-1299472902") + .build(); + ApiDeployment response = registryClient.createApiDeployment(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapideployment_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentApinameApideploymentString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentApinameApideploymentString.java new file mode 100644 index 000000000000..bf231533b502 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentApinameApideploymentString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapideployment_apinameapideploymentstring_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApiDeploymentApinameApideploymentString { + + public static void main(String[] args) throws Exception { + syncCreateApiDeploymentApinameApideploymentString(); + } + + public static void syncCreateApiDeploymentApinameApideploymentString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + String apiDeploymentId = "apiDeploymentId-1299472902"; + ApiDeployment response = + registryClient.createApiDeployment(parent, apiDeployment, apiDeploymentId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapideployment_apinameapideploymentstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentStringApideploymentString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentStringApideploymentString.java new file mode 100644 index 000000000000..53a011ccdc95 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentStringApideploymentString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapideployment_stringapideploymentstring_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApiDeploymentStringApideploymentString { + + public static void main(String[] args) throws Exception { + syncCreateApiDeploymentStringApideploymentString(); + } + + public static void syncCreateApiDeploymentStringApideploymentString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + String apiDeploymentId = "apiDeploymentId-1299472902"; + ApiDeployment response = + registryClient.createApiDeployment(parent, apiDeployment, apiDeploymentId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapideployment_stringapideploymentstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/AsyncCreateApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/AsyncCreateApiSpec.java new file mode 100644 index 000000000000..cb8bef21fdb1 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/AsyncCreateApiSpec.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapispec_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncCreateApiSpec { + + public static void main(String[] args) throws Exception { + asyncCreateApiSpec(); + } + + public static void asyncCreateApiSpec() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + CreateApiSpecRequest request = + CreateApiSpecRequest.newBuilder() + .setParent( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setApiSpec(ApiSpec.newBuilder().build()) + .setApiSpecId("apiSpecId-421795600") + .build(); + ApiFuture future = registryClient.createApiSpecCallable().futureCall(request); + // Do something. + ApiSpec response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapispec_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpec.java new file mode 100644 index 000000000000..3365e22240f7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpec.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapispec_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApiSpec { + + public static void main(String[] args) throws Exception { + syncCreateApiSpec(); + } + + public static void syncCreateApiSpec() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + CreateApiSpecRequest request = + CreateApiSpecRequest.newBuilder() + .setParent( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setApiSpec(ApiSpec.newBuilder().build()) + .setApiSpecId("apiSpecId-421795600") + .build(); + ApiSpec response = registryClient.createApiSpec(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapispec_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecApiversionnameApispecString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecApiversionnameApispecString.java new file mode 100644 index 000000000000..b17dc25e9cd9 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecApiversionnameApispecString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapispec_apiversionnameapispecstring_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApiSpecApiversionnameApispecString { + + public static void main(String[] args) throws Exception { + syncCreateApiSpecApiversionnameApispecString(); + } + + public static void syncCreateApiSpecApiversionnameApispecString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + String apiSpecId = "apiSpecId-421795600"; + ApiSpec response = registryClient.createApiSpec(parent, apiSpec, apiSpecId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapispec_apiversionnameapispecstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecStringApispecString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecStringApispecString.java new file mode 100644 index 000000000000..7f78f9ee8dd7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecStringApispecString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapispec_stringapispecstring_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApiSpecStringApispecString { + + public static void main(String[] args) throws Exception { + syncCreateApiSpecStringApispecString(); + } + + public static void syncCreateApiSpecStringApispecString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString(); + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + String apiSpecId = "apiSpecId-421795600"; + ApiSpec response = registryClient.createApiSpec(parent, apiSpec, apiSpecId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapispec_stringapispecstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/AsyncCreateApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/AsyncCreateApiVersion.java new file mode 100644 index 000000000000..c1053618f9b6 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/AsyncCreateApiVersion.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapiversion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncCreateApiVersion { + + public static void main(String[] args) throws Exception { + asyncCreateApiVersion(); + } + + public static void asyncCreateApiVersion() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + CreateApiVersionRequest request = + CreateApiVersionRequest.newBuilder() + .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setApiVersion(ApiVersion.newBuilder().build()) + .setApiVersionId("apiVersionId1678816025") + .build(); + ApiFuture future = registryClient.createApiVersionCallable().futureCall(request); + // Do something. + ApiVersion response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapiversion_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersion.java new file mode 100644 index 000000000000..eefb57b8da37 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersion.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapiversion_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApiVersion { + + public static void main(String[] args) throws Exception { + syncCreateApiVersion(); + } + + public static void syncCreateApiVersion() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + CreateApiVersionRequest request = + CreateApiVersionRequest.newBuilder() + .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setApiVersion(ApiVersion.newBuilder().build()) + .setApiVersionId("apiVersionId1678816025") + .build(); + ApiVersion response = registryClient.createApiVersion(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapiversion_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionApinameApiversionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionApinameApiversionString.java new file mode 100644 index 000000000000..6947ef7ab89f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionApinameApiversionString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapiversion_apinameapiversionstring_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApiVersionApinameApiversionString { + + public static void main(String[] args) throws Exception { + syncCreateApiVersionApinameApiversionString(); + } + + public static void syncCreateApiVersionApinameApiversionString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + String apiVersionId = "apiVersionId1678816025"; + ApiVersion response = registryClient.createApiVersion(parent, apiVersion, apiVersionId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapiversion_apinameapiversionstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionStringApiversionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionStringApiversionString.java new file mode 100644 index 000000000000..0de7d3cbb518 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionStringApiversionString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createapiversion_stringapiversionstring_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateApiVersionStringApiversionString { + + public static void main(String[] args) throws Exception { + syncCreateApiVersionStringApiversionString(); + } + + public static void syncCreateApiVersionStringApiversionString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + String apiVersionId = "apiVersionId1678816025"; + ApiVersion response = registryClient.createApiVersion(parent, apiVersion, apiVersionId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createapiversion_stringapiversionstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/AsyncCreateArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/AsyncCreateArtifact.java new file mode 100644 index 000000000000..9fe5fb79229b --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/AsyncCreateArtifact.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createartifact_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncCreateArtifact { + + public static void main(String[] args) throws Exception { + asyncCreateArtifact(); + } + + public static void asyncCreateArtifact() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + CreateArtifactRequest request = + CreateArtifactRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setArtifact(Artifact.newBuilder().build()) + .setArtifactId("artifactId240640653") + .build(); + ApiFuture future = registryClient.createArtifactCallable().futureCall(request); + // Do something. + Artifact response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createartifact_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifact.java new file mode 100644 index 000000000000..c3476ddd686c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifact.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createartifact_sync] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateArtifact { + + public static void main(String[] args) throws Exception { + syncCreateArtifact(); + } + + public static void syncCreateArtifact() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + CreateArtifactRequest request = + CreateArtifactRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setArtifact(Artifact.newBuilder().build()) + .setArtifactId("artifactId240640653") + .build(); + Artifact response = registryClient.createArtifact(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createartifact_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApideploymentnameArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApideploymentnameArtifactString.java new file mode 100644 index 000000000000..09b7ea8bc941 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApideploymentnameArtifactString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createartifact_apideploymentnameartifactstring_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateArtifactApideploymentnameArtifactString { + + public static void main(String[] args) throws Exception { + syncCreateArtifactApideploymentnameArtifactString(); + } + + public static void syncCreateArtifactApideploymentnameArtifactString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiDeploymentName parent = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + Artifact response = registryClient.createArtifact(parent, artifact, artifactId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createartifact_apideploymentnameartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApinameArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApinameArtifactString.java new file mode 100644 index 000000000000..e4f7e7f6ddc1 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApinameArtifactString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createartifact_apinameartifactstring_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateArtifactApinameArtifactString { + + public static void main(String[] args) throws Exception { + syncCreateArtifactApinameArtifactString(); + } + + public static void syncCreateArtifactApinameArtifactString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + Artifact response = registryClient.createArtifact(parent, artifact, artifactId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createartifact_apinameartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApispecnameArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApispecnameArtifactString.java new file mode 100644 index 000000000000..f9c7c988ef6f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApispecnameArtifactString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createartifact_apispecnameartifactstring_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateArtifactApispecnameArtifactString { + + public static void main(String[] args) throws Exception { + syncCreateArtifactApispecnameArtifactString(); + } + + public static void syncCreateArtifactApispecnameArtifactString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiSpecName parent = + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + Artifact response = registryClient.createArtifact(parent, artifact, artifactId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createartifact_apispecnameartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApiversionnameArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApiversionnameArtifactString.java new file mode 100644 index 000000000000..381f39304b02 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApiversionnameArtifactString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createartifact_apiversionnameartifactstring_sync] +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateArtifactApiversionnameArtifactString { + + public static void main(String[] args) throws Exception { + syncCreateArtifactApiversionnameArtifactString(); + } + + public static void syncCreateArtifactApiversionnameArtifactString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + Artifact response = registryClient.createArtifact(parent, artifact, artifactId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createartifact_apiversionnameartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactLocationnameArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactLocationnameArtifactString.java new file mode 100644 index 000000000000..47dc2d0db256 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactLocationnameArtifactString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createartifact_locationnameartifactstring_sync] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateArtifactLocationnameArtifactString { + + public static void main(String[] args) throws Exception { + syncCreateArtifactLocationnameArtifactString(); + } + + public static void syncCreateArtifactLocationnameArtifactString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + Artifact response = registryClient.createArtifact(parent, artifact, artifactId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createartifact_locationnameartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactStringArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactStringArtifactString.java new file mode 100644 index 000000000000..14511f423099 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactStringArtifactString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_createartifact_stringartifactstring_sync] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncCreateArtifactStringArtifactString { + + public static void main(String[] args) throws Exception { + syncCreateArtifactStringArtifactString(); + } + + public static void syncCreateArtifactStringArtifactString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Artifact artifact = Artifact.newBuilder().build(); + String artifactId = "artifactId240640653"; + Artifact response = registryClient.createArtifact(parent, artifact, artifactId); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_createartifact_stringartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/AsyncDeleteApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/AsyncDeleteApi.java new file mode 100644 index 000000000000..6a1532b484a6 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/AsyncDeleteApi.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapi_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteApi { + + public static void main(String[] args) throws Exception { + asyncDeleteApi(); + } + + public static void asyncDeleteApi() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiRequest request = + DeleteApiRequest.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setForce(true) + .build(); + ApiFuture future = registryClient.deleteApiCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapi_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApi.java new file mode 100644 index 000000000000..15e48279a24e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApi.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapi_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApi { + + public static void main(String[] args) throws Exception { + syncDeleteApi(); + } + + public static void syncDeleteApi() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiRequest request = + DeleteApiRequest.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setForce(true) + .build(); + registryClient.deleteApi(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapi_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiApiname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiApiname.java new file mode 100644 index 000000000000..8dd82c61a197 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiApiname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapi_apiname_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApiApiname { + + public static void main(String[] args) throws Exception { + syncDeleteApiApiname(); + } + + public static void syncDeleteApiApiname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + registryClient.deleteApi(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapi_apiname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiString.java new file mode 100644 index 000000000000..d650bf74db14 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapi_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApiString { + + public static void main(String[] args) throws Exception { + syncDeleteApiString(); + } + + public static void syncDeleteApiString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); + registryClient.deleteApi(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapi_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/AsyncDeleteApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/AsyncDeleteApiDeployment.java new file mode 100644 index 000000000000..27be083d6878 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/AsyncDeleteApiDeployment.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapideployment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteApiDeployment { + + public static void main(String[] args) throws Exception { + asyncDeleteApiDeployment(); + } + + public static void asyncDeleteApiDeployment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiDeploymentRequest request = + DeleteApiDeploymentRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setForce(true) + .build(); + ApiFuture future = registryClient.deleteApiDeploymentCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapideployment_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeployment.java new file mode 100644 index 000000000000..f0baa4d66580 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeployment.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapideployment_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApiDeployment { + + public static void main(String[] args) throws Exception { + syncDeleteApiDeployment(); + } + + public static void syncDeleteApiDeployment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiDeploymentRequest request = + DeleteApiDeploymentRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setForce(true) + .build(); + registryClient.deleteApiDeployment(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapideployment_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentApideploymentname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentApideploymentname.java new file mode 100644 index 000000000000..b1b82c6c61d4 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentApideploymentname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapideployment_apideploymentname_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApiDeploymentApideploymentname { + + public static void main(String[] args) throws Exception { + syncDeleteApiDeploymentApideploymentname(); + } + + public static void syncDeleteApiDeploymentApideploymentname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + registryClient.deleteApiDeployment(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapideployment_apideploymentname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentString.java new file mode 100644 index 000000000000..63d507b77bbc --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapideployment_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApiDeploymentString { + + public static void main(String[] args) throws Exception { + syncDeleteApiDeploymentString(); + } + + public static void syncDeleteApiDeploymentString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString(); + registryClient.deleteApiDeployment(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapideployment_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/AsyncDeleteApiDeploymentRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/AsyncDeleteApiDeploymentRevision.java new file mode 100644 index 000000000000..1ac1515c7f13 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/AsyncDeleteApiDeploymentRevision.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncDeleteApiDeploymentRevision { + + public static void main(String[] args) throws Exception { + asyncDeleteApiDeploymentRevision(); + } + + public static void asyncDeleteApiDeploymentRevision() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiDeploymentRevisionRequest request = + DeleteApiDeploymentRevisionRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .build(); + ApiFuture future = + registryClient.deleteApiDeploymentRevisionCallable().futureCall(request); + // Do something. + ApiDeployment response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevision.java new file mode 100644 index 000000000000..a12da2314868 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevision.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncDeleteApiDeploymentRevision { + + public static void main(String[] args) throws Exception { + syncDeleteApiDeploymentRevision(); + } + + public static void syncDeleteApiDeploymentRevision() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiDeploymentRevisionRequest request = + DeleteApiDeploymentRevisionRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .build(); + ApiDeployment response = registryClient.deleteApiDeploymentRevision(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionApideploymentname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionApideploymentname.java new file mode 100644 index 000000000000..21521f34f8b2 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionApideploymentname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_apideploymentname_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncDeleteApiDeploymentRevisionApideploymentname { + + public static void main(String[] args) throws Exception { + syncDeleteApiDeploymentRevisionApideploymentname(); + } + + public static void syncDeleteApiDeploymentRevisionApideploymentname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + ApiDeployment response = registryClient.deleteApiDeploymentRevision(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_apideploymentname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionString.java new file mode 100644 index 000000000000..7fd28d664d87 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncDeleteApiDeploymentRevisionString { + + public static void main(String[] args) throws Exception { + syncDeleteApiDeploymentRevisionString(); + } + + public static void syncDeleteApiDeploymentRevisionString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString(); + ApiDeployment response = registryClient.deleteApiDeploymentRevision(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/AsyncDeleteApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/AsyncDeleteApiSpec.java new file mode 100644 index 000000000000..8e90aa7d934c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/AsyncDeleteApiSpec.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapispec_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteApiSpec { + + public static void main(String[] args) throws Exception { + asyncDeleteApiSpec(); + } + + public static void asyncDeleteApiSpec() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiSpecRequest request = + DeleteApiSpecRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setForce(true) + .build(); + ApiFuture future = registryClient.deleteApiSpecCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapispec_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpec.java new file mode 100644 index 000000000000..0276ffb274fc --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpec.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapispec_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApiSpec { + + public static void main(String[] args) throws Exception { + syncDeleteApiSpec(); + } + + public static void syncDeleteApiSpec() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiSpecRequest request = + DeleteApiSpecRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setForce(true) + .build(); + registryClient.deleteApiSpec(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapispec_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecApispecname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecApispecname.java new file mode 100644 index 000000000000..33bce782b715 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecApispecname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapispec_apispecname_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApiSpecApispecname { + + public static void main(String[] args) throws Exception { + syncDeleteApiSpecApispecname(); + } + + public static void syncDeleteApiSpecApispecname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + registryClient.deleteApiSpec(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapispec_apispecname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecString.java new file mode 100644 index 000000000000..c64567740ab1 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapispec_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApiSpecString { + + public static void main(String[] args) throws Exception { + syncDeleteApiSpecString(); + } + + public static void syncDeleteApiSpecString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString(); + registryClient.deleteApiSpec(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapispec_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/AsyncDeleteApiSpecRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/AsyncDeleteApiSpecRevision.java new file mode 100644 index 000000000000..b0a0b64ad8bf --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/AsyncDeleteApiSpecRevision.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapispecrevision_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncDeleteApiSpecRevision { + + public static void main(String[] args) throws Exception { + asyncDeleteApiSpecRevision(); + } + + public static void asyncDeleteApiSpecRevision() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiSpecRevisionRequest request = + DeleteApiSpecRevisionRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .build(); + ApiFuture future = + registryClient.deleteApiSpecRevisionCallable().futureCall(request); + // Do something. + ApiSpec response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapispecrevision_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevision.java new file mode 100644 index 000000000000..0f1aebec76ee --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevision.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapispecrevision_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncDeleteApiSpecRevision { + + public static void main(String[] args) throws Exception { + syncDeleteApiSpecRevision(); + } + + public static void syncDeleteApiSpecRevision() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiSpecRevisionRequest request = + DeleteApiSpecRevisionRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .build(); + ApiSpec response = registryClient.deleteApiSpecRevision(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapispecrevision_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionApispecname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionApispecname.java new file mode 100644 index 000000000000..e63a2bab158a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionApispecname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapispecrevision_apispecname_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncDeleteApiSpecRevisionApispecname { + + public static void main(String[] args) throws Exception { + syncDeleteApiSpecRevisionApispecname(); + } + + public static void syncDeleteApiSpecRevisionApispecname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + ApiSpec response = registryClient.deleteApiSpecRevision(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapispecrevision_apispecname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionString.java new file mode 100644 index 000000000000..de1b47eb0c16 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapispecrevision_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncDeleteApiSpecRevisionString { + + public static void main(String[] args) throws Exception { + syncDeleteApiSpecRevisionString(); + } + + public static void syncDeleteApiSpecRevisionString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString(); + ApiSpec response = registryClient.deleteApiSpecRevision(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapispecrevision_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/AsyncDeleteApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/AsyncDeleteApiVersion.java new file mode 100644 index 000000000000..9c85302021d3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/AsyncDeleteApiVersion.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapiversion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteApiVersion { + + public static void main(String[] args) throws Exception { + asyncDeleteApiVersion(); + } + + public static void asyncDeleteApiVersion() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiVersionRequest request = + DeleteApiVersionRequest.newBuilder() + .setName( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setForce(true) + .build(); + ApiFuture future = registryClient.deleteApiVersionCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapiversion_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersion.java new file mode 100644 index 000000000000..8ab9d3e91171 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersion.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapiversion_sync] +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApiVersion { + + public static void main(String[] args) throws Exception { + syncDeleteApiVersion(); + } + + public static void syncDeleteApiVersion() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteApiVersionRequest request = + DeleteApiVersionRequest.newBuilder() + .setName( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setForce(true) + .build(); + registryClient.deleteApiVersion(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapiversion_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionApiversionname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionApiversionname.java new file mode 100644 index 000000000000..e3284ac76d3d --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionApiversionname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapiversion_apiversionname_sync] +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApiVersionApiversionname { + + public static void main(String[] args) throws Exception { + syncDeleteApiVersionApiversionname(); + } + + public static void syncDeleteApiVersionApiversionname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + registryClient.deleteApiVersion(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapiversion_apiversionname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionString.java new file mode 100644 index 000000000000..e89540340685 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteapiversion_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteApiVersionString { + + public static void main(String[] args) throws Exception { + syncDeleteApiVersionString(); + } + + public static void syncDeleteApiVersionString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString(); + registryClient.deleteApiVersion(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteapiversion_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/AsyncDeleteArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/AsyncDeleteArtifact.java new file mode 100644 index 000000000000..b18948cbe67a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/AsyncDeleteArtifact.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteartifact_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteArtifact { + + public static void main(String[] args) throws Exception { + asyncDeleteArtifact(); + } + + public static void asyncDeleteArtifact() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteArtifactRequest request = + DeleteArtifactRequest.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName( + "[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .build(); + ApiFuture future = registryClient.deleteArtifactCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteartifact_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifact.java new file mode 100644 index 000000000000..c47b8fff0a8d --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifact.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteartifact_sync] +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteArtifact { + + public static void main(String[] args) throws Exception { + syncDeleteArtifact(); + } + + public static void syncDeleteArtifact() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + DeleteArtifactRequest request = + DeleteArtifactRequest.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName( + "[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .build(); + registryClient.deleteArtifact(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteartifact_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactArtifactname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactArtifactname.java new file mode 100644 index 000000000000..b7668c84e9e8 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactArtifactname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteartifact_artifactname_sync] +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteArtifactArtifactname { + + public static void main(String[] args) throws Exception { + syncDeleteArtifactArtifactname(); + } + + public static void syncDeleteArtifactArtifactname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + registryClient.deleteArtifact(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteartifact_artifactname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactString.java new file mode 100644 index 000000000000..45bc803ab4f7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_deleteartifact_string_sync] +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.Empty; + +public class SyncDeleteArtifactString { + + public static void main(String[] args) throws Exception { + syncDeleteArtifactString(); + } + + public static void syncDeleteArtifactString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString(); + registryClient.deleteArtifact(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_deleteartifact_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/AsyncGetApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/AsyncGetApi.java new file mode 100644 index 000000000000..3f53427051ab --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/AsyncGetApi.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapi_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.GetApiRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncGetApi { + + public static void main(String[] args) throws Exception { + asyncGetApi(); + } + + public static void asyncGetApi() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetApiRequest request = + GetApiRequest.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .build(); + ApiFuture future = registryClient.getApiCallable().futureCall(request); + // Do something. + Api response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapi_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApi.java new file mode 100644 index 000000000000..96e21d0eaeee --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApi.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapi_sync] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.GetApiRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApi { + + public static void main(String[] args) throws Exception { + syncGetApi(); + } + + public static void syncGetApi() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetApiRequest request = + GetApiRequest.newBuilder() + .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .build(); + Api response = registryClient.getApi(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapi_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiApiname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiApiname.java new file mode 100644 index 000000000000..8ef92b439fab --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiApiname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapi_apiname_sync] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiApiname { + + public static void main(String[] args) throws Exception { + syncGetApiApiname(); + } + + public static void syncGetApiApiname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + Api response = registryClient.getApi(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapi_apiname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiString.java new file mode 100644 index 000000000000..e6653bd2ff7a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapi_string_sync] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiString { + + public static void main(String[] args) throws Exception { + syncGetApiString(); + } + + public static void syncGetApiString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); + Api response = registryClient.getApi(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapi_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/AsyncGetApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/AsyncGetApiDeployment.java new file mode 100644 index 000000000000..129a6f91eca7 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/AsyncGetApiDeployment.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapideployment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncGetApiDeployment { + + public static void main(String[] args) throws Exception { + asyncGetApiDeployment(); + } + + public static void asyncGetApiDeployment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetApiDeploymentRequest request = + GetApiDeploymentRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .build(); + ApiFuture future = + registryClient.getApiDeploymentCallable().futureCall(request); + // Do something. + ApiDeployment response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapideployment_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeployment.java new file mode 100644 index 000000000000..47688d279679 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeployment.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapideployment_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiDeployment { + + public static void main(String[] args) throws Exception { + syncGetApiDeployment(); + } + + public static void syncGetApiDeployment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetApiDeploymentRequest request = + GetApiDeploymentRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .build(); + ApiDeployment response = registryClient.getApiDeployment(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapideployment_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentApideploymentname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentApideploymentname.java new file mode 100644 index 000000000000..2bff363189cc --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentApideploymentname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapideployment_apideploymentname_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiDeploymentApideploymentname { + + public static void main(String[] args) throws Exception { + syncGetApiDeploymentApideploymentname(); + } + + public static void syncGetApiDeploymentApideploymentname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiDeploymentName name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + ApiDeployment response = registryClient.getApiDeployment(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapideployment_apideploymentname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentString.java new file mode 100644 index 000000000000..0952cb27aca4 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapideployment_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiDeploymentString { + + public static void main(String[] args) throws Exception { + syncGetApiDeploymentString(); + } + + public static void syncGetApiDeploymentString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString(); + ApiDeployment response = registryClient.getApiDeployment(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapideployment_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/AsyncGetApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/AsyncGetApiSpec.java new file mode 100644 index 000000000000..ae15cf674c9f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/AsyncGetApiSpec.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapispec_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncGetApiSpec { + + public static void main(String[] args) throws Exception { + asyncGetApiSpec(); + } + + public static void asyncGetApiSpec() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetApiSpecRequest request = + GetApiSpecRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .build(); + ApiFuture future = registryClient.getApiSpecCallable().futureCall(request); + // Do something. + ApiSpec response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapispec_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpec.java new file mode 100644 index 000000000000..e0a38647c537 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpec.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapispec_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiSpec { + + public static void main(String[] args) throws Exception { + syncGetApiSpec(); + } + + public static void syncGetApiSpec() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetApiSpecRequest request = + GetApiSpecRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .build(); + ApiSpec response = registryClient.getApiSpec(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapispec_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecApispecname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecApispecname.java new file mode 100644 index 000000000000..30a6e96cd936 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecApispecname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapispec_apispecname_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiSpecApispecname { + + public static void main(String[] args) throws Exception { + syncGetApiSpecApispecname(); + } + + public static void syncGetApiSpecApispecname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + ApiSpec response = registryClient.getApiSpec(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapispec_apispecname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecString.java new file mode 100644 index 000000000000..59370a394473 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapispec_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiSpecString { + + public static void main(String[] args) throws Exception { + syncGetApiSpecString(); + } + + public static void syncGetApiSpecString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString(); + ApiSpec response = registryClient.getApiSpec(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapispec_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/AsyncGetApiSpecContents.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/AsyncGetApiSpecContents.java new file mode 100644 index 000000000000..1d4a0934285e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/AsyncGetApiSpecContents.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapispeccontents_async] +import com.google.api.HttpBody; +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncGetApiSpecContents { + + public static void main(String[] args) throws Exception { + asyncGetApiSpecContents(); + } + + public static void asyncGetApiSpecContents() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetApiSpecContentsRequest request = + GetApiSpecContentsRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .build(); + ApiFuture future = registryClient.getApiSpecContentsCallable().futureCall(request); + // Do something. + HttpBody response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapispeccontents_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContents.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContents.java new file mode 100644 index 000000000000..4263041724e3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContents.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapispeccontents_sync] +import com.google.api.HttpBody; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiSpecContents { + + public static void main(String[] args) throws Exception { + syncGetApiSpecContents(); + } + + public static void syncGetApiSpecContents() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetApiSpecContentsRequest request = + GetApiSpecContentsRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .build(); + HttpBody response = registryClient.getApiSpecContents(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapispeccontents_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsApispecname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsApispecname.java new file mode 100644 index 000000000000..c13da2b7f90f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsApispecname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapispeccontents_apispecname_sync] +import com.google.api.HttpBody; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiSpecContentsApispecname { + + public static void main(String[] args) throws Exception { + syncGetApiSpecContentsApispecname(); + } + + public static void syncGetApiSpecContentsApispecname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + HttpBody response = registryClient.getApiSpecContents(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapispeccontents_apispecname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsString.java new file mode 100644 index 000000000000..a6fe06f69d58 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapispeccontents_string_sync] +import com.google.api.HttpBody; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiSpecContentsString { + + public static void main(String[] args) throws Exception { + syncGetApiSpecContentsString(); + } + + public static void syncGetApiSpecContentsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString(); + HttpBody response = registryClient.getApiSpecContents(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapispeccontents_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/AsyncGetApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/AsyncGetApiVersion.java new file mode 100644 index 000000000000..392fc75b3dca --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/AsyncGetApiVersion.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapiversion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncGetApiVersion { + + public static void main(String[] args) throws Exception { + asyncGetApiVersion(); + } + + public static void asyncGetApiVersion() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetApiVersionRequest request = + GetApiVersionRequest.newBuilder() + .setName( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .build(); + ApiFuture future = registryClient.getApiVersionCallable().futureCall(request); + // Do something. + ApiVersion response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapiversion_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersion.java new file mode 100644 index 000000000000..9b56a77e6e40 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersion.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapiversion_sync] +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiVersion { + + public static void main(String[] args) throws Exception { + syncGetApiVersion(); + } + + public static void syncGetApiVersion() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetApiVersionRequest request = + GetApiVersionRequest.newBuilder() + .setName( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .build(); + ApiVersion response = registryClient.getApiVersion(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapiversion_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionApiversionname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionApiversionname.java new file mode 100644 index 000000000000..c5b279d24f23 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionApiversionname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapiversion_apiversionname_sync] +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiVersionApiversionname { + + public static void main(String[] args) throws Exception { + syncGetApiVersionApiversionname(); + } + + public static void syncGetApiVersionApiversionname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + ApiVersion response = registryClient.getApiVersion(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapiversion_apiversionname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionString.java new file mode 100644 index 000000000000..e40456364d63 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getapiversion_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetApiVersionString { + + public static void main(String[] args) throws Exception { + syncGetApiVersionString(); + } + + public static void syncGetApiVersionString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString(); + ApiVersion response = registryClient.getApiVersion(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getapiversion_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/AsyncGetArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/AsyncGetArtifact.java new file mode 100644 index 000000000000..ffc69903c221 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/AsyncGetArtifact.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getartifact_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncGetArtifact { + + public static void main(String[] args) throws Exception { + asyncGetArtifact(); + } + + public static void asyncGetArtifact() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetArtifactRequest request = + GetArtifactRequest.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName( + "[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .build(); + ApiFuture future = registryClient.getArtifactCallable().futureCall(request); + // Do something. + Artifact response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getartifact_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifact.java new file mode 100644 index 000000000000..c4ffa6b1eb6a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifact.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getartifact_sync] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetArtifact { + + public static void main(String[] args) throws Exception { + syncGetArtifact(); + } + + public static void syncGetArtifact() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetArtifactRequest request = + GetArtifactRequest.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName( + "[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .build(); + Artifact response = registryClient.getArtifact(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getartifact_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactArtifactname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactArtifactname.java new file mode 100644 index 000000000000..7ee303331391 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactArtifactname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getartifact_artifactname_sync] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetArtifactArtifactname { + + public static void main(String[] args) throws Exception { + syncGetArtifactArtifactname(); + } + + public static void syncGetArtifactArtifactname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + Artifact response = registryClient.getArtifact(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getartifact_artifactname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactString.java new file mode 100644 index 000000000000..400da6251e22 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getartifact_string_sync] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetArtifactString { + + public static void main(String[] args) throws Exception { + syncGetArtifactString(); + } + + public static void syncGetArtifactString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString(); + Artifact response = registryClient.getArtifact(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getartifact_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/AsyncGetArtifactContents.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/AsyncGetArtifactContents.java new file mode 100644 index 000000000000..36fa78db2d7f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/AsyncGetArtifactContents.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getartifactcontents_async] +import com.google.api.HttpBody; +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncGetArtifactContents { + + public static void main(String[] args) throws Exception { + asyncGetArtifactContents(); + } + + public static void asyncGetArtifactContents() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetArtifactContentsRequest request = + GetArtifactContentsRequest.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName( + "[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .build(); + ApiFuture future = registryClient.getArtifactContentsCallable().futureCall(request); + // Do something. + HttpBody response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getartifactcontents_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContents.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContents.java new file mode 100644 index 000000000000..0410932439da --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContents.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getartifactcontents_sync] +import com.google.api.HttpBody; +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetArtifactContents { + + public static void main(String[] args) throws Exception { + syncGetArtifactContents(); + } + + public static void syncGetArtifactContents() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetArtifactContentsRequest request = + GetArtifactContentsRequest.newBuilder() + .setName( + ArtifactName.ofProjectLocationArtifactName( + "[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString()) + .build(); + HttpBody response = registryClient.getArtifactContents(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getartifactcontents_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsArtifactname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsArtifactname.java new file mode 100644 index 000000000000..bd2315bec91c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsArtifactname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getartifactcontents_artifactname_sync] +import com.google.api.HttpBody; +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetArtifactContentsArtifactname { + + public static void main(String[] args) throws Exception { + syncGetArtifactContentsArtifactname(); + } + + public static void syncGetArtifactContentsArtifactname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ArtifactName name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); + HttpBody response = registryClient.getArtifactContents(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getartifactcontents_artifactname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsString.java new file mode 100644 index 000000000000..ad116cc614b5 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getartifactcontents_string_sync] +import com.google.api.HttpBody; +import com.google.cloud.apigeeregistry.v1.ArtifactName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncGetArtifactContentsString { + + public static void main(String[] args) throws Exception { + syncGetArtifactContentsString(); + } + + public static void syncGetArtifactContentsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String name = + ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") + .toString(); + HttpBody response = registryClient.getArtifactContents(name); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getartifactcontents_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/AsyncGetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..a53072cab93c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = registryClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getiampolicy_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/SyncGetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..10cf2ffc4f97 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getiampolicy_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = registryClient.getIamPolicy(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getiampolicy_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..8e63ded819d5 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/AsyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getlocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = registryClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getlocation_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/SyncGetLocation.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..823871f6a5f3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/SyncGetLocation.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_getlocation_sync] +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = registryClient.getLocation(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_getlocation_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisions.java new file mode 100644 index 000000000000..5656ad339ad9 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisions.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncListApiDeploymentRevisions { + + public static void main(String[] args) throws Exception { + asyncListApiDeploymentRevisions(); + } + + public static void asyncListApiDeploymentRevisions() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiDeploymentRevisionsRequest request = + ListApiDeploymentRevisionsRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + registryClient.listApiDeploymentRevisionsPagedCallable().futureCall(request); + // Do something. + for (ApiDeployment element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisionsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisionsPaged.java new file mode 100644 index 000000000000..615cde788541 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisionsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_paged_async] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.common.base.Strings; + +public class AsyncListApiDeploymentRevisionsPaged { + + public static void main(String[] args) throws Exception { + asyncListApiDeploymentRevisionsPaged(); + } + + public static void asyncListApiDeploymentRevisionsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiDeploymentRevisionsRequest request = + ListApiDeploymentRevisionsRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListApiDeploymentRevisionsResponse response = + registryClient.listApiDeploymentRevisionsCallable().call(request); + for (ApiDeployment element : response.getApiDeploymentsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/SyncListApiDeploymentRevisions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/SyncListApiDeploymentRevisions.java new file mode 100644 index 000000000000..e7edf95813d6 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/SyncListApiDeploymentRevisions.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApiDeploymentRevisions { + + public static void main(String[] args) throws Exception { + syncListApiDeploymentRevisions(); + } + + public static void syncListApiDeploymentRevisions() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiDeploymentRevisionsRequest request = + ListApiDeploymentRevisionsRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (ApiDeployment element : + registryClient.listApiDeploymentRevisions(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeployments.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeployments.java new file mode 100644 index 000000000000..0299a4a42797 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeployments.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapideployments_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncListApiDeployments { + + public static void main(String[] args) throws Exception { + asyncListApiDeployments(); + } + + public static void asyncListApiDeployments() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiDeploymentsRequest request = + ListApiDeploymentsRequest.newBuilder() + .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + registryClient.listApiDeploymentsPagedCallable().futureCall(request); + // Do something. + for (ApiDeployment element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapideployments_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeploymentsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeploymentsPaged.java new file mode 100644 index 000000000000..253a7761aaf0 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeploymentsPaged.java @@ -0,0 +1,60 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapideployments_paged_async] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.common.base.Strings; + +public class AsyncListApiDeploymentsPaged { + + public static void main(String[] args) throws Exception { + asyncListApiDeploymentsPaged(); + } + + public static void asyncListApiDeploymentsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiDeploymentsRequest request = + ListApiDeploymentsRequest.newBuilder() + .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListApiDeploymentsResponse response = + registryClient.listApiDeploymentsCallable().call(request); + for (ApiDeployment element : response.getApiDeploymentsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapideployments_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeployments.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeployments.java new file mode 100644 index 000000000000..dddb6882673e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeployments.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapideployments_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApiDeployments { + + public static void main(String[] args) throws Exception { + syncListApiDeployments(); + } + + public static void syncListApiDeployments() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiDeploymentsRequest request = + ListApiDeploymentsRequest.newBuilder() + .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (ApiDeployment element : registryClient.listApiDeployments(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapideployments_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsApiname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsApiname.java new file mode 100644 index 000000000000..da6fe53e53df --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsApiname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapideployments_apiname_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApiDeploymentsApiname { + + public static void main(String[] args) throws Exception { + syncListApiDeploymentsApiname(); + } + + public static void syncListApiDeploymentsApiname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + for (ApiDeployment element : registryClient.listApiDeployments(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapideployments_apiname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsString.java new file mode 100644 index 000000000000..de91a34fdbad --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapideployments_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApiDeploymentsString { + + public static void main(String[] args) throws Exception { + syncListApiDeploymentsString(); + } + + public static void syncListApiDeploymentsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); + for (ApiDeployment element : registryClient.listApiDeployments(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapideployments_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApis.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApis.java new file mode 100644 index 000000000000..73d6c2ba933e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApis.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapis_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.ListApisRequest; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncListApis { + + public static void main(String[] args) throws Exception { + asyncListApis(); + } + + public static void asyncListApis() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApisRequest request = + ListApisRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = registryClient.listApisPagedCallable().futureCall(request); + // Do something. + for (Api element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapis_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApisPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApisPaged.java new file mode 100644 index 000000000000..5ff4585c7aa6 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApisPaged.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapis_paged_async] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.ListApisRequest; +import com.google.cloud.apigeeregistry.v1.ListApisResponse; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.common.base.Strings; + +public class AsyncListApisPaged { + + public static void main(String[] args) throws Exception { + asyncListApisPaged(); + } + + public static void asyncListApisPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApisRequest request = + ListApisRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListApisResponse response = registryClient.listApisCallable().call(request); + for (Api element : response.getApisList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapis_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApis.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApis.java new file mode 100644 index 000000000000..9324ee665153 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApis.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapis_sync] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.ListApisRequest; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApis { + + public static void main(String[] args) throws Exception { + syncListApis(); + } + + public static void syncListApis() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApisRequest request = + ListApisRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (Api element : registryClient.listApis(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapis_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisLocationname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisLocationname.java new file mode 100644 index 000000000000..18625c55cdac --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisLocationname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapis_locationname_sync] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApisLocationname { + + public static void main(String[] args) throws Exception { + syncListApisLocationname(); + } + + public static void syncListApisLocationname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Api element : registryClient.listApis(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapis_locationname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisString.java new file mode 100644 index 000000000000..3419696c3432 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapis_string_sync] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApisString { + + public static void main(String[] args) throws Exception { + syncListApisString(); + } + + public static void syncListApisString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Api element : registryClient.listApis(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapis_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisions.java new file mode 100644 index 000000000000..3580ce5e48e2 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisions.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapispecrevisions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncListApiSpecRevisions { + + public static void main(String[] args) throws Exception { + asyncListApiSpecRevisions(); + } + + public static void asyncListApiSpecRevisions() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiSpecRevisionsRequest request = + ListApiSpecRevisionsRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + registryClient.listApiSpecRevisionsPagedCallable().futureCall(request); + // Do something. + for (ApiSpec element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapispecrevisions_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisionsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisionsPaged.java new file mode 100644 index 000000000000..44ce4d915801 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisionsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapispecrevisions_paged_async] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.common.base.Strings; + +public class AsyncListApiSpecRevisionsPaged { + + public static void main(String[] args) throws Exception { + asyncListApiSpecRevisionsPaged(); + } + + public static void asyncListApiSpecRevisionsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiSpecRevisionsRequest request = + ListApiSpecRevisionsRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListApiSpecRevisionsResponse response = + registryClient.listApiSpecRevisionsCallable().call(request); + for (ApiSpec element : response.getApiSpecsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapispecrevisions_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/SyncListApiSpecRevisions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/SyncListApiSpecRevisions.java new file mode 100644 index 000000000000..82546dc920db --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/SyncListApiSpecRevisions.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapispecrevisions_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApiSpecRevisions { + + public static void main(String[] args) throws Exception { + syncListApiSpecRevisions(); + } + + public static void syncListApiSpecRevisions() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiSpecRevisionsRequest request = + ListApiSpecRevisionsRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (ApiSpec element : registryClient.listApiSpecRevisions(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapispecrevisions_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecs.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecs.java new file mode 100644 index 000000000000..bf7d21357af0 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecs.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapispecs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncListApiSpecs { + + public static void main(String[] args) throws Exception { + asyncListApiSpecs(); + } + + public static void asyncListApiSpecs() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiSpecsRequest request = + ListApiSpecsRequest.newBuilder() + .setParent( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = registryClient.listApiSpecsPagedCallable().futureCall(request); + // Do something. + for (ApiSpec element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapispecs_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecsPaged.java new file mode 100644 index 000000000000..2777f1ea73f2 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecsPaged.java @@ -0,0 +1,60 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapispecs_paged_async] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.common.base.Strings; + +public class AsyncListApiSpecsPaged { + + public static void main(String[] args) throws Exception { + asyncListApiSpecsPaged(); + } + + public static void asyncListApiSpecsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiSpecsRequest request = + ListApiSpecsRequest.newBuilder() + .setParent( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListApiSpecsResponse response = registryClient.listApiSpecsCallable().call(request); + for (ApiSpec element : response.getApiSpecsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapispecs_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecs.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecs.java new file mode 100644 index 000000000000..8845b03f4b36 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecs.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapispecs_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApiSpecs { + + public static void main(String[] args) throws Exception { + syncListApiSpecs(); + } + + public static void syncListApiSpecs() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiSpecsRequest request = + ListApiSpecsRequest.newBuilder() + .setParent( + ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (ApiSpec element : registryClient.listApiSpecs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapispecs_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsApiversionname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsApiversionname.java new file mode 100644 index 000000000000..58d07cf7984c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsApiversionname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapispecs_apiversionname_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApiSpecsApiversionname { + + public static void main(String[] args) throws Exception { + syncListApiSpecsApiversionname(); + } + + public static void syncListApiSpecsApiversionname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + for (ApiSpec element : registryClient.listApiSpecs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapispecs_apiversionname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsString.java new file mode 100644 index 000000000000..07c6787884c6 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapispecs_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApiSpecsString { + + public static void main(String[] args) throws Exception { + syncListApiSpecsString(); + } + + public static void syncListApiSpecsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString(); + for (ApiSpec element : registryClient.listApiSpecs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapispecs_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersions.java new file mode 100644 index 000000000000..fdb41615ede3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersions.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapiversions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncListApiVersions { + + public static void main(String[] args) throws Exception { + asyncListApiVersions(); + } + + public static void asyncListApiVersions() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiVersionsRequest request = + ListApiVersionsRequest.newBuilder() + .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + registryClient.listApiVersionsPagedCallable().futureCall(request); + // Do something. + for (ApiVersion element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapiversions_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersionsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersionsPaged.java new file mode 100644 index 000000000000..5190567e902b --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersionsPaged.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapiversions_paged_async] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.common.base.Strings; + +public class AsyncListApiVersionsPaged { + + public static void main(String[] args) throws Exception { + asyncListApiVersionsPaged(); + } + + public static void asyncListApiVersionsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiVersionsRequest request = + ListApiVersionsRequest.newBuilder() + .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListApiVersionsResponse response = registryClient.listApiVersionsCallable().call(request); + for (ApiVersion element : response.getApiVersionsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapiversions_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersions.java new file mode 100644 index 000000000000..1fb8ef3b5748 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersions.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapiversions_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApiVersions { + + public static void main(String[] args) throws Exception { + syncListApiVersions(); + } + + public static void syncListApiVersions() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListApiVersionsRequest request = + ListApiVersionsRequest.newBuilder() + .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (ApiVersion element : registryClient.listApiVersions(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapiversions_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsApiname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsApiname.java new file mode 100644 index 000000000000..c12418cf1f5f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsApiname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapiversions_apiname_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApiVersionsApiname { + + public static void main(String[] args) throws Exception { + syncListApiVersionsApiname(); + } + + public static void syncListApiVersionsApiname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + for (ApiVersion element : registryClient.listApiVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapiversions_apiname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsString.java new file mode 100644 index 000000000000..0b4c9f8cb64b --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listapiversions_string_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListApiVersionsString { + + public static void main(String[] args) throws Exception { + syncListApiVersionsString(); + } + + public static void syncListApiVersionsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); + for (ApiVersion element : registryClient.listApiVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listapiversions_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifacts.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifacts.java new file mode 100644 index 000000000000..0051809ad05e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifacts.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listartifacts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class AsyncListArtifacts { + + public static void main(String[] args) throws Exception { + asyncListArtifacts(); + } + + public static void asyncListArtifacts() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListArtifactsRequest request = + ListArtifactsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = registryClient.listArtifactsPagedCallable().futureCall(request); + // Do something. + for (Artifact element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listartifacts_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifactsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifactsPaged.java new file mode 100644 index 000000000000..0a6b8453eef5 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifactsPaged.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listartifacts_paged_async] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; +import com.google.cloud.apigeeregistry.v1.ListArtifactsResponse; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.common.base.Strings; + +public class AsyncListArtifactsPaged { + + public static void main(String[] args) throws Exception { + asyncListArtifactsPaged(); + } + + public static void asyncListArtifactsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListArtifactsRequest request = + ListArtifactsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListArtifactsResponse response = registryClient.listArtifactsCallable().call(request); + for (Artifact element : response.getArtifactsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listartifacts_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifacts.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifacts.java new file mode 100644 index 000000000000..fd615e118771 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifacts.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listartifacts_sync] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListArtifacts { + + public static void main(String[] args) throws Exception { + syncListArtifacts(); + } + + public static void syncListArtifacts() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListArtifactsRequest request = + ListArtifactsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (Artifact element : registryClient.listArtifacts(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listartifacts_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApideploymentname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApideploymentname.java new file mode 100644 index 000000000000..1cdb0f1c956f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApideploymentname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listartifacts_apideploymentname_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListArtifactsApideploymentname { + + public static void main(String[] args) throws Exception { + syncListArtifactsApideploymentname(); + } + + public static void syncListArtifactsApideploymentname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiDeploymentName parent = + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); + for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listartifacts_apideploymentname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiname.java new file mode 100644 index 000000000000..984fa15cf138 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listartifacts_apiname_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListArtifactsApiname { + + public static void main(String[] args) throws Exception { + syncListArtifactsApiname(); + } + + public static void syncListArtifactsApiname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); + for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listartifacts_apiname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApispecname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApispecname.java new file mode 100644 index 000000000000..9cab7f5f45e5 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApispecname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listartifacts_apispecname_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListArtifactsApispecname { + + public static void main(String[] args) throws Exception { + syncListArtifactsApispecname(); + } + + public static void syncListArtifactsApispecname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiSpecName parent = + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); + for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listartifacts_apispecname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiversionname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiversionname.java new file mode 100644 index 000000000000..a2254f141067 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiversionname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listartifacts_apiversionname_sync] +import com.google.cloud.apigeeregistry.v1.ApiVersionName; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListArtifactsApiversionname { + + public static void main(String[] args) throws Exception { + syncListArtifactsApiversionname(); + } + + public static void syncListArtifactsApiversionname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listartifacts_apiversionname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsLocationname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsLocationname.java new file mode 100644 index 000000000000..c42e32bbcff6 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsLocationname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listartifacts_locationname_sync] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListArtifactsLocationname { + + public static void main(String[] args) throws Exception { + syncListArtifactsLocationname(); + } + + public static void syncListArtifactsLocationname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listartifacts_locationname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsString.java new file mode 100644 index 000000000000..a0325da34c81 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listartifacts_string_sync] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.LocationName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncListArtifactsString { + + public static void main(String[] args) throws Exception { + syncListArtifactsString(); + } + + public static void syncListArtifactsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listartifacts_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocations.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..d0c49739358f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listlocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = registryClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listlocations_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..676517e644e8 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,58 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listlocations_paged_async] +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = registryClient.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 apigeeregistry_v1_generated_registryclient_listlocations_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/SyncListLocations.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..3d2c7b2be33a --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/SyncListLocations.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_listlocations_sync] +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : registryClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END apigeeregistry_v1_generated_registryclient_listlocations_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/AsyncReplaceArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/AsyncReplaceArtifact.java new file mode 100644 index 000000000000..73c9abb210f4 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/AsyncReplaceArtifact.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_replaceartifact_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; + +public class AsyncReplaceArtifact { + + public static void main(String[] args) throws Exception { + asyncReplaceArtifact(); + } + + public static void asyncReplaceArtifact() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ReplaceArtifactRequest request = + ReplaceArtifactRequest.newBuilder().setArtifact(Artifact.newBuilder().build()).build(); + ApiFuture future = registryClient.replaceArtifactCallable().futureCall(request); + // Do something. + Artifact response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_replaceartifact_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifact.java new file mode 100644 index 000000000000..2c06353f97b3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifact.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_replaceartifact_sync] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; + +public class SyncReplaceArtifact { + + public static void main(String[] args) throws Exception { + syncReplaceArtifact(); + } + + public static void syncReplaceArtifact() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ReplaceArtifactRequest request = + ReplaceArtifactRequest.newBuilder().setArtifact(Artifact.newBuilder().build()).build(); + Artifact response = registryClient.replaceArtifact(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_replaceartifact_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifactArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifactArtifact.java new file mode 100644 index 000000000000..0b42cdd1e7c0 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifactArtifact.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_replaceartifact_artifact_sync] +import com.google.cloud.apigeeregistry.v1.Artifact; +import com.google.cloud.apigeeregistry.v1.RegistryClient; + +public class SyncReplaceArtifactArtifact { + + public static void main(String[] args) throws Exception { + syncReplaceArtifactArtifact(); + } + + public static void syncReplaceArtifactArtifact() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + Artifact artifact = Artifact.newBuilder().build(); + Artifact response = registryClient.replaceArtifact(artifact); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_replaceartifact_artifact_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/AsyncRollbackApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/AsyncRollbackApiDeployment.java new file mode 100644 index 000000000000..07a106c038e9 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/AsyncRollbackApiDeployment.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_rollbackapideployment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; + +public class AsyncRollbackApiDeployment { + + public static void main(String[] args) throws Exception { + asyncRollbackApiDeployment(); + } + + public static void asyncRollbackApiDeployment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + RollbackApiDeploymentRequest request = + RollbackApiDeploymentRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setRevisionId("revisionId-1507445162") + .build(); + ApiFuture future = + registryClient.rollbackApiDeploymentCallable().futureCall(request); + // Do something. + ApiDeployment response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_rollbackapideployment_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/SyncRollbackApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/SyncRollbackApiDeployment.java new file mode 100644 index 000000000000..f3b555d0682d --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/SyncRollbackApiDeployment.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_rollbackapideployment_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; + +public class SyncRollbackApiDeployment { + + public static void main(String[] args) throws Exception { + syncRollbackApiDeployment(); + } + + public static void syncRollbackApiDeployment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + RollbackApiDeploymentRequest request = + RollbackApiDeploymentRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setRevisionId("revisionId-1507445162") + .build(); + ApiDeployment response = registryClient.rollbackApiDeployment(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_rollbackapideployment_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/AsyncRollbackApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/AsyncRollbackApiSpec.java new file mode 100644 index 000000000000..b86cbfecbeda --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/AsyncRollbackApiSpec.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_rollbackapispec_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; + +public class AsyncRollbackApiSpec { + + public static void main(String[] args) throws Exception { + asyncRollbackApiSpec(); + } + + public static void asyncRollbackApiSpec() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + RollbackApiSpecRequest request = + RollbackApiSpecRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setRevisionId("revisionId-1507445162") + .build(); + ApiFuture future = registryClient.rollbackApiSpecCallable().futureCall(request); + // Do something. + ApiSpec response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_rollbackapispec_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/SyncRollbackApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/SyncRollbackApiSpec.java new file mode 100644 index 000000000000..ac7ff6ea4a5f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/SyncRollbackApiSpec.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_rollbackapispec_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; + +public class SyncRollbackApiSpec { + + public static void main(String[] args) throws Exception { + syncRollbackApiSpec(); + } + + public static void syncRollbackApiSpec() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + RollbackApiSpecRequest request = + RollbackApiSpecRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setRevisionId("revisionId-1507445162") + .build(); + ApiSpec response = registryClient.rollbackApiSpec(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_rollbackapispec_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/AsyncSetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..7963d25cddb3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_setiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = registryClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_setiampolicy_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/SyncSetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..7d372e8e4b0c --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_setiampolicy_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = registryClient.setIamPolicy(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_setiampolicy_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/AsyncTagApiDeploymentRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/AsyncTagApiDeploymentRevision.java new file mode 100644 index 000000000000..5b6c0316231f --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/AsyncTagApiDeploymentRevision.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_tagapideploymentrevision_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; + +public class AsyncTagApiDeploymentRevision { + + public static void main(String[] args) throws Exception { + asyncTagApiDeploymentRevision(); + } + + public static void asyncTagApiDeploymentRevision() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + TagApiDeploymentRevisionRequest request = + TagApiDeploymentRevisionRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setTag("tag114586") + .build(); + ApiFuture future = + registryClient.tagApiDeploymentRevisionCallable().futureCall(request); + // Do something. + ApiDeployment response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_tagapideploymentrevision_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/SyncTagApiDeploymentRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/SyncTagApiDeploymentRevision.java new file mode 100644 index 000000000000..928a0038d9e5 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/SyncTagApiDeploymentRevision.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_tagapideploymentrevision_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; + +public class SyncTagApiDeploymentRevision { + + public static void main(String[] args) throws Exception { + syncTagApiDeploymentRevision(); + } + + public static void syncTagApiDeploymentRevision() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + TagApiDeploymentRevisionRequest request = + TagApiDeploymentRevisionRequest.newBuilder() + .setName( + ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") + .toString()) + .setTag("tag114586") + .build(); + ApiDeployment response = registryClient.tagApiDeploymentRevision(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_tagapideploymentrevision_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/AsyncTagApiSpecRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/AsyncTagApiSpecRevision.java new file mode 100644 index 000000000000..9123d1aaa3d2 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/AsyncTagApiSpecRevision.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_tagapispecrevision_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; + +public class AsyncTagApiSpecRevision { + + public static void main(String[] args) throws Exception { + asyncTagApiSpecRevision(); + } + + public static void asyncTagApiSpecRevision() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + TagApiSpecRevisionRequest request = + TagApiSpecRevisionRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setTag("tag114586") + .build(); + ApiFuture future = registryClient.tagApiSpecRevisionCallable().futureCall(request); + // Do something. + ApiSpec response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_tagapispecrevision_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/SyncTagApiSpecRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/SyncTagApiSpecRevision.java new file mode 100644 index 000000000000..12aa550553f6 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/SyncTagApiSpecRevision.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_tagapispecrevision_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.ApiSpecName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; + +public class SyncTagApiSpecRevision { + + public static void main(String[] args) throws Exception { + syncTagApiSpecRevision(); + } + + public static void syncTagApiSpecRevision() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + TagApiSpecRevisionRequest request = + TagApiSpecRevisionRequest.newBuilder() + .setName( + ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") + .toString()) + .setTag("tag114586") + .build(); + ApiSpec response = registryClient.tagApiSpecRevision(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_tagapispecrevision_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/AsyncTestIamPermissions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..56a0323c0d7d --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_testiampermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + registryClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_testiampermissions_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/SyncTestIamPermissions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..b567d5c389c5 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_testiampermissions_sync] +import com.google.cloud.apigeeregistry.v1.ApiName; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = registryClient.testIamPermissions(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_testiampermissions_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/AsyncUpdateApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/AsyncUpdateApi.java new file mode 100644 index 000000000000..ee54ffa51d26 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/AsyncUpdateApi.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapi_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateApi { + + public static void main(String[] args) throws Exception { + asyncUpdateApi(); + } + + public static void asyncUpdateApi() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + UpdateApiRequest request = + UpdateApiRequest.newBuilder() + .setApi(Api.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setAllowMissing(true) + .build(); + ApiFuture future = registryClient.updateApiCallable().futureCall(request); + // Do something. + Api response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapi_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApi.java new file mode 100644 index 000000000000..125841bd728d --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApi.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapi_sync] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateApi { + + public static void main(String[] args) throws Exception { + syncUpdateApi(); + } + + public static void syncUpdateApi() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + UpdateApiRequest request = + UpdateApiRequest.newBuilder() + .setApi(Api.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setAllowMissing(true) + .build(); + Api response = registryClient.updateApi(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapi_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApiApiFieldmask.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApiApiFieldmask.java new file mode 100644 index 000000000000..0f631b0525a3 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApiApiFieldmask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapi_apifieldmask_sync] +import com.google.cloud.apigeeregistry.v1.Api; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateApiApiFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateApiApiFieldmask(); + } + + public static void syncUpdateApiApiFieldmask() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + Api api = Api.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Api response = registryClient.updateApi(api, updateMask); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapi_apifieldmask_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/AsyncUpdateApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/AsyncUpdateApiDeployment.java new file mode 100644 index 000000000000..e4e1db217822 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/AsyncUpdateApiDeployment.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapideployment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateApiDeployment { + + public static void main(String[] args) throws Exception { + asyncUpdateApiDeployment(); + } + + public static void asyncUpdateApiDeployment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + UpdateApiDeploymentRequest request = + UpdateApiDeploymentRequest.newBuilder() + .setApiDeployment(ApiDeployment.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setAllowMissing(true) + .build(); + ApiFuture future = + registryClient.updateApiDeploymentCallable().futureCall(request); + // Do something. + ApiDeployment response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapideployment_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeployment.java new file mode 100644 index 000000000000..a0a6746f08ce --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeployment.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapideployment_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateApiDeployment { + + public static void main(String[] args) throws Exception { + syncUpdateApiDeployment(); + } + + public static void syncUpdateApiDeployment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + UpdateApiDeploymentRequest request = + UpdateApiDeploymentRequest.newBuilder() + .setApiDeployment(ApiDeployment.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setAllowMissing(true) + .build(); + ApiDeployment response = registryClient.updateApiDeployment(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapideployment_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeploymentApideploymentFieldmask.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeploymentApideploymentFieldmask.java new file mode 100644 index 000000000000..44f18b3919cf --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeploymentApideploymentFieldmask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapideployment_apideploymentfieldmask_sync] +import com.google.cloud.apigeeregistry.v1.ApiDeployment; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateApiDeploymentApideploymentFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateApiDeploymentApideploymentFieldmask(); + } + + public static void syncUpdateApiDeploymentApideploymentFieldmask() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + ApiDeployment response = registryClient.updateApiDeployment(apiDeployment, updateMask); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapideployment_apideploymentfieldmask_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/AsyncUpdateApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/AsyncUpdateApiSpec.java new file mode 100644 index 000000000000..42c102d2d031 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/AsyncUpdateApiSpec.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapispec_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateApiSpec { + + public static void main(String[] args) throws Exception { + asyncUpdateApiSpec(); + } + + public static void asyncUpdateApiSpec() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + UpdateApiSpecRequest request = + UpdateApiSpecRequest.newBuilder() + .setApiSpec(ApiSpec.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setAllowMissing(true) + .build(); + ApiFuture future = registryClient.updateApiSpecCallable().futureCall(request); + // Do something. + ApiSpec response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapispec_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpec.java new file mode 100644 index 000000000000..56b4fbb452aa --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpec.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapispec_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateApiSpec { + + public static void main(String[] args) throws Exception { + syncUpdateApiSpec(); + } + + public static void syncUpdateApiSpec() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + UpdateApiSpecRequest request = + UpdateApiSpecRequest.newBuilder() + .setApiSpec(ApiSpec.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setAllowMissing(true) + .build(); + ApiSpec response = registryClient.updateApiSpec(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapispec_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpecApispecFieldmask.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpecApispecFieldmask.java new file mode 100644 index 000000000000..9060fc6a875b --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpecApispecFieldmask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapispec_apispecfieldmask_sync] +import com.google.cloud.apigeeregistry.v1.ApiSpec; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateApiSpecApispecFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateApiSpecApispecFieldmask(); + } + + public static void syncUpdateApiSpecApispecFieldmask() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiSpec apiSpec = ApiSpec.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + ApiSpec response = registryClient.updateApiSpec(apiSpec, updateMask); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapispec_apispecfieldmask_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/AsyncUpdateApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/AsyncUpdateApiVersion.java new file mode 100644 index 000000000000..0b14a830ca6b --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/AsyncUpdateApiVersion.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapiversion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateApiVersion { + + public static void main(String[] args) throws Exception { + asyncUpdateApiVersion(); + } + + public static void asyncUpdateApiVersion() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + UpdateApiVersionRequest request = + UpdateApiVersionRequest.newBuilder() + .setApiVersion(ApiVersion.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setAllowMissing(true) + .build(); + ApiFuture future = registryClient.updateApiVersionCallable().futureCall(request); + // Do something. + ApiVersion response = future.get(); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapiversion_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersion.java new file mode 100644 index 000000000000..814ae104f0ec --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersion.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapiversion_sync] +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateApiVersion { + + public static void main(String[] args) throws Exception { + syncUpdateApiVersion(); + } + + public static void syncUpdateApiVersion() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + UpdateApiVersionRequest request = + UpdateApiVersionRequest.newBuilder() + .setApiVersion(ApiVersion.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setAllowMissing(true) + .build(); + ApiVersion response = registryClient.updateApiVersion(request); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapiversion_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersionApiversionFieldmask.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersionApiversionFieldmask.java new file mode 100644 index 000000000000..0e102b91b2f9 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersionApiversionFieldmask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registryclient_updateapiversion_apiversionfieldmask_sync] +import com.google.cloud.apigeeregistry.v1.ApiVersion; +import com.google.cloud.apigeeregistry.v1.RegistryClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateApiVersionApiversionFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateApiVersionApiversionFieldmask(); + } + + public static void syncUpdateApiVersionApiversionFieldmask() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (RegistryClient registryClient = RegistryClient.create()) { + ApiVersion apiVersion = ApiVersion.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + ApiVersion response = registryClient.updateApiVersion(apiVersion, updateMask); + } + } +} +// [END apigeeregistry_v1_generated_registryclient_updateapiversion_apiversionfieldmask_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registrysettings/getapi/SyncGetApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registrysettings/getapi/SyncGetApi.java new file mode 100644 index 000000000000..7b196b6b1f3e --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registrysettings/getapi/SyncGetApi.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.samples; + +// [START apigeeregistry_v1_generated_registrysettings_getapi_sync] +import com.google.cloud.apigeeregistry.v1.RegistrySettings; +import java.time.Duration; + +public class SyncGetApi { + + public static void main(String[] args) throws Exception { + syncGetApi(); + } + + public static void syncGetApi() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + RegistrySettings.Builder registrySettingsBuilder = RegistrySettings.newBuilder(); + registrySettingsBuilder + .getApiSettings() + .setRetrySettings( + registrySettingsBuilder + .getApiSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegistrySettings registrySettings = registrySettingsBuilder.build(); + } +} +// [END apigeeregistry_v1_generated_registrysettings_getapi_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/provisioningstubsettings/getinstance/SyncGetInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/provisioningstubsettings/getinstance/SyncGetInstance.java new file mode 100644 index 000000000000..b0108ac821d8 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/provisioningstubsettings/getinstance/SyncGetInstance.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub.samples; + +// [START apigeeregistry_v1_generated_provisioningstubsettings_getinstance_sync] +import com.google.cloud.apigeeregistry.v1.stub.ProvisioningStubSettings; +import java.time.Duration; + +public class SyncGetInstance { + + public static void main(String[] args) throws Exception { + syncGetInstance(); + } + + public static void syncGetInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ProvisioningStubSettings.Builder provisioningSettingsBuilder = + ProvisioningStubSettings.newBuilder(); + provisioningSettingsBuilder + .getInstanceSettings() + .setRetrySettings( + provisioningSettingsBuilder + .getInstanceSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProvisioningStubSettings provisioningSettings = provisioningSettingsBuilder.build(); + } +} +// [END apigeeregistry_v1_generated_provisioningstubsettings_getinstance_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/registrystubsettings/getapi/SyncGetApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/registrystubsettings/getapi/SyncGetApi.java new file mode 100644 index 000000000000..9452577469a1 --- /dev/null +++ b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/registrystubsettings/getapi/SyncGetApi.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apigeeregistry.v1.stub.samples; + +// [START apigeeregistry_v1_generated_registrystubsettings_getapi_sync] +import com.google.cloud.apigeeregistry.v1.stub.RegistryStubSettings; +import java.time.Duration; + +public class SyncGetApi { + + public static void main(String[] args) throws Exception { + syncGetApi(); + } + + public static void syncGetApi() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + RegistryStubSettings.Builder registrySettingsBuilder = RegistryStubSettings.newBuilder(); + registrySettingsBuilder + .getApiSettings() + .setRetrySettings( + registrySettingsBuilder + .getApiSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegistryStubSettings registrySettings = registrySettingsBuilder.build(); + } +} +// [END apigeeregistry_v1_generated_registrystubsettings_getapi_sync] From 493b89e481b5701858f64028da16b7c21f1f48f1 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 1 Sep 2022 21:03:45 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- java-apigee-registry/README.md | 6 +- .../v1/stub/RegistryStubSettings.java | 9 +- .../apigeeregistry/v1/ProvisioningClient.java | 994 ---- .../v1/ProvisioningSettings.java | 317 - .../apigeeregistry/v1/RegistryClient.java | 5082 ----------------- .../apigeeregistry/v1/RegistrySettings.java | 664 --- .../apigeeregistry/v1/gapic_metadata.json | 171 - .../cloud/apigeeregistry/v1/package-info.java | 56 - .../stub/GrpcProvisioningCallableFactory.java | 113 - .../v1/stub/GrpcProvisioningStub.java | 419 -- .../v1/stub/GrpcRegistryCallableFactory.java | 113 - .../v1/stub/GrpcRegistryStub.java | 1494 ----- .../HttpJsonProvisioningCallableFactory.java | 105 - .../v1/stub/HttpJsonProvisioningStub.java | 650 --- .../stub/HttpJsonRegistryCallableFactory.java | 105 - .../v1/stub/HttpJsonRegistryStub.java | 2428 -------- .../v1/stub/ProvisioningStub.java | 110 - .../v1/stub/ProvisioningStubSettings.java | 651 --- .../apigeeregistry/v1/stub/RegistryStub.java | 309 - .../v1/stub/RegistryStubSettings.java | 1844 ------ .../apigeeregistry/v1/MockIAMPolicy.java | 59 - .../apigeeregistry/v1/MockIAMPolicyImpl.java | 127 - .../apigeeregistry/v1/MockLocations.java | 59 - .../apigeeregistry/v1/MockLocationsImpl.java | 105 - .../apigeeregistry/v1/MockProvisioning.java | 59 - .../v1/MockProvisioningImpl.java | 123 - .../cloud/apigeeregistry/v1/MockRegistry.java | 59 - .../apigeeregistry/v1/MockRegistryImpl.java | 792 --- .../v1/ProvisioningClientHttpJsonTest.java | 676 --- .../v1/ProvisioningClientTest.java | 636 --- .../v1/RegistryClientHttpJsonTest.java | 4162 -------------- .../apigeeregistry/v1/RegistryClientTest.java | 3618 ------------ .../apigeeregistry/v1/ProvisioningGrpc.java | 480 -- .../cloud/apigeeregistry/v1/RegistryGrpc.java | 3287 ----------- .../google/cloud/apigeeregistry/v1/Api.java | 2694 --------- .../apigeeregistry/v1/ApiDeployment.java | 3462 ----------- .../apigeeregistry/v1/ApiDeploymentName.java | 258 - .../v1/ApiDeploymentOrBuilder.java | 458 -- .../cloud/apigeeregistry/v1/ApiName.java | 216 - .../cloud/apigeeregistry/v1/ApiOrBuilder.java | 363 -- .../cloud/apigeeregistry/v1/ApiSpec.java | 3347 ----------- .../cloud/apigeeregistry/v1/ApiSpecName.java | 288 - .../apigeeregistry/v1/ApiSpecOrBuilder.java | 451 -- .../cloud/apigeeregistry/v1/ApiVersion.java | 2355 -------- .../apigeeregistry/v1/ApiVersionName.java | 257 - .../v1/ApiVersionOrBuilder.java | 321 -- .../cloud/apigeeregistry/v1/Artifact.java | 1631 ------ .../cloud/apigeeregistry/v1/ArtifactName.java | 778 --- .../apigeeregistry/v1/ArtifactOrBuilder.java | 158 - .../v1/CreateApiDeploymentRequest.java | 1032 ---- .../CreateApiDeploymentRequestOrBuilder.java | 86 - .../apigeeregistry/v1/CreateApiRequest.java | 1032 ---- .../v1/CreateApiRequestOrBuilder.java | 86 - .../v1/CreateApiSpecRequest.java | 1032 ---- .../v1/CreateApiSpecRequestOrBuilder.java | 86 - .../v1/CreateApiVersionRequest.java | 1032 ---- .../v1/CreateApiVersionRequestOrBuilder.java | 86 - .../v1/CreateArtifactRequest.java | 1032 ---- .../v1/CreateArtifactRequestOrBuilder.java | 86 - .../v1/CreateInstanceRequest.java | 1004 ---- .../v1/CreateInstanceRequestOrBuilder.java | 78 - .../v1/DeleteApiDeploymentRequest.java | 687 --- .../DeleteApiDeploymentRequestOrBuilder.java | 42 - .../DeleteApiDeploymentRevisionRequest.java | 616 -- ...ApiDeploymentRevisionRequestOrBuilder.java | 35 - .../apigeeregistry/v1/DeleteApiRequest.java | 687 --- .../v1/DeleteApiRequestOrBuilder.java | 42 - .../v1/DeleteApiSpecRequest.java | 687 --- .../v1/DeleteApiSpecRequestOrBuilder.java | 42 - .../v1/DeleteApiSpecRevisionRequest.java | 616 -- ...DeleteApiSpecRevisionRequestOrBuilder.java | 35 - .../v1/DeleteApiVersionRequest.java | 687 --- .../v1/DeleteApiVersionRequestOrBuilder.java | 42 - .../v1/DeleteArtifactRequest.java | 602 -- .../v1/DeleteArtifactRequestOrBuilder.java | 31 - .../v1/DeleteInstanceRequest.java | 602 -- .../v1/DeleteInstanceRequestOrBuilder.java | 31 - .../v1/GetApiDeploymentRequest.java | 602 -- .../v1/GetApiDeploymentRequestOrBuilder.java | 31 - .../apigeeregistry/v1/GetApiRequest.java | 602 -- .../v1/GetApiRequestOrBuilder.java | 31 - .../v1/GetApiSpecContentsRequest.java | 602 -- .../GetApiSpecContentsRequestOrBuilder.java | 31 - .../apigeeregistry/v1/GetApiSpecRequest.java | 602 -- .../v1/GetApiSpecRequestOrBuilder.java | 31 - .../v1/GetApiVersionRequest.java | 602 -- .../v1/GetApiVersionRequestOrBuilder.java | 31 - .../v1/GetArtifactContentsRequest.java | 602 -- .../GetArtifactContentsRequestOrBuilder.java | 31 - .../apigeeregistry/v1/GetArtifactRequest.java | 602 -- .../v1/GetArtifactRequestOrBuilder.java | 31 - .../apigeeregistry/v1/GetInstanceRequest.java | 602 -- .../v1/GetInstanceRequestOrBuilder.java | 31 - .../cloud/apigeeregistry/v1/Instance.java | 2642 --------- .../cloud/apigeeregistry/v1/InstanceName.java | 223 - .../apigeeregistry/v1/InstanceOrBuilder.java | 151 - .../v1/ListApiDeploymentRevisionsRequest.java | 848 --- ...piDeploymentRevisionsRequestOrBuilder.java | 61 - .../ListApiDeploymentRevisionsResponse.java | 1045 ---- ...iDeploymentRevisionsResponseOrBuilder.java | 75 - .../v1/ListApiDeploymentsRequest.java | 1054 ---- .../ListApiDeploymentsRequestOrBuilder.java | 92 - .../v1/ListApiDeploymentsResponse.java | 1045 ---- .../ListApiDeploymentsResponseOrBuilder.java | 75 - .../v1/ListApiSpecRevisionsRequest.java | 848 --- .../ListApiSpecRevisionsRequestOrBuilder.java | 61 - .../v1/ListApiSpecRevisionsResponse.java | 1045 ---- ...ListApiSpecRevisionsResponseOrBuilder.java | 75 - .../v1/ListApiSpecsRequest.java | 1054 ---- .../v1/ListApiSpecsRequestOrBuilder.java | 92 - .../v1/ListApiSpecsResponse.java | 1045 ---- .../v1/ListApiSpecsResponseOrBuilder.java | 75 - .../v1/ListApiVersionsRequest.java | 1054 ---- .../v1/ListApiVersionsRequestOrBuilder.java | 92 - .../v1/ListApiVersionsResponse.java | 1045 ---- .../v1/ListApiVersionsResponseOrBuilder.java | 75 - .../apigeeregistry/v1/ListApisRequest.java | 1054 ---- .../v1/ListApisRequestOrBuilder.java | 92 - .../apigeeregistry/v1/ListApisResponse.java | 1045 ---- .../v1/ListApisResponseOrBuilder.java | 75 - .../v1/ListArtifactsRequest.java | 1054 ---- .../v1/ListArtifactsRequestOrBuilder.java | 92 - .../v1/ListArtifactsResponse.java | 1045 ---- .../v1/ListArtifactsResponseOrBuilder.java | 75 - .../cloud/apigeeregistry/v1/LocationName.java | 192 - .../apigeeregistry/v1/OperationMetadata.java | 1658 ------ .../v1/OperationMetadataOrBuilder.java | 156 - .../v1/ProvisioningServiceProto.java | 184 - .../v1/RegistryModelsProto.java | 290 - .../v1/RegistryServiceProto.java | 891 --- .../v1/ReplaceArtifactRequest.java | 689 --- .../v1/ReplaceArtifactRequestOrBuilder.java | 42 - .../v1/RollbackApiDeploymentRequest.java | 775 --- ...RollbackApiDeploymentRequestOrBuilder.java | 53 - .../v1/RollbackApiSpecRequest.java | 775 --- .../v1/RollbackApiSpecRequestOrBuilder.java | 53 - .../v1/TagApiDeploymentRevisionRequest.java | 768 --- ...ApiDeploymentRevisionRequestOrBuilder.java | 51 - .../v1/TagApiSpecRevisionRequest.java | 768 --- .../TagApiSpecRevisionRequestOrBuilder.java | 51 - .../v1/UpdateApiDeploymentRequest.java | 1046 ---- .../UpdateApiDeploymentRequestOrBuilder.java | 89 - .../apigeeregistry/v1/UpdateApiRequest.java | 1046 ---- .../v1/UpdateApiRequestOrBuilder.java | 89 - .../v1/UpdateApiSpecRequest.java | 1046 ---- .../v1/UpdateApiSpecRequestOrBuilder.java | 89 - .../v1/UpdateApiVersionRequest.java | 1046 ---- .../v1/UpdateApiVersionRequestOrBuilder.java | 89 - .../v1/provisioning_service.proto | 205 - .../apigeeregistry/v1/registry_models.proto | 364 -- .../apigeeregistry/v1/registry_service.proto | 1133 ---- .../SyncCreateSetCredentialsProvider.java | 41 - .../SyncCreateSetCredentialsProvider1.java | 40 - .../create/SyncCreateSetEndpoint.java | 38 - .../createinstance/AsyncCreateInstance.java | 49 - .../AsyncCreateInstanceLRO.java | 50 - .../createinstance/SyncCreateInstance.java | 45 - ...ateInstanceLocationnameInstanceString.java | 42 - ...yncCreateInstanceStringInstanceString.java | 42 - .../deleteinstance/AsyncDeleteInstance.java | 46 - .../AsyncDeleteInstanceLRO.java | 48 - .../deleteinstance/SyncDeleteInstance.java | 43 - .../SyncDeleteInstanceInstancename.java | 39 - .../SyncDeleteInstanceString.java | 39 - .../getiampolicy/AsyncGetIamPolicy.java | 48 - .../getiampolicy/SyncGetIamPolicy.java | 45 - .../getinstance/AsyncGetInstance.java | 46 - .../getinstance/SyncGetInstance.java | 43 - .../SyncGetInstanceInstancename.java | 39 - .../getinstance/SyncGetInstanceString.java | 39 - .../getlocation/AsyncGetLocation.java | 42 - .../getlocation/SyncGetLocation.java | 39 - .../listlocations/AsyncListLocations.java | 51 - .../AsyncListLocationsPaged.java | 58 - .../listlocations/SyncListLocations.java | 47 - .../setiampolicy/AsyncSetIamPolicy.java | 49 - .../setiampolicy/SyncSetIamPolicy.java | 46 - .../AsyncTestIamPermissions.java | 49 - .../SyncTestIamPermissions.java | 45 - .../getinstance/SyncGetInstance.java | 45 - .../SyncCreateSetCredentialsProvider.java | 41 - .../SyncCreateSetCredentialsProvider1.java | 40 - .../create/SyncCreateSetEndpoint.java | 38 - .../createapi/AsyncCreateApi.java | 48 - .../createapi/SyncCreateApi.java | 45 - .../SyncCreateApiLocationnameApiString.java | 41 - .../SyncCreateApiStringApiString.java | 41 - .../AsyncCreateApiDeployment.java | 49 - .../SyncCreateApiDeployment.java | 45 - ...iDeploymentApinameApideploymentString.java | 42 - ...piDeploymentStringApideploymentString.java | 42 - .../createapispec/AsyncCreateApiSpec.java | 49 - .../createapispec/SyncCreateApiSpec.java | 46 - ...ateApiSpecApiversionnameApispecString.java | 41 - .../SyncCreateApiSpecStringApispecString.java | 41 - .../AsyncCreateApiVersion.java | 48 - .../SyncCreateApiVersion.java | 45 - ...eateApiVersionApinameApiversionString.java | 41 - ...reateApiVersionStringApiversionString.java | 41 - .../createartifact/AsyncCreateArtifact.java | 48 - .../createartifact/SyncCreateArtifact.java | 45 - ...tifactApideploymentnameArtifactString.java | 42 - ...ncCreateArtifactApinameArtifactString.java | 41 - ...eateArtifactApispecnameArtifactString.java | 42 - ...eArtifactApiversionnameArtifactString.java | 41 - ...ateArtifactLocationnameArtifactString.java | 41 - ...yncCreateArtifactStringArtifactString.java | 41 - .../deleteapi/AsyncDeleteApi.java | 47 - .../deleteapi/SyncDeleteApi.java | 44 - .../deleteapi/SyncDeleteApiApiname.java | 39 - .../deleteapi/SyncDeleteApiString.java | 39 - .../AsyncDeleteApiDeployment.java | 49 - .../SyncDeleteApiDeployment.java | 46 - ...cDeleteApiDeploymentApideploymentname.java | 40 - .../SyncDeleteApiDeploymentString.java | 40 - .../AsyncDeleteApiDeploymentRevision.java | 49 - .../SyncDeleteApiDeploymentRevision.java | 45 - ...piDeploymentRevisionApideploymentname.java | 40 - ...SyncDeleteApiDeploymentRevisionString.java | 40 - .../deleteapispec/AsyncDeleteApiSpec.java | 49 - .../deleteapispec/SyncDeleteApiSpec.java | 46 - .../SyncDeleteApiSpecApispecname.java | 39 - .../SyncDeleteApiSpecString.java | 40 - .../AsyncDeleteApiSpecRevision.java | 49 - .../SyncDeleteApiSpecRevision.java | 45 - .../SyncDeleteApiSpecRevisionApispecname.java | 39 - .../SyncDeleteApiSpecRevisionString.java | 40 - .../AsyncDeleteApiVersion.java | 48 - .../SyncDeleteApiVersion.java | 45 - .../SyncDeleteApiVersionApiversionname.java | 39 - .../SyncDeleteApiVersionString.java | 39 - .../deleteartifact/AsyncDeleteArtifact.java | 49 - .../deleteartifact/SyncDeleteArtifact.java | 46 - .../SyncDeleteArtifactArtifactname.java | 40 - .../SyncDeleteArtifactString.java | 41 - .../v1/registryclient/getapi/AsyncGetApi.java | 46 - .../v1/registryclient/getapi/SyncGetApi.java | 43 - .../getapi/SyncGetApiApiname.java | 39 - .../getapi/SyncGetApiString.java | 39 - .../AsyncGetApiDeployment.java | 49 - .../SyncGetApiDeployment.java | 45 - ...SyncGetApiDeploymentApideploymentname.java | 40 - .../SyncGetApiDeploymentString.java | 40 - .../getapispec/AsyncGetApiSpec.java | 48 - .../getapispec/SyncGetApiSpec.java | 45 - .../getapispec/SyncGetApiSpecApispecname.java | 39 - .../getapispec/SyncGetApiSpecString.java | 40 - .../AsyncGetApiSpecContents.java | 48 - .../SyncGetApiSpecContents.java | 45 - .../SyncGetApiSpecContentsApispecname.java | 39 - .../SyncGetApiSpecContentsString.java | 40 - .../getapiversion/AsyncGetApiVersion.java | 47 - .../getapiversion/SyncGetApiVersion.java | 44 - .../SyncGetApiVersionApiversionname.java | 39 - .../SyncGetApiVersionString.java | 39 - .../getartifact/AsyncGetArtifact.java | 49 - .../getartifact/SyncGetArtifact.java | 46 - .../SyncGetArtifactArtifactname.java | 40 - .../getartifact/SyncGetArtifactString.java | 41 - .../AsyncGetArtifactContents.java | 49 - .../SyncGetArtifactContents.java | 46 - .../SyncGetArtifactContentsArtifactname.java | 40 - .../SyncGetArtifactContentsString.java | 41 - .../getiampolicy/AsyncGetIamPolicy.java | 48 - .../getiampolicy/SyncGetIamPolicy.java | 45 - .../getlocation/AsyncGetLocation.java | 42 - .../getlocation/SyncGetLocation.java | 39 - .../AsyncListApiDeploymentRevisions.java | 53 - .../AsyncListApiDeploymentRevisionsPaged.java | 61 - .../SyncListApiDeploymentRevisions.java | 50 - .../AsyncListApiDeployments.java | 52 - .../AsyncListApiDeploymentsPaged.java | 60 - .../SyncListApiDeployments.java | 48 - .../SyncListApiDeploymentsApiname.java | 41 - .../SyncListApiDeploymentsString.java | 41 - .../listapis/AsyncListApis.java | 51 - .../listapis/AsyncListApisPaged.java | 59 - .../registryclient/listapis/SyncListApis.java | 48 - .../listapis/SyncListApisLocationname.java | 41 - .../listapis/SyncListApisString.java | 41 - .../AsyncListApiSpecRevisions.java | 53 - .../AsyncListApiSpecRevisionsPaged.java | 61 - .../SyncListApiSpecRevisions.java | 49 - .../listapispecs/AsyncListApiSpecs.java | 52 - .../listapispecs/AsyncListApiSpecsPaged.java | 60 - .../listapispecs/SyncListApiSpecs.java | 49 - .../SyncListApiSpecsApiversionname.java | 41 - .../listapispecs/SyncListApiSpecsString.java | 41 - .../listapiversions/AsyncListApiVersions.java | 52 - .../AsyncListApiVersionsPaged.java | 59 - .../listapiversions/SyncListApiVersions.java | 48 - .../SyncListApiVersionsApiname.java | 41 - .../SyncListApiVersionsString.java | 41 - .../listartifacts/AsyncListArtifacts.java | 51 - .../AsyncListArtifactsPaged.java | 59 - .../listartifacts/SyncListArtifacts.java | 48 - .../SyncListArtifactsApideploymentname.java | 42 - .../SyncListArtifactsApiname.java | 41 - .../SyncListArtifactsApispecname.java | 42 - .../SyncListArtifactsApiversionname.java | 41 - .../SyncListArtifactsLocationname.java | 41 - .../SyncListArtifactsString.java | 41 - .../listlocations/AsyncListLocations.java | 50 - .../AsyncListLocationsPaged.java | 58 - .../listlocations/SyncListLocations.java | 47 - .../replaceartifact/AsyncReplaceArtifact.java | 43 - .../replaceartifact/SyncReplaceArtifact.java | 40 - .../SyncReplaceArtifactArtifact.java | 38 - .../AsyncRollbackApiDeployment.java | 50 - .../SyncRollbackApiDeployment.java | 46 - .../rollbackapispec/AsyncRollbackApiSpec.java | 49 - .../rollbackapispec/SyncRollbackApiSpec.java | 46 - .../setiampolicy/AsyncSetIamPolicy.java | 49 - .../setiampolicy/SyncSetIamPolicy.java | 46 - .../AsyncTagApiDeploymentRevision.java | 50 - .../SyncTagApiDeploymentRevision.java | 46 - .../AsyncTagApiSpecRevision.java | 49 - .../SyncTagApiSpecRevision.java | 46 - .../AsyncTestIamPermissions.java | 49 - .../SyncTestIamPermissions.java | 45 - .../updateapi/AsyncUpdateApi.java | 48 - .../updateapi/SyncUpdateApi.java | 45 - .../updateapi/SyncUpdateApiApiFieldmask.java | 40 - .../AsyncUpdateApiDeployment.java | 49 - .../SyncUpdateApiDeployment.java | 45 - ...teApiDeploymentApideploymentFieldmask.java | 40 - .../updateapispec/AsyncUpdateApiSpec.java | 48 - .../updateapispec/SyncUpdateApiSpec.java | 45 - .../SyncUpdateApiSpecApispecFieldmask.java | 40 - .../AsyncUpdateApiVersion.java | 48 - .../SyncUpdateApiVersion.java | 45 - ...ncUpdateApiVersionApiversionFieldmask.java | 40 - .../registrysettings/getapi/SyncGetApi.java | 45 - .../getinstance/SyncGetInstance.java | 46 - .../getapi/SyncGetApi.java | 45 - 335 files changed, 10 insertions(+), 104436 deletions(-) delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningClient.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningSettings.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryClient.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistrySettings.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/package-info.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningCallableFactory.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningStub.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryCallableFactory.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryStub.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningCallableFactory.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningStub.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryCallableFactory.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryStub.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStub.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStubSettings.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStub.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicy.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicyImpl.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocations.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocationsImpl.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioning.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioningImpl.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistry.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistryImpl.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientTest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientTest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningGrpc.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryGrpc.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Api.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeployment.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentName.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiName.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpec.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecName.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersion.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionName.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Artifact.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactName.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Instance.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceName.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponse.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponse.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponse.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponse.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponse.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponse.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponse.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/LocationName.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadata.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningServiceProto.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryModelsProto.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryServiceProto.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequest.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/provisioning_service.proto delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_models.proto delete mode 100644 owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_service.proto delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstance.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstanceLRO.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstance.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceStringInstanceString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstance.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstanceLRO.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstance.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceInstancename.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/AsyncGetIamPolicy.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/SyncGetIamPolicy.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/AsyncGetInstance.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstance.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceInstancename.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/AsyncGetLocation.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/SyncGetLocation.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocations.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocationsPaged.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/SyncListLocations.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/AsyncSetIamPolicy.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/SyncSetIamPolicy.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/AsyncTestIamPermissions.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/SyncTestIamPermissions.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningsettings/getinstance/SyncGetInstance.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/AsyncCreateApi.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApi.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiLocationnameApiString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiStringApiString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/AsyncCreateApiDeployment.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeployment.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentApinameApideploymentString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentStringApideploymentString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/AsyncCreateApiSpec.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpec.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecApiversionnameApispecString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecStringApispecString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/AsyncCreateApiVersion.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersion.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionApinameApiversionString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionStringApiversionString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/AsyncCreateArtifact.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifact.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApideploymentnameArtifactString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApinameArtifactString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApispecnameArtifactString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApiversionnameArtifactString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactLocationnameArtifactString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactStringArtifactString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/AsyncDeleteApi.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApi.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiApiname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/AsyncDeleteApiDeployment.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeployment.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentApideploymentname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/AsyncDeleteApiDeploymentRevision.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevision.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionApideploymentname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/AsyncDeleteApiSpec.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpec.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecApispecname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/AsyncDeleteApiSpecRevision.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevision.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionApispecname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/AsyncDeleteApiVersion.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersion.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionApiversionname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/AsyncDeleteArtifact.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifact.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactArtifactname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/AsyncGetApi.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApi.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiApiname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/AsyncGetApiDeployment.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeployment.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentApideploymentname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/AsyncGetApiSpec.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpec.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecApispecname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/AsyncGetApiSpecContents.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContents.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsApispecname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/AsyncGetApiVersion.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersion.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionApiversionname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/AsyncGetArtifact.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifact.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactArtifactname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/AsyncGetArtifactContents.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContents.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsArtifactname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/AsyncGetIamPolicy.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/SyncGetIamPolicy.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/AsyncGetLocation.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/SyncGetLocation.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisions.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisionsPaged.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/SyncListApiDeploymentRevisions.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeployments.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeploymentsPaged.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeployments.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsApiname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApis.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApisPaged.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApis.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisLocationname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisions.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisionsPaged.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/SyncListApiSpecRevisions.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecs.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecsPaged.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecs.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsApiversionname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersions.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersionsPaged.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersions.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsApiname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifacts.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifactsPaged.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifacts.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApideploymentname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApispecname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiversionname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsLocationname.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsString.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocations.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocationsPaged.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/SyncListLocations.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/AsyncReplaceArtifact.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifact.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifactArtifact.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/AsyncRollbackApiDeployment.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/SyncRollbackApiDeployment.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/AsyncRollbackApiSpec.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/SyncRollbackApiSpec.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/AsyncSetIamPolicy.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/SyncSetIamPolicy.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/AsyncTagApiDeploymentRevision.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/SyncTagApiDeploymentRevision.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/AsyncTagApiSpecRevision.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/SyncTagApiSpecRevision.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/AsyncTestIamPermissions.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/SyncTestIamPermissions.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/AsyncUpdateApi.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApi.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApiApiFieldmask.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/AsyncUpdateApiDeployment.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeployment.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeploymentApideploymentFieldmask.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/AsyncUpdateApiSpec.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpec.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpecApispecFieldmask.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/AsyncUpdateApiVersion.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersion.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersionApiversionFieldmask.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registrysettings/getapi/SyncGetApi.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/provisioningstubsettings/getinstance/SyncGetInstance.java delete mode 100644 owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/registrystubsettings/getapi/SyncGetApi.java diff --git a/java-apigee-registry/README.md b/java-apigee-registry/README.md index 134a52fe3b6b..83f851a42e93 100644 --- a/java-apigee-registry/README.md +++ b/java-apigee-registry/README.md @@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-apigee-registry - 0.2.2 + 0.3.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-apigee-registry:0.2.2' +implementation 'com.google.cloud:google-cloud-apigee-registry:0.3.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-apigee-registry" % "0.2.2" +libraryDependencies += "com.google.cloud" % "google-cloud-apigee-registry" % "0.3.0" ``` ## Authentication diff --git a/java-apigee-registry/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java b/java-apigee-registry/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java index 825fd15606b7..9d6c347c4130 100644 --- a/java-apigee-registry/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java +++ b/java-apigee-registry/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java @@ -1148,7 +1148,12 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.ABORTED, + StatusCode.Code.CANCELLED, + StatusCode.Code.DEADLINE_EXCEEDED, + StatusCode.Code.UNAVAILABLE))); definitions.put( "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); @@ -1162,7 +1167,7 @@ public static class Builder extends StubSettings.BuilderThis 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 for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
- *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
- *   Instance response = provisioningClient.getInstance(name);
- * }
- * }
- * - *

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

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

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

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

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

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * ProvisioningSettings provisioningSettings =
- *     ProvisioningSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * ProvisioningSettings provisioningSettings =
- *     ProvisioningSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings);
- * }
- * - *

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 for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * ProvisioningSettings provisioningSettings =
- *     ProvisioningSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             ProvisioningSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class ProvisioningClient implements BackgroundResource { - private final ProvisioningSettings settings; - private final ProvisioningStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of ProvisioningClient with default settings. */ - public static final ProvisioningClient create() throws IOException { - return create(ProvisioningSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ProvisioningClient, 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 ProvisioningClient create(ProvisioningSettings settings) throws IOException { - return new ProvisioningClient(settings); - } - - /** - * Constructs an instance of ProvisioningClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(ProvisioningSettings). - */ - public static final ProvisioningClient create(ProvisioningStub stub) { - return new ProvisioningClient(stub); - } - - /** - * Constructs an instance of ProvisioningClient, 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 ProvisioningClient(ProvisioningSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ProvisioningStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected ProvisioningClient(ProvisioningStub 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 ProvisioningSettings getSettings() { - return settings; - } - - public ProvisioningStub 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. - /** - * Provisions instance resources for the Registry. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Instance instance = Instance.newBuilder().build();
-   *   String instanceId = "instanceId902024336";
-   *   Instance response =
-   *       provisioningClient.createInstanceAsync(parent, instance, instanceId).get();
-   * }
-   * }
- * - * @param parent Required. Parent resource of the Instance, of the form: - * `projects/*/locations/*` - * @param instance Required. The Instance. - * @param instanceId Required. Identifier to assign to the Instance. Must be unique within scope - * of the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createInstanceAsync( - LocationName parent, Instance instance, String instanceId) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInstance(instance) - .setInstanceId(instanceId) - .build(); - return createInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Provisions instance resources for the Registry. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Instance instance = Instance.newBuilder().build();
-   *   String instanceId = "instanceId902024336";
-   *   Instance response =
-   *       provisioningClient.createInstanceAsync(parent, instance, instanceId).get();
-   * }
-   * }
- * - * @param parent Required. Parent resource of the Instance, of the form: - * `projects/*/locations/*` - * @param instance Required. The Instance. - * @param instanceId Required. Identifier to assign to the Instance. Must be unique within scope - * of the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createInstanceAsync( - String parent, Instance instance, String instanceId) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(parent) - .setInstance(instance) - .setInstanceId(instanceId) - .build(); - return createInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Provisions instance resources for the Registry. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   CreateInstanceRequest request =
-   *       CreateInstanceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInstanceId("instanceId902024336")
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   Instance response = provisioningClient.createInstanceAsync(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 createInstanceAsync( - CreateInstanceRequest request) { - return createInstanceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Provisions instance resources for the Registry. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   CreateInstanceRequest request =
-   *       CreateInstanceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInstanceId("instanceId902024336")
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       provisioningClient.createInstanceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Instance response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createInstanceOperationCallable() { - return stub.createInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Provisions instance resources for the Registry. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   CreateInstanceRequest request =
-   *       CreateInstanceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInstanceId("instanceId902024336")
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = provisioningClient.createInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createInstanceCallable() { - return stub.createInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the Registry instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   provisioningClient.deleteInstanceAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The name of the Instance to delete. Format: - * `projects/*/locations/*/instances/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteInstanceAsync(InstanceName name) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the Registry instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
-   *   provisioningClient.deleteInstanceAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The name of the Instance to delete. Format: - * `projects/*/locations/*/instances/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteInstanceAsync(String name) { - DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); - return deleteInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the Registry instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   provisioningClient.deleteInstanceAsync(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 deleteInstanceAsync( - DeleteInstanceRequest request) { - return deleteInstanceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the Registry instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   OperationFuture future =
-   *       provisioningClient.deleteInstanceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteInstanceOperationCallable() { - return stub.deleteInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the Registry instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   ApiFuture future = provisioningClient.deleteInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteInstanceCallable() { - return stub.deleteInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   Instance response = provisioningClient.getInstance(name);
-   * }
-   * }
- * - * @param name Required. The name of the Instance to retrieve. Format: - * `projects/*/locations/*/instances/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Instance getInstance(InstanceName name) { - GetInstanceRequest request = - GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getInstance(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
-   *   Instance response = provisioningClient.getInstance(name);
-   * }
-   * }
- * - * @param name Required. The name of the Instance to retrieve. Format: - * `projects/*/locations/*/instances/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Instance getInstance(String name) { - GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); - return getInstance(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   GetInstanceRequest request =
-   *       GetInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   Instance response = provisioningClient.getInstance(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 Instance getInstance(GetInstanceRequest request) { - return getInstanceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   GetInstanceRequest request =
-   *       GetInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   ApiFuture future = provisioningClient.getInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   Instance response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getInstanceCallable() { - return stub.getInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists information about the supported locations for this service. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Location element : provisioningClient.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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       provisioningClient.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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListLocationsResponse response = provisioningClient.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 for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
-   *   Location response = provisioningClient.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 for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
-   *   ApiFuture future = provisioningClient.getLocationCallable().futureCall(request);
-   *   // Do something.
-   *   Location response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getLocationCallable() { - return stub.getLocationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Policy response = provisioningClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { - return setIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = provisioningClient.setIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable setIamPolicyCallable() { - return stub.setIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   Policy response = provisioningClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { - return getIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = provisioningClient.getIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getIamPolicyCallable() { - return stub.getIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   TestIamPermissionsResponse response = provisioningClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { - return testIamPermissionsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       provisioningClient.testIamPermissionsCallable().futureCall(request);
-   *   // Do something.
-   *   TestIamPermissionsResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - testIamPermissionsCallable() { - return stub.testIamPermissionsCallable(); - } - - @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 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( - PageContext context, - ListLocationsResponse response) { - super(context, response); - } - - private static ListLocationsPage createEmptyPage() { - return new ListLocationsPage(null, null); - } - - @Override - protected ListLocationsPage createPage( - PageContext context, - ListLocationsResponse response) { - return new ListLocationsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListLocationsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage, - ListLocationsFixedSizeCollection> { - - private ListLocationsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListLocationsFixedSizeCollection createEmptyCollection() { - return new ListLocationsFixedSizeCollection(null, 0); - } - - @Override - protected ListLocationsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListLocationsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningSettings.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningSettings.java deleted file mode 100644 index 489170f07040..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningSettings.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1; - -import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; - -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.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.apigeeregistry.v1.stub.ProvisioningStubSettings; -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.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ProvisioningClient}. - * - *

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

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

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

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * ProvisioningSettings.Builder provisioningSettingsBuilder = ProvisioningSettings.newBuilder();
- * provisioningSettingsBuilder
- *     .getInstanceSettings()
- *     .setRetrySettings(
- *         provisioningSettingsBuilder
- *             .getInstanceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ProvisioningSettings provisioningSettings = provisioningSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ProvisioningSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to createInstance. */ - public UnaryCallSettings createInstanceSettings() { - return ((ProvisioningStubSettings) getStubSettings()).createInstanceSettings(); - } - - /** Returns the object with the settings used for calls to createInstance. */ - public OperationCallSettings - createInstanceOperationSettings() { - return ((ProvisioningStubSettings) getStubSettings()).createInstanceOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public UnaryCallSettings deleteInstanceSettings() { - return ((ProvisioningStubSettings) getStubSettings()).deleteInstanceSettings(); - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public OperationCallSettings - deleteInstanceOperationSettings() { - return ((ProvisioningStubSettings) getStubSettings()).deleteInstanceOperationSettings(); - } - - /** Returns the object with the settings used for calls to getInstance. */ - public UnaryCallSettings getInstanceSettings() { - return ((ProvisioningStubSettings) getStubSettings()).getInstanceSettings(); - } - - /** Returns the object with the settings used for calls to listLocations. */ - public PagedCallSettings - listLocationsSettings() { - return ((ProvisioningStubSettings) getStubSettings()).listLocationsSettings(); - } - - /** Returns the object with the settings used for calls to getLocation. */ - public UnaryCallSettings getLocationSettings() { - return ((ProvisioningStubSettings) getStubSettings()).getLocationSettings(); - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return ((ProvisioningStubSettings) getStubSettings()).setIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to getIamPolicy. */ - public UnaryCallSettings getIamPolicySettings() { - return ((ProvisioningStubSettings) getStubSettings()).getIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return ((ProvisioningStubSettings) getStubSettings()).testIamPermissionsSettings(); - } - - public static final ProvisioningSettings create(ProvisioningStubSettings stub) - throws IOException { - return new ProvisioningSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ProvisioningStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ProvisioningStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ProvisioningStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ProvisioningStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ProvisioningStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return ProvisioningStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ProvisioningStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ProvisioningStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(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 ProvisioningSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ProvisioningSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ProvisioningStubSettings.newBuilder(clientContext)); - } - - protected Builder(ProvisioningSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ProvisioningStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ProvisioningStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(ProvisioningStubSettings.newHttpJsonBuilder()); - } - - public ProvisioningStubSettings.Builder getStubSettingsBuilder() { - return ((ProvisioningStubSettings.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 createInstance. */ - public UnaryCallSettings.Builder createInstanceSettings() { - return getStubSettingsBuilder().createInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to createInstance. */ - public OperationCallSettings.Builder - createInstanceOperationSettings() { - return getStubSettingsBuilder().createInstanceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - public UnaryCallSettings.Builder deleteInstanceSettings() { - return getStubSettingsBuilder().deleteInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - public OperationCallSettings.Builder - deleteInstanceOperationSettings() { - return getStubSettingsBuilder().deleteInstanceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to getInstance. */ - public UnaryCallSettings.Builder getInstanceSettings() { - return getStubSettingsBuilder().getInstanceSettings(); - } - - /** 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(); - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return getStubSettingsBuilder().setIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to getIamPolicy. */ - public UnaryCallSettings.Builder getIamPolicySettings() { - return getStubSettingsBuilder().getIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return getStubSettingsBuilder().testIamPermissionsSettings(); - } - - @Override - public ProvisioningSettings build() throws IOException { - return new ProvisioningSettings(this); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryClient.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryClient.java deleted file mode 100644 index 2247bd36be10..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryClient.java +++ /dev/null @@ -1,5082 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1; - -import com.google.api.HttpBody; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.gax.core.BackgroundResource; -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.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.apigeeregistry.v1.stub.RegistryStub; -import com.google.cloud.apigeeregistry.v1.stub.RegistryStubSettings; -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.util.concurrent.MoreExecutors; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: The Registry service allows teams to manage descriptions of APIs. - * - *

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 for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (RegistryClient registryClient = RegistryClient.create()) {
- *   ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
- *   Api response = registryClient.getApi(name);
- * }
- * }
- * - *

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

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

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

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

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

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * RegistrySettings registrySettings =
- *     RegistrySettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * RegistryClient registryClient = RegistryClient.create(registrySettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * RegistrySettings registrySettings =
- *     RegistrySettings.newBuilder().setEndpoint(myEndpoint).build();
- * RegistryClient registryClient = RegistryClient.create(registrySettings);
- * }
- * - *

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 for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * RegistrySettings registrySettings =
- *     RegistrySettings.newBuilder()
- *         .setTransportChannelProvider(
- *             RegistrySettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * RegistryClient registryClient = RegistryClient.create(registrySettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class RegistryClient implements BackgroundResource { - private final RegistrySettings settings; - private final RegistryStub stub; - - /** Constructs an instance of RegistryClient with default settings. */ - public static final RegistryClient create() throws IOException { - return create(RegistrySettings.newBuilder().build()); - } - - /** - * Constructs an instance of RegistryClient, 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 RegistryClient create(RegistrySettings settings) throws IOException { - return new RegistryClient(settings); - } - - /** - * Constructs an instance of RegistryClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(RegistrySettings). - */ - public static final RegistryClient create(RegistryStub stub) { - return new RegistryClient(stub); - } - - /** - * Constructs an instance of RegistryClient, 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 RegistryClient(RegistrySettings settings) throws IOException { - this.settings = settings; - this.stub = ((RegistryStubSettings) settings.getStubSettings()).createStub(); - } - - protected RegistryClient(RegistryStub stub) { - this.settings = null; - this.stub = stub; - } - - public final RegistrySettings getSettings() { - return settings; - } - - public RegistryStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching APIs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Api element : registryClient.listApis(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of APIs. Format: - * `projects/*/locations/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListApisPagedResponse listApis(LocationName parent) { - ListApisRequest request = - ListApisRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); - return listApis(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching APIs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Api element : registryClient.listApis(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of APIs. Format: - * `projects/*/locations/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListApisPagedResponse listApis(String parent) { - ListApisRequest request = ListApisRequest.newBuilder().setParent(parent).build(); - return listApis(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching APIs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApisRequest request =
-   *       ListApisRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   for (Api element : registryClient.listApis(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 ListApisPagedResponse listApis(ListApisRequest request) { - return listApisPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching APIs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApisRequest request =
-   *       ListApisRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   ApiFuture future = registryClient.listApisPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Api element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listApisPagedCallable() { - return stub.listApisPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching APIs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApisRequest request =
-   *       ListApisRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   while (true) {
-   *     ListApisResponse response = registryClient.listApisCallable().call(request);
-   *     for (Api element : response.getApisList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listApisCallable() { - return stub.listApisCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified API. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
-   *   Api response = registryClient.getApi(name);
-   * }
-   * }
- * - * @param name Required. The name of the API to retrieve. Format: - * `projects/*/locations/*/apis/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Api getApi(ApiName name) { - GetApiRequest request = - GetApiRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getApi(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified API. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
-   *   Api response = registryClient.getApi(name);
-   * }
-   * }
- * - * @param name Required. The name of the API to retrieve. Format: - * `projects/*/locations/*/apis/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Api getApi(String name) { - GetApiRequest request = GetApiRequest.newBuilder().setName(name).build(); - return getApi(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified API. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetApiRequest request =
-   *       GetApiRequest.newBuilder()
-   *           .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .build();
-   *   Api response = registryClient.getApi(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 Api getApi(GetApiRequest request) { - return getApiCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified API. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetApiRequest request =
-   *       GetApiRequest.newBuilder()
-   *           .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .build();
-   *   ApiFuture future = registryClient.getApiCallable().futureCall(request);
-   *   // Do something.
-   *   Api response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getApiCallable() { - return stub.getApiCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified API. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Api api = Api.newBuilder().build();
-   *   String apiId = "apiId93021397";
-   *   Api response = registryClient.createApi(parent, api, apiId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of APIs. Format: - * `projects/*/locations/*` - * @param api Required. The API to create. - * @param apiId Required. The ID to use for the API, which will become the final component of the - * API's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Api createApi(LocationName parent, Api api, String apiId) { - CreateApiRequest request = - CreateApiRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setApi(api) - .setApiId(apiId) - .build(); - return createApi(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified API. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Api api = Api.newBuilder().build();
-   *   String apiId = "apiId93021397";
-   *   Api response = registryClient.createApi(parent, api, apiId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of APIs. Format: - * `projects/*/locations/*` - * @param api Required. The API to create. - * @param apiId Required. The ID to use for the API, which will become the final component of the - * API's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Api createApi(String parent, Api api, String apiId) { - CreateApiRequest request = - CreateApiRequest.newBuilder().setParent(parent).setApi(api).setApiId(apiId).build(); - return createApi(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified API. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   CreateApiRequest request =
-   *       CreateApiRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setApi(Api.newBuilder().build())
-   *           .setApiId("apiId93021397")
-   *           .build();
-   *   Api response = registryClient.createApi(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 Api createApi(CreateApiRequest request) { - return createApiCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified API. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   CreateApiRequest request =
-   *       CreateApiRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setApi(Api.newBuilder().build())
-   *           .setApiId("apiId93021397")
-   *           .build();
-   *   ApiFuture future = registryClient.createApiCallable().futureCall(request);
-   *   // Do something.
-   *   Api response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createApiCallable() { - return stub.createApiCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified API. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   Api api = Api.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Api response = registryClient.updateApi(api, updateMask);
-   * }
-   * }
- * - * @param api Required. The API to update. - *

The `name` field is used to identify the API to update. Format: - * `projects/*/locations/*/apis/*` - * @param updateMask The list of fields to be updated. If omitted, all fields are updated that are - * set in the request message (fields set to default values are ignored). If an asterisk - * "*" is specified, all fields are updated, including fields that are unspecified/default - * in the request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Api updateApi(Api api, FieldMask updateMask) { - UpdateApiRequest request = - UpdateApiRequest.newBuilder().setApi(api).setUpdateMask(updateMask).build(); - return updateApi(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified API. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   UpdateApiRequest request =
-   *       UpdateApiRequest.newBuilder()
-   *           .setApi(Api.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setAllowMissing(true)
-   *           .build();
-   *   Api response = registryClient.updateApi(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 Api updateApi(UpdateApiRequest request) { - return updateApiCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified API. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   UpdateApiRequest request =
-   *       UpdateApiRequest.newBuilder()
-   *           .setApi(Api.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setAllowMissing(true)
-   *           .build();
-   *   ApiFuture future = registryClient.updateApiCallable().futureCall(request);
-   *   // Do something.
-   *   Api response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateApiCallable() { - return stub.updateApiCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified API and all of the resources that it owns. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
-   *   registryClient.deleteApi(name);
-   * }
-   * }
- * - * @param name Required. The name of the API to delete. Format: - * `projects/*/locations/*/apis/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteApi(ApiName name) { - DeleteApiRequest request = - DeleteApiRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteApi(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified API and all of the resources that it owns. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
-   *   registryClient.deleteApi(name);
-   * }
-   * }
- * - * @param name Required. The name of the API to delete. Format: - * `projects/*/locations/*/apis/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteApi(String name) { - DeleteApiRequest request = DeleteApiRequest.newBuilder().setName(name).build(); - deleteApi(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified API and all of the resources that it owns. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiRequest request =
-   *       DeleteApiRequest.newBuilder()
-   *           .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setForce(true)
-   *           .build();
-   *   registryClient.deleteApi(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 deleteApi(DeleteApiRequest request) { - deleteApiCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified API and all of the resources that it owns. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiRequest request =
-   *       DeleteApiRequest.newBuilder()
-   *           .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setForce(true)
-   *           .build();
-   *   ApiFuture future = registryClient.deleteApiCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteApiCallable() { - return stub.deleteApiCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching versions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
-   *   for (ApiVersion element : registryClient.listApiVersions(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of versions. Format: - * `projects/*/locations/*/apis/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListApiVersionsPagedResponse listApiVersions(ApiName parent) { - ListApiVersionsRequest request = - ListApiVersionsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listApiVersions(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching versions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
-   *   for (ApiVersion element : registryClient.listApiVersions(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of versions. Format: - * `projects/*/locations/*/apis/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListApiVersionsPagedResponse listApiVersions(String parent) { - ListApiVersionsRequest request = ListApiVersionsRequest.newBuilder().setParent(parent).build(); - return listApiVersions(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching versions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiVersionsRequest request =
-   *       ListApiVersionsRequest.newBuilder()
-   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   for (ApiVersion element : registryClient.listApiVersions(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 ListApiVersionsPagedResponse listApiVersions(ListApiVersionsRequest request) { - return listApiVersionsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching versions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiVersionsRequest request =
-   *       ListApiVersionsRequest.newBuilder()
-   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.listApiVersionsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ApiVersion element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listApiVersionsPagedCallable() { - return stub.listApiVersionsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching versions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiVersionsRequest request =
-   *       ListApiVersionsRequest.newBuilder()
-   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   while (true) {
-   *     ListApiVersionsResponse response = registryClient.listApiVersionsCallable().call(request);
-   *     for (ApiVersion element : response.getApiVersionsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listApiVersionsCallable() { - return stub.listApiVersionsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified version. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
-   *   ApiVersion response = registryClient.getApiVersion(name);
-   * }
-   * }
- * - * @param name Required. The name of the version to retrieve. Format: - * `projects/*/locations/*/apis/*/versions/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiVersion getApiVersion(ApiVersionName name) { - GetApiVersionRequest request = - GetApiVersionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getApiVersion(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified version. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString();
-   *   ApiVersion response = registryClient.getApiVersion(name);
-   * }
-   * }
- * - * @param name Required. The name of the version to retrieve. Format: - * `projects/*/locations/*/apis/*/versions/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiVersion getApiVersion(String name) { - GetApiVersionRequest request = GetApiVersionRequest.newBuilder().setName(name).build(); - return getApiVersion(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified version. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetApiVersionRequest request =
-   *       GetApiVersionRequest.newBuilder()
-   *           .setName(
-   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
-   *           .build();
-   *   ApiVersion response = registryClient.getApiVersion(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 ApiVersion getApiVersion(GetApiVersionRequest request) { - return getApiVersionCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified version. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetApiVersionRequest request =
-   *       GetApiVersionRequest.newBuilder()
-   *           .setName(
-   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
-   *           .build();
-   *   ApiFuture future = registryClient.getApiVersionCallable().futureCall(request);
-   *   // Do something.
-   *   ApiVersion response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getApiVersionCallable() { - return stub.getApiVersionCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified version. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
-   *   ApiVersion apiVersion = ApiVersion.newBuilder().build();
-   *   String apiVersionId = "apiVersionId1678816025";
-   *   ApiVersion response = registryClient.createApiVersion(parent, apiVersion, apiVersionId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of versions. Format: - * `projects/*/locations/*/apis/*` - * @param apiVersion Required. The version to create. - * @param apiVersionId Required. The ID to use for the version, which will become the final - * component of the version's resource name. - *

This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiVersion createApiVersion( - ApiName parent, ApiVersion apiVersion, String apiVersionId) { - CreateApiVersionRequest request = - CreateApiVersionRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setApiVersion(apiVersion) - .setApiVersionId(apiVersionId) - .build(); - return createApiVersion(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified version. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
-   *   ApiVersion apiVersion = ApiVersion.newBuilder().build();
-   *   String apiVersionId = "apiVersionId1678816025";
-   *   ApiVersion response = registryClient.createApiVersion(parent, apiVersion, apiVersionId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of versions. Format: - * `projects/*/locations/*/apis/*` - * @param apiVersion Required. The version to create. - * @param apiVersionId Required. The ID to use for the version, which will become the final - * component of the version's resource name. - *

This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiVersion createApiVersion( - String parent, ApiVersion apiVersion, String apiVersionId) { - CreateApiVersionRequest request = - CreateApiVersionRequest.newBuilder() - .setParent(parent) - .setApiVersion(apiVersion) - .setApiVersionId(apiVersionId) - .build(); - return createApiVersion(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified version. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   CreateApiVersionRequest request =
-   *       CreateApiVersionRequest.newBuilder()
-   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setApiVersion(ApiVersion.newBuilder().build())
-   *           .setApiVersionId("apiVersionId1678816025")
-   *           .build();
-   *   ApiVersion response = registryClient.createApiVersion(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 ApiVersion createApiVersion(CreateApiVersionRequest request) { - return createApiVersionCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified version. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   CreateApiVersionRequest request =
-   *       CreateApiVersionRequest.newBuilder()
-   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setApiVersion(ApiVersion.newBuilder().build())
-   *           .setApiVersionId("apiVersionId1678816025")
-   *           .build();
-   *   ApiFuture future = registryClient.createApiVersionCallable().futureCall(request);
-   *   // Do something.
-   *   ApiVersion response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createApiVersionCallable() { - return stub.createApiVersionCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified version. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiVersion apiVersion = ApiVersion.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   ApiVersion response = registryClient.updateApiVersion(apiVersion, updateMask);
-   * }
-   * }
- * - * @param apiVersion Required. The version to update. - *

The `name` field is used to identify the version to update. Format: - * `projects/*/locations/*/apis/*/versions/*` - * @param updateMask The list of fields to be updated. If omitted, all fields are updated that are - * set in the request message (fields set to default values are ignored). If an asterisk - * "*" is specified, all fields are updated, including fields that are unspecified/default - * in the request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiVersion updateApiVersion(ApiVersion apiVersion, FieldMask updateMask) { - UpdateApiVersionRequest request = - UpdateApiVersionRequest.newBuilder() - .setApiVersion(apiVersion) - .setUpdateMask(updateMask) - .build(); - return updateApiVersion(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified version. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   UpdateApiVersionRequest request =
-   *       UpdateApiVersionRequest.newBuilder()
-   *           .setApiVersion(ApiVersion.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setAllowMissing(true)
-   *           .build();
-   *   ApiVersion response = registryClient.updateApiVersion(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 ApiVersion updateApiVersion(UpdateApiVersionRequest request) { - return updateApiVersionCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified version. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   UpdateApiVersionRequest request =
-   *       UpdateApiVersionRequest.newBuilder()
-   *           .setApiVersion(ApiVersion.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setAllowMissing(true)
-   *           .build();
-   *   ApiFuture future = registryClient.updateApiVersionCallable().futureCall(request);
-   *   // Do something.
-   *   ApiVersion response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateApiVersionCallable() { - return stub.updateApiVersionCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified version and all of the resources that it owns. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
-   *   registryClient.deleteApiVersion(name);
-   * }
-   * }
- * - * @param name Required. The name of the version to delete. Format: - * `projects/*/locations/*/apis/*/versions/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteApiVersion(ApiVersionName name) { - DeleteApiVersionRequest request = - DeleteApiVersionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteApiVersion(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified version and all of the resources that it owns. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString();
-   *   registryClient.deleteApiVersion(name);
-   * }
-   * }
- * - * @param name Required. The name of the version to delete. Format: - * `projects/*/locations/*/apis/*/versions/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteApiVersion(String name) { - DeleteApiVersionRequest request = DeleteApiVersionRequest.newBuilder().setName(name).build(); - deleteApiVersion(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified version and all of the resources that it owns. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiVersionRequest request =
-   *       DeleteApiVersionRequest.newBuilder()
-   *           .setName(
-   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
-   *           .setForce(true)
-   *           .build();
-   *   registryClient.deleteApiVersion(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 deleteApiVersion(DeleteApiVersionRequest request) { - deleteApiVersionCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified version and all of the resources that it owns. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiVersionRequest request =
-   *       DeleteApiVersionRequest.newBuilder()
-   *           .setName(
-   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
-   *           .setForce(true)
-   *           .build();
-   *   ApiFuture future = registryClient.deleteApiVersionCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteApiVersionCallable() { - return stub.deleteApiVersionCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching specs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
-   *   for (ApiSpec element : registryClient.listApiSpecs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of specs. Format: - * `projects/*/locations/*/apis/*/versions/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListApiSpecsPagedResponse listApiSpecs(ApiVersionName parent) { - ListApiSpecsRequest request = - ListApiSpecsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listApiSpecs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching specs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString();
-   *   for (ApiSpec element : registryClient.listApiSpecs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of specs. Format: - * `projects/*/locations/*/apis/*/versions/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListApiSpecsPagedResponse listApiSpecs(String parent) { - ListApiSpecsRequest request = ListApiSpecsRequest.newBuilder().setParent(parent).build(); - return listApiSpecs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching specs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiSpecsRequest request =
-   *       ListApiSpecsRequest.newBuilder()
-   *           .setParent(
-   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   for (ApiSpec element : registryClient.listApiSpecs(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 ListApiSpecsPagedResponse listApiSpecs(ListApiSpecsRequest request) { - return listApiSpecsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching specs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiSpecsRequest request =
-   *       ListApiSpecsRequest.newBuilder()
-   *           .setParent(
-   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   ApiFuture future = registryClient.listApiSpecsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ApiSpec element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listApiSpecsPagedCallable() { - return stub.listApiSpecsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching specs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiSpecsRequest request =
-   *       ListApiSpecsRequest.newBuilder()
-   *           .setParent(
-   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   while (true) {
-   *     ListApiSpecsResponse response = registryClient.listApiSpecsCallable().call(request);
-   *     for (ApiSpec element : response.getApiSpecsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listApiSpecsCallable() { - return stub.listApiSpecsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
-   *   ApiSpec response = registryClient.getApiSpec(name);
-   * }
-   * }
- * - * @param name Required. The name of the spec to retrieve. Format: - * `projects/*/locations/*/apis/*/versions/*/specs/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiSpec getApiSpec(ApiSpecName name) { - GetApiSpecRequest request = - GetApiSpecRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getApiSpec(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name =
-   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString();
-   *   ApiSpec response = registryClient.getApiSpec(name);
-   * }
-   * }
- * - * @param name Required. The name of the spec to retrieve. Format: - * `projects/*/locations/*/apis/*/versions/*/specs/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiSpec getApiSpec(String name) { - GetApiSpecRequest request = GetApiSpecRequest.newBuilder().setName(name).build(); - return getApiSpec(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetApiSpecRequest request =
-   *       GetApiSpecRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .build();
-   *   ApiSpec response = registryClient.getApiSpec(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 ApiSpec getApiSpec(GetApiSpecRequest request) { - return getApiSpecCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetApiSpecRequest request =
-   *       GetApiSpecRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future = registryClient.getApiSpecCallable().futureCall(request);
-   *   // Do something.
-   *   ApiSpec response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getApiSpecCallable() { - return stub.getApiSpecCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the contents of a specified spec. If specs are stored with GZip compression, the - * default behavior is to return the spec uncompressed (the mime_type response field indicates the - * exact format returned). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
-   *   HttpBody response = registryClient.getApiSpecContents(name);
-   * }
-   * }
- * - * @param name Required. The name of the spec whose contents should be retrieved. Format: - * `projects/*/locations/*/apis/*/versions/*/specs/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HttpBody getApiSpecContents(ApiSpecName name) { - GetApiSpecContentsRequest request = - GetApiSpecContentsRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getApiSpecContents(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the contents of a specified spec. If specs are stored with GZip compression, the - * default behavior is to return the spec uncompressed (the mime_type response field indicates the - * exact format returned). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name =
-   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString();
-   *   HttpBody response = registryClient.getApiSpecContents(name);
-   * }
-   * }
- * - * @param name Required. The name of the spec whose contents should be retrieved. Format: - * `projects/*/locations/*/apis/*/versions/*/specs/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HttpBody getApiSpecContents(String name) { - GetApiSpecContentsRequest request = - GetApiSpecContentsRequest.newBuilder().setName(name).build(); - return getApiSpecContents(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the contents of a specified spec. If specs are stored with GZip compression, the - * default behavior is to return the spec uncompressed (the mime_type response field indicates the - * exact format returned). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetApiSpecContentsRequest request =
-   *       GetApiSpecContentsRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .build();
-   *   HttpBody response = registryClient.getApiSpecContents(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 HttpBody getApiSpecContents(GetApiSpecContentsRequest request) { - return getApiSpecContentsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the contents of a specified spec. If specs are stored with GZip compression, the - * default behavior is to return the spec uncompressed (the mime_type response field indicates the - * exact format returned). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetApiSpecContentsRequest request =
-   *       GetApiSpecContentsRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future = registryClient.getApiSpecContentsCallable().futureCall(request);
-   *   // Do something.
-   *   HttpBody response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getApiSpecContentsCallable() { - return stub.getApiSpecContentsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
-   *   ApiSpec apiSpec = ApiSpec.newBuilder().build();
-   *   String apiSpecId = "apiSpecId-421795600";
-   *   ApiSpec response = registryClient.createApiSpec(parent, apiSpec, apiSpecId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of specs. Format: - * `projects/*/locations/*/apis/*/versions/*` - * @param apiSpec Required. The spec to create. - * @param apiSpecId Required. The ID to use for the spec, which will become the final component of - * the spec's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiSpec createApiSpec(ApiVersionName parent, ApiSpec apiSpec, String apiSpecId) { - CreateApiSpecRequest request = - CreateApiSpecRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setApiSpec(apiSpec) - .setApiSpecId(apiSpecId) - .build(); - return createApiSpec(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString();
-   *   ApiSpec apiSpec = ApiSpec.newBuilder().build();
-   *   String apiSpecId = "apiSpecId-421795600";
-   *   ApiSpec response = registryClient.createApiSpec(parent, apiSpec, apiSpecId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of specs. Format: - * `projects/*/locations/*/apis/*/versions/*` - * @param apiSpec Required. The spec to create. - * @param apiSpecId Required. The ID to use for the spec, which will become the final component of - * the spec's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiSpec createApiSpec(String parent, ApiSpec apiSpec, String apiSpecId) { - CreateApiSpecRequest request = - CreateApiSpecRequest.newBuilder() - .setParent(parent) - .setApiSpec(apiSpec) - .setApiSpecId(apiSpecId) - .build(); - return createApiSpec(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   CreateApiSpecRequest request =
-   *       CreateApiSpecRequest.newBuilder()
-   *           .setParent(
-   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
-   *           .setApiSpec(ApiSpec.newBuilder().build())
-   *           .setApiSpecId("apiSpecId-421795600")
-   *           .build();
-   *   ApiSpec response = registryClient.createApiSpec(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 ApiSpec createApiSpec(CreateApiSpecRequest request) { - return createApiSpecCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   CreateApiSpecRequest request =
-   *       CreateApiSpecRequest.newBuilder()
-   *           .setParent(
-   *               ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
-   *           .setApiSpec(ApiSpec.newBuilder().build())
-   *           .setApiSpecId("apiSpecId-421795600")
-   *           .build();
-   *   ApiFuture future = registryClient.createApiSpecCallable().futureCall(request);
-   *   // Do something.
-   *   ApiSpec response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createApiSpecCallable() { - return stub.createApiSpecCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiSpec apiSpec = ApiSpec.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   ApiSpec response = registryClient.updateApiSpec(apiSpec, updateMask);
-   * }
-   * }
- * - * @param apiSpec Required. The spec to update. - *

The `name` field is used to identify the spec to update. Format: - * `projects/*/locations/*/apis/*/versions/*/specs/*` - * @param updateMask The list of fields to be updated. If omitted, all fields are updated that are - * set in the request message (fields set to default values are ignored). If an asterisk - * "*" is specified, all fields are updated, including fields that are unspecified/default - * in the request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiSpec updateApiSpec(ApiSpec apiSpec, FieldMask updateMask) { - UpdateApiSpecRequest request = - UpdateApiSpecRequest.newBuilder().setApiSpec(apiSpec).setUpdateMask(updateMask).build(); - return updateApiSpec(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   UpdateApiSpecRequest request =
-   *       UpdateApiSpecRequest.newBuilder()
-   *           .setApiSpec(ApiSpec.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setAllowMissing(true)
-   *           .build();
-   *   ApiSpec response = registryClient.updateApiSpec(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 ApiSpec updateApiSpec(UpdateApiSpecRequest request) { - return updateApiSpecCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   UpdateApiSpecRequest request =
-   *       UpdateApiSpecRequest.newBuilder()
-   *           .setApiSpec(ApiSpec.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setAllowMissing(true)
-   *           .build();
-   *   ApiFuture future = registryClient.updateApiSpecCallable().futureCall(request);
-   *   // Do something.
-   *   ApiSpec response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateApiSpecCallable() { - return stub.updateApiSpecCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified spec, all revisions, and all child resources (e.g., artifacts). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
-   *   registryClient.deleteApiSpec(name);
-   * }
-   * }
- * - * @param name Required. The name of the spec to delete. Format: - * `projects/*/locations/*/apis/*/versions/*/specs/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteApiSpec(ApiSpecName name) { - DeleteApiSpecRequest request = - DeleteApiSpecRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteApiSpec(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified spec, all revisions, and all child resources (e.g., artifacts). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name =
-   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString();
-   *   registryClient.deleteApiSpec(name);
-   * }
-   * }
- * - * @param name Required. The name of the spec to delete. Format: - * `projects/*/locations/*/apis/*/versions/*/specs/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteApiSpec(String name) { - DeleteApiSpecRequest request = DeleteApiSpecRequest.newBuilder().setName(name).build(); - deleteApiSpec(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified spec, all revisions, and all child resources (e.g., artifacts). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiSpecRequest request =
-   *       DeleteApiSpecRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .setForce(true)
-   *           .build();
-   *   registryClient.deleteApiSpec(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 deleteApiSpec(DeleteApiSpecRequest request) { - deleteApiSpecCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified spec, all revisions, and all child resources (e.g., artifacts). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiSpecRequest request =
-   *       DeleteApiSpecRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .setForce(true)
-   *           .build();
-   *   ApiFuture future = registryClient.deleteApiSpecCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteApiSpecCallable() { - return stub.deleteApiSpecCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a tag to a specified revision of a spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   TagApiSpecRevisionRequest request =
-   *       TagApiSpecRevisionRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .setTag("tag114586")
-   *           .build();
-   *   ApiSpec response = registryClient.tagApiSpecRevision(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 ApiSpec tagApiSpecRevision(TagApiSpecRevisionRequest request) { - return tagApiSpecRevisionCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a tag to a specified revision of a spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   TagApiSpecRevisionRequest request =
-   *       TagApiSpecRevisionRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .setTag("tag114586")
-   *           .build();
-   *   ApiFuture future = registryClient.tagApiSpecRevisionCallable().futureCall(request);
-   *   // Do something.
-   *   ApiSpec response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable tagApiSpecRevisionCallable() { - return stub.tagApiSpecRevisionCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all revisions of a spec. Revisions are returned in descending order of revision creation - * time. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiSpecRevisionsRequest request =
-   *       ListApiSpecRevisionsRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (ApiSpec element : registryClient.listApiSpecRevisions(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 ListApiSpecRevisionsPagedResponse listApiSpecRevisions( - ListApiSpecRevisionsRequest request) { - return listApiSpecRevisionsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all revisions of a spec. Revisions are returned in descending order of revision creation - * time. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiSpecRevisionsRequest request =
-   *       ListApiSpecRevisionsRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.listApiSpecRevisionsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ApiSpec element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listApiSpecRevisionsPagedCallable() { - return stub.listApiSpecRevisionsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all revisions of a spec. Revisions are returned in descending order of revision creation - * time. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiSpecRevisionsRequest request =
-   *       ListApiSpecRevisionsRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListApiSpecRevisionsResponse response =
-   *         registryClient.listApiSpecRevisionsCallable().call(request);
-   *     for (ApiSpec element : response.getApiSpecsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listApiSpecRevisionsCallable() { - return stub.listApiSpecRevisionsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the current revision to a specified prior revision. Note that this creates a new revision - * with a new revision ID. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   RollbackApiSpecRequest request =
-   *       RollbackApiSpecRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .setRevisionId("revisionId-1507445162")
-   *           .build();
-   *   ApiSpec response = registryClient.rollbackApiSpec(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 ApiSpec rollbackApiSpec(RollbackApiSpecRequest request) { - return rollbackApiSpecCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the current revision to a specified prior revision. Note that this creates a new revision - * with a new revision ID. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   RollbackApiSpecRequest request =
-   *       RollbackApiSpecRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .setRevisionId("revisionId-1507445162")
-   *           .build();
-   *   ApiFuture future = registryClient.rollbackApiSpecCallable().futureCall(request);
-   *   // Do something.
-   *   ApiSpec response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable rollbackApiSpecCallable() { - return stub.rollbackApiSpecCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a revision of a spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
-   *   ApiSpec response = registryClient.deleteApiSpecRevision(name);
-   * }
-   * }
- * - * @param name Required. The name of the spec revision to be deleted, with a revision ID - * explicitly included. - *

Example: - * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml{@literal @}c7cfa2a8` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiSpec deleteApiSpecRevision(ApiSpecName name) { - DeleteApiSpecRevisionRequest request = - DeleteApiSpecRevisionRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return deleteApiSpecRevision(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a revision of a spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name =
-   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString();
-   *   ApiSpec response = registryClient.deleteApiSpecRevision(name);
-   * }
-   * }
- * - * @param name Required. The name of the spec revision to be deleted, with a revision ID - * explicitly included. - *

Example: - * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml{@literal @}c7cfa2a8` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiSpec deleteApiSpecRevision(String name) { - DeleteApiSpecRevisionRequest request = - DeleteApiSpecRevisionRequest.newBuilder().setName(name).build(); - return deleteApiSpecRevision(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a revision of a spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiSpecRevisionRequest request =
-   *       DeleteApiSpecRevisionRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .build();
-   *   ApiSpec response = registryClient.deleteApiSpecRevision(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 ApiSpec deleteApiSpecRevision(DeleteApiSpecRevisionRequest request) { - return deleteApiSpecRevisionCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a revision of a spec. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiSpecRevisionRequest request =
-   *       DeleteApiSpecRevisionRequest.newBuilder()
-   *           .setName(
-   *               ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.deleteApiSpecRevisionCallable().futureCall(request);
-   *   // Do something.
-   *   ApiSpec response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - deleteApiSpecRevisionCallable() { - return stub.deleteApiSpecRevisionCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching deployments. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
-   *   for (ApiDeployment element : registryClient.listApiDeployments(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of deployments. Format: - * `projects/*/locations/*/apis/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListApiDeploymentsPagedResponse listApiDeployments(ApiName parent) { - ListApiDeploymentsRequest request = - ListApiDeploymentsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listApiDeployments(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching deployments. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
-   *   for (ApiDeployment element : registryClient.listApiDeployments(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of deployments. Format: - * `projects/*/locations/*/apis/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListApiDeploymentsPagedResponse listApiDeployments(String parent) { - ListApiDeploymentsRequest request = - ListApiDeploymentsRequest.newBuilder().setParent(parent).build(); - return listApiDeployments(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching deployments. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiDeploymentsRequest request =
-   *       ListApiDeploymentsRequest.newBuilder()
-   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   for (ApiDeployment element : registryClient.listApiDeployments(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 ListApiDeploymentsPagedResponse listApiDeployments( - ListApiDeploymentsRequest request) { - return listApiDeploymentsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching deployments. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiDeploymentsRequest request =
-   *       ListApiDeploymentsRequest.newBuilder()
-   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.listApiDeploymentsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ApiDeployment element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listApiDeploymentsPagedCallable() { - return stub.listApiDeploymentsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching deployments. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiDeploymentsRequest request =
-   *       ListApiDeploymentsRequest.newBuilder()
-   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   while (true) {
-   *     ListApiDeploymentsResponse response =
-   *         registryClient.listApiDeploymentsCallable().call(request);
-   *     for (ApiDeployment element : response.getApiDeploymentsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listApiDeploymentsCallable() { - return stub.listApiDeploymentsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiDeploymentName name =
-   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]");
-   *   ApiDeployment response = registryClient.getApiDeployment(name);
-   * }
-   * }
- * - * @param name Required. The name of the deployment to retrieve. Format: - * `projects/*/locations/*/apis/*/deployments/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiDeployment getApiDeployment(ApiDeploymentName name) { - GetApiDeploymentRequest request = - GetApiDeploymentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getApiDeployment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name =
-   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString();
-   *   ApiDeployment response = registryClient.getApiDeployment(name);
-   * }
-   * }
- * - * @param name Required. The name of the deployment to retrieve. Format: - * `projects/*/locations/*/apis/*/deployments/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiDeployment getApiDeployment(String name) { - GetApiDeploymentRequest request = GetApiDeploymentRequest.newBuilder().setName(name).build(); - return getApiDeployment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetApiDeploymentRequest request =
-   *       GetApiDeploymentRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .build();
-   *   ApiDeployment response = registryClient.getApiDeployment(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 ApiDeployment getApiDeployment(GetApiDeploymentRequest request) { - return getApiDeploymentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetApiDeploymentRequest request =
-   *       GetApiDeploymentRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.getApiDeploymentCallable().futureCall(request);
-   *   // Do something.
-   *   ApiDeployment response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getApiDeploymentCallable() { - return stub.getApiDeploymentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
-   *   ApiDeployment apiDeployment = ApiDeployment.newBuilder().build();
-   *   String apiDeploymentId = "apiDeploymentId-1299472902";
-   *   ApiDeployment response =
-   *       registryClient.createApiDeployment(parent, apiDeployment, apiDeploymentId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of deployments. Format: - * `projects/*/locations/*/apis/*` - * @param apiDeployment Required. The deployment to create. - * @param apiDeploymentId Required. The ID to use for the deployment, which will become the final - * component of the deployment's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiDeployment createApiDeployment( - ApiName parent, ApiDeployment apiDeployment, String apiDeploymentId) { - CreateApiDeploymentRequest request = - CreateApiDeploymentRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setApiDeployment(apiDeployment) - .setApiDeploymentId(apiDeploymentId) - .build(); - return createApiDeployment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString();
-   *   ApiDeployment apiDeployment = ApiDeployment.newBuilder().build();
-   *   String apiDeploymentId = "apiDeploymentId-1299472902";
-   *   ApiDeployment response =
-   *       registryClient.createApiDeployment(parent, apiDeployment, apiDeploymentId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of deployments. Format: - * `projects/*/locations/*/apis/*` - * @param apiDeployment Required. The deployment to create. - * @param apiDeploymentId Required. The ID to use for the deployment, which will become the final - * component of the deployment's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiDeployment createApiDeployment( - String parent, ApiDeployment apiDeployment, String apiDeploymentId) { - CreateApiDeploymentRequest request = - CreateApiDeploymentRequest.newBuilder() - .setParent(parent) - .setApiDeployment(apiDeployment) - .setApiDeploymentId(apiDeploymentId) - .build(); - return createApiDeployment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   CreateApiDeploymentRequest request =
-   *       CreateApiDeploymentRequest.newBuilder()
-   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setApiDeployment(ApiDeployment.newBuilder().build())
-   *           .setApiDeploymentId("apiDeploymentId-1299472902")
-   *           .build();
-   *   ApiDeployment response = registryClient.createApiDeployment(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 ApiDeployment createApiDeployment(CreateApiDeploymentRequest request) { - return createApiDeploymentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   CreateApiDeploymentRequest request =
-   *       CreateApiDeploymentRequest.newBuilder()
-   *           .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setApiDeployment(ApiDeployment.newBuilder().build())
-   *           .setApiDeploymentId("apiDeploymentId-1299472902")
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.createApiDeploymentCallable().futureCall(request);
-   *   // Do something.
-   *   ApiDeployment response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createApiDeploymentCallable() { - return stub.createApiDeploymentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiDeployment apiDeployment = ApiDeployment.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   ApiDeployment response = registryClient.updateApiDeployment(apiDeployment, updateMask);
-   * }
-   * }
- * - * @param apiDeployment Required. The deployment to update. - *

The `name` field is used to identify the deployment to update. Format: - * `projects/*/locations/*/apis/*/deployments/*` - * @param updateMask The list of fields to be updated. If omitted, all fields are updated that are - * set in the request message (fields set to default values are ignored). If an asterisk - * "*" is specified, all fields are updated, including fields that are unspecified/default - * in the request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiDeployment updateApiDeployment( - ApiDeployment apiDeployment, FieldMask updateMask) { - UpdateApiDeploymentRequest request = - UpdateApiDeploymentRequest.newBuilder() - .setApiDeployment(apiDeployment) - .setUpdateMask(updateMask) - .build(); - return updateApiDeployment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   UpdateApiDeploymentRequest request =
-   *       UpdateApiDeploymentRequest.newBuilder()
-   *           .setApiDeployment(ApiDeployment.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setAllowMissing(true)
-   *           .build();
-   *   ApiDeployment response = registryClient.updateApiDeployment(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 ApiDeployment updateApiDeployment(UpdateApiDeploymentRequest request) { - return updateApiDeploymentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to modify a specified deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   UpdateApiDeploymentRequest request =
-   *       UpdateApiDeploymentRequest.newBuilder()
-   *           .setApiDeployment(ApiDeployment.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setAllowMissing(true)
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.updateApiDeploymentCallable().futureCall(request);
-   *   // Do something.
-   *   ApiDeployment response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateApiDeploymentCallable() { - return stub.updateApiDeploymentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified deployment, all revisions, and all child resources (e.g., artifacts). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiDeploymentName name =
-   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]");
-   *   registryClient.deleteApiDeployment(name);
-   * }
-   * }
- * - * @param name Required. The name of the deployment to delete. Format: - * `projects/*/locations/*/apis/*/deployments/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteApiDeployment(ApiDeploymentName name) { - DeleteApiDeploymentRequest request = - DeleteApiDeploymentRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteApiDeployment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified deployment, all revisions, and all child resources (e.g., artifacts). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name =
-   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString();
-   *   registryClient.deleteApiDeployment(name);
-   * }
-   * }
- * - * @param name Required. The name of the deployment to delete. Format: - * `projects/*/locations/*/apis/*/deployments/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteApiDeployment(String name) { - DeleteApiDeploymentRequest request = - DeleteApiDeploymentRequest.newBuilder().setName(name).build(); - deleteApiDeployment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified deployment, all revisions, and all child resources (e.g., artifacts). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiDeploymentRequest request =
-   *       DeleteApiDeploymentRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .setForce(true)
-   *           .build();
-   *   registryClient.deleteApiDeployment(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 deleteApiDeployment(DeleteApiDeploymentRequest request) { - deleteApiDeploymentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified deployment, all revisions, and all child resources (e.g., artifacts). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiDeploymentRequest request =
-   *       DeleteApiDeploymentRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .setForce(true)
-   *           .build();
-   *   ApiFuture future = registryClient.deleteApiDeploymentCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteApiDeploymentCallable() { - return stub.deleteApiDeploymentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a tag to a specified revision of a deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   TagApiDeploymentRevisionRequest request =
-   *       TagApiDeploymentRevisionRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .setTag("tag114586")
-   *           .build();
-   *   ApiDeployment response = registryClient.tagApiDeploymentRevision(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 ApiDeployment tagApiDeploymentRevision(TagApiDeploymentRevisionRequest request) { - return tagApiDeploymentRevisionCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a tag to a specified revision of a deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   TagApiDeploymentRevisionRequest request =
-   *       TagApiDeploymentRevisionRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .setTag("tag114586")
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.tagApiDeploymentRevisionCallable().futureCall(request);
-   *   // Do something.
-   *   ApiDeployment response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - tagApiDeploymentRevisionCallable() { - return stub.tagApiDeploymentRevisionCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all revisions of a deployment. Revisions are returned in descending order of revision - * creation time. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiDeploymentRevisionsRequest request =
-   *       ListApiDeploymentRevisionsRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (ApiDeployment element :
-   *       registryClient.listApiDeploymentRevisions(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 ListApiDeploymentRevisionsPagedResponse listApiDeploymentRevisions( - ListApiDeploymentRevisionsRequest request) { - return listApiDeploymentRevisionsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all revisions of a deployment. Revisions are returned in descending order of revision - * creation time. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiDeploymentRevisionsRequest request =
-   *       ListApiDeploymentRevisionsRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.listApiDeploymentRevisionsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ApiDeployment element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsPagedResponse> - listApiDeploymentRevisionsPagedCallable() { - return stub.listApiDeploymentRevisionsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all revisions of a deployment. Revisions are returned in descending order of revision - * creation time. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListApiDeploymentRevisionsRequest request =
-   *       ListApiDeploymentRevisionsRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListApiDeploymentRevisionsResponse response =
-   *         registryClient.listApiDeploymentRevisionsCallable().call(request);
-   *     for (ApiDeployment element : response.getApiDeploymentsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listApiDeploymentRevisionsCallable() { - return stub.listApiDeploymentRevisionsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the current revision to a specified prior revision. Note that this creates a new revision - * with a new revision ID. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   RollbackApiDeploymentRequest request =
-   *       RollbackApiDeploymentRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .setRevisionId("revisionId-1507445162")
-   *           .build();
-   *   ApiDeployment response = registryClient.rollbackApiDeployment(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 ApiDeployment rollbackApiDeployment(RollbackApiDeploymentRequest request) { - return rollbackApiDeploymentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the current revision to a specified prior revision. Note that this creates a new revision - * with a new revision ID. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   RollbackApiDeploymentRequest request =
-   *       RollbackApiDeploymentRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .setRevisionId("revisionId-1507445162")
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.rollbackApiDeploymentCallable().futureCall(request);
-   *   // Do something.
-   *   ApiDeployment response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - rollbackApiDeploymentCallable() { - return stub.rollbackApiDeploymentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a revision of a deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiDeploymentName name =
-   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]");
-   *   ApiDeployment response = registryClient.deleteApiDeploymentRevision(name);
-   * }
-   * }
- * - * @param name Required. The name of the deployment revision to be deleted, with a revision ID - * explicitly included. - *

Example: - * `projects/sample/locations/global/apis/petstore/deployments/prod{@literal @}c7cfa2a8` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiDeployment deleteApiDeploymentRevision(ApiDeploymentName name) { - DeleteApiDeploymentRevisionRequest request = - DeleteApiDeploymentRevisionRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return deleteApiDeploymentRevision(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a revision of a deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name =
-   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString();
-   *   ApiDeployment response = registryClient.deleteApiDeploymentRevision(name);
-   * }
-   * }
- * - * @param name Required. The name of the deployment revision to be deleted, with a revision ID - * explicitly included. - *

Example: - * `projects/sample/locations/global/apis/petstore/deployments/prod{@literal @}c7cfa2a8` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ApiDeployment deleteApiDeploymentRevision(String name) { - DeleteApiDeploymentRevisionRequest request = - DeleteApiDeploymentRevisionRequest.newBuilder().setName(name).build(); - return deleteApiDeploymentRevision(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a revision of a deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiDeploymentRevisionRequest request =
-   *       DeleteApiDeploymentRevisionRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .build();
-   *   ApiDeployment response = registryClient.deleteApiDeploymentRevision(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 ApiDeployment deleteApiDeploymentRevision( - DeleteApiDeploymentRevisionRequest request) { - return deleteApiDeploymentRevisionCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a revision of a deployment. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteApiDeploymentRevisionRequest request =
-   *       DeleteApiDeploymentRevisionRequest.newBuilder()
-   *           .setName(
-   *               ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.deleteApiDeploymentRevisionCallable().futureCall(request);
-   *   // Do something.
-   *   ApiDeployment response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - deleteApiDeploymentRevisionCallable() { - return stub.deleteApiDeploymentRevisionCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching artifacts. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiDeploymentName parent =
-   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]");
-   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListArtifactsPagedResponse listArtifacts(ApiDeploymentName parent) { - ListArtifactsRequest request = - ListArtifactsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listArtifacts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching artifacts. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
-   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListArtifactsPagedResponse listArtifacts(ApiName parent) { - ListArtifactsRequest request = - ListArtifactsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listArtifacts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching artifacts. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiSpecName parent =
-   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
-   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListArtifactsPagedResponse listArtifacts(ApiSpecName parent) { - ListArtifactsRequest request = - ListArtifactsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listArtifacts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching artifacts. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
-   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListArtifactsPagedResponse listArtifacts(ApiVersionName parent) { - ListArtifactsRequest request = - ListArtifactsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listArtifacts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching artifacts. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListArtifactsPagedResponse listArtifacts(LocationName parent) { - ListArtifactsRequest request = - ListArtifactsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listArtifacts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching artifacts. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListArtifactsPagedResponse listArtifacts(String parent) { - ListArtifactsRequest request = ListArtifactsRequest.newBuilder().setParent(parent).build(); - return listArtifacts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching artifacts. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListArtifactsRequest request =
-   *       ListArtifactsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   for (Artifact element : registryClient.listArtifacts(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 ListArtifactsPagedResponse listArtifacts(ListArtifactsRequest request) { - return listArtifactsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching artifacts. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListArtifactsRequest request =
-   *       ListArtifactsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   ApiFuture future = registryClient.listArtifactsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Artifact element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listArtifactsPagedCallable() { - return stub.listArtifactsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns matching artifacts. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListArtifactsRequest request =
-   *       ListArtifactsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   while (true) {
-   *     ListArtifactsResponse response = registryClient.listArtifactsCallable().call(request);
-   *     for (Artifact element : response.getArtifactsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listArtifactsCallable() { - return stub.listArtifactsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ArtifactName name =
-   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]");
-   *   Artifact response = registryClient.getArtifact(name);
-   * }
-   * }
- * - * @param name Required. The name of the artifact to retrieve. Format: `{parent}/artifacts/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Artifact getArtifact(ArtifactName name) { - GetArtifactRequest request = - GetArtifactRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getArtifact(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name =
-   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]")
-   *           .toString();
-   *   Artifact response = registryClient.getArtifact(name);
-   * }
-   * }
- * - * @param name Required. The name of the artifact to retrieve. Format: `{parent}/artifacts/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Artifact getArtifact(String name) { - GetArtifactRequest request = GetArtifactRequest.newBuilder().setName(name).build(); - return getArtifact(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetArtifactRequest request =
-   *       GetArtifactRequest.newBuilder()
-   *           .setName(
-   *               ArtifactName.ofProjectLocationArtifactName(
-   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
-   *                   .toString())
-   *           .build();
-   *   Artifact response = registryClient.getArtifact(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 Artifact getArtifact(GetArtifactRequest request) { - return getArtifactCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetArtifactRequest request =
-   *       GetArtifactRequest.newBuilder()
-   *           .setName(
-   *               ArtifactName.ofProjectLocationArtifactName(
-   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future = registryClient.getArtifactCallable().futureCall(request);
-   *   // Do something.
-   *   Artifact response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getArtifactCallable() { - return stub.getArtifactCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the contents of a specified artifact. If artifacts are stored with GZip compression, - * the default behavior is to return the artifact uncompressed (the mime_type response field - * indicates the exact format returned). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ArtifactName name =
-   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]");
-   *   HttpBody response = registryClient.getArtifactContents(name);
-   * }
-   * }
- * - * @param name Required. The name of the artifact whose contents should be retrieved. Format: - * `{parent}/artifacts/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HttpBody getArtifactContents(ArtifactName name) { - GetArtifactContentsRequest request = - GetArtifactContentsRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getArtifactContents(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the contents of a specified artifact. If artifacts are stored with GZip compression, - * the default behavior is to return the artifact uncompressed (the mime_type response field - * indicates the exact format returned). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name =
-   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]")
-   *           .toString();
-   *   HttpBody response = registryClient.getArtifactContents(name);
-   * }
-   * }
- * - * @param name Required. The name of the artifact whose contents should be retrieved. Format: - * `{parent}/artifacts/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HttpBody getArtifactContents(String name) { - GetArtifactContentsRequest request = - GetArtifactContentsRequest.newBuilder().setName(name).build(); - return getArtifactContents(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the contents of a specified artifact. If artifacts are stored with GZip compression, - * the default behavior is to return the artifact uncompressed (the mime_type response field - * indicates the exact format returned). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetArtifactContentsRequest request =
-   *       GetArtifactContentsRequest.newBuilder()
-   *           .setName(
-   *               ArtifactName.ofProjectLocationArtifactName(
-   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
-   *                   .toString())
-   *           .build();
-   *   HttpBody response = registryClient.getArtifactContents(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 HttpBody getArtifactContents(GetArtifactContentsRequest request) { - return getArtifactContentsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the contents of a specified artifact. If artifacts are stored with GZip compression, - * the default behavior is to return the artifact uncompressed (the mime_type response field - * indicates the exact format returned). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetArtifactContentsRequest request =
-   *       GetArtifactContentsRequest.newBuilder()
-   *           .setName(
-   *               ArtifactName.ofProjectLocationArtifactName(
-   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future = registryClient.getArtifactContentsCallable().futureCall(request);
-   *   // Do something.
-   *   HttpBody response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getArtifactContentsCallable() { - return stub.getArtifactContentsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiDeploymentName parent =
-   *       ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]");
-   *   Artifact artifact = Artifact.newBuilder().build();
-   *   String artifactId = "artifactId240640653";
-   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @param artifact Required. The artifact to create. - * @param artifactId Required. The ID to use for the artifact, which will become the final - * component of the artifact's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Artifact createArtifact( - ApiDeploymentName parent, Artifact artifact, String artifactId) { - CreateArtifactRequest request = - CreateArtifactRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setArtifact(artifact) - .setArtifactId(artifactId) - .build(); - return createArtifact(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
-   *   Artifact artifact = Artifact.newBuilder().build();
-   *   String artifactId = "artifactId240640653";
-   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @param artifact Required. The artifact to create. - * @param artifactId Required. The ID to use for the artifact, which will become the final - * component of the artifact's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Artifact createArtifact(ApiName parent, Artifact artifact, String artifactId) { - CreateArtifactRequest request = - CreateArtifactRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setArtifact(artifact) - .setArtifactId(artifactId) - .build(); - return createArtifact(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiSpecName parent =
-   *       ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]");
-   *   Artifact artifact = Artifact.newBuilder().build();
-   *   String artifactId = "artifactId240640653";
-   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @param artifact Required. The artifact to create. - * @param artifactId Required. The ID to use for the artifact, which will become the final - * component of the artifact's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Artifact createArtifact(ApiSpecName parent, Artifact artifact, String artifactId) { - CreateArtifactRequest request = - CreateArtifactRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setArtifact(artifact) - .setArtifactId(artifactId) - .build(); - return createArtifact(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
-   *   Artifact artifact = Artifact.newBuilder().build();
-   *   String artifactId = "artifactId240640653";
-   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @param artifact Required. The artifact to create. - * @param artifactId Required. The ID to use for the artifact, which will become the final - * component of the artifact's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Artifact createArtifact( - ApiVersionName parent, Artifact artifact, String artifactId) { - CreateArtifactRequest request = - CreateArtifactRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setArtifact(artifact) - .setArtifactId(artifactId) - .build(); - return createArtifact(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Artifact artifact = Artifact.newBuilder().build();
-   *   String artifactId = "artifactId240640653";
-   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @param artifact Required. The artifact to create. - * @param artifactId Required. The ID to use for the artifact, which will become the final - * component of the artifact's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Artifact createArtifact(LocationName parent, Artifact artifact, String artifactId) { - CreateArtifactRequest request = - CreateArtifactRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setArtifact(artifact) - .setArtifactId(artifactId) - .build(); - return createArtifact(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Artifact artifact = Artifact.newBuilder().build();
-   *   String artifactId = "artifactId240640653";
-   *   Artifact response = registryClient.createArtifact(parent, artifact, artifactId);
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of artifacts. Format: `{parent}` - * @param artifact Required. The artifact to create. - * @param artifactId Required. The ID to use for the artifact, which will become the final - * component of the artifact's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Following AIP-162, IDs must not have the form of a UUID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Artifact createArtifact(String parent, Artifact artifact, String artifactId) { - CreateArtifactRequest request = - CreateArtifactRequest.newBuilder() - .setParent(parent) - .setArtifact(artifact) - .setArtifactId(artifactId) - .build(); - return createArtifact(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   CreateArtifactRequest request =
-   *       CreateArtifactRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setArtifact(Artifact.newBuilder().build())
-   *           .setArtifactId("artifactId240640653")
-   *           .build();
-   *   Artifact response = registryClient.createArtifact(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 Artifact createArtifact(CreateArtifactRequest request) { - return createArtifactCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   CreateArtifactRequest request =
-   *       CreateArtifactRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setArtifact(Artifact.newBuilder().build())
-   *           .setArtifactId("artifactId240640653")
-   *           .build();
-   *   ApiFuture future = registryClient.createArtifactCallable().futureCall(request);
-   *   // Do something.
-   *   Artifact response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createArtifactCallable() { - return stub.createArtifactCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to replace a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   Artifact artifact = Artifact.newBuilder().build();
-   *   Artifact response = registryClient.replaceArtifact(artifact);
-   * }
-   * }
- * - * @param artifact Required. The artifact to replace. - *

The `name` field is used to identify the artifact to replace. Format: - * `{parent}/artifacts/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Artifact replaceArtifact(Artifact artifact) { - ReplaceArtifactRequest request = - ReplaceArtifactRequest.newBuilder().setArtifact(artifact).build(); - return replaceArtifact(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to replace a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ReplaceArtifactRequest request =
-   *       ReplaceArtifactRequest.newBuilder().setArtifact(Artifact.newBuilder().build()).build();
-   *   Artifact response = registryClient.replaceArtifact(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 Artifact replaceArtifact(ReplaceArtifactRequest request) { - return replaceArtifactCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Used to replace a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ReplaceArtifactRequest request =
-   *       ReplaceArtifactRequest.newBuilder().setArtifact(Artifact.newBuilder().build()).build();
-   *   ApiFuture future = registryClient.replaceArtifactCallable().futureCall(request);
-   *   // Do something.
-   *   Artifact response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable replaceArtifactCallable() { - return stub.replaceArtifactCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ArtifactName name =
-   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]");
-   *   registryClient.deleteArtifact(name);
-   * }
-   * }
- * - * @param name Required. The name of the artifact to delete. Format: `{parent}/artifacts/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteArtifact(ArtifactName name) { - DeleteArtifactRequest request = - DeleteArtifactRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteArtifact(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   String name =
-   *       ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]")
-   *           .toString();
-   *   registryClient.deleteArtifact(name);
-   * }
-   * }
- * - * @param name Required. The name of the artifact to delete. Format: `{parent}/artifacts/*` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteArtifact(String name) { - DeleteArtifactRequest request = DeleteArtifactRequest.newBuilder().setName(name).build(); - deleteArtifact(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteArtifactRequest request =
-   *       DeleteArtifactRequest.newBuilder()
-   *           .setName(
-   *               ArtifactName.ofProjectLocationArtifactName(
-   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
-   *                   .toString())
-   *           .build();
-   *   registryClient.deleteArtifact(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 deleteArtifact(DeleteArtifactRequest request) { - deleteArtifactCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a specified artifact. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   DeleteArtifactRequest request =
-   *       DeleteArtifactRequest.newBuilder()
-   *           .setName(
-   *               ArtifactName.ofProjectLocationArtifactName(
-   *                       "[PROJECT]", "[LOCATION]", "[ARTIFACT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future = registryClient.deleteArtifactCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteArtifactCallable() { - return stub.deleteArtifactCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists information about the supported locations for this service. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Location element : registryClient.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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future = registryClient.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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListLocationsResponse response = registryClient.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 for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
-   *   Location response = registryClient.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 for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
-   *   ApiFuture future = registryClient.getLocationCallable().futureCall(request);
-   *   // Do something.
-   *   Location response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getLocationCallable() { - return stub.getLocationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Policy response = registryClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { - return setIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = registryClient.setIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable setIamPolicyCallable() { - return stub.setIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   Policy response = registryClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { - return getIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = registryClient.getIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getIamPolicyCallable() { - return stub.getIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   TestIamPermissionsResponse response = registryClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { - return testIamPermissionsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (RegistryClient registryClient = RegistryClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       registryClient.testIamPermissionsCallable().futureCall(request);
-   *   // Do something.
-   *   TestIamPermissionsResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - testIamPermissionsCallable() { - return stub.testIamPermissionsCallable(); - } - - @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 ListApisPagedResponse - extends AbstractPagedListResponse< - ListApisRequest, ListApisResponse, Api, ListApisPage, ListApisFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListApisPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListApisPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListApisPagedResponse(ListApisPage page) { - super(page, ListApisFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListApisPage - extends AbstractPage { - - private ListApisPage( - PageContext context, ListApisResponse response) { - super(context, response); - } - - private static ListApisPage createEmptyPage() { - return new ListApisPage(null, null); - } - - @Override - protected ListApisPage createPage( - PageContext context, ListApisResponse response) { - return new ListApisPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListApisFixedSizeCollection - extends AbstractFixedSizeCollection< - ListApisRequest, ListApisResponse, Api, ListApisPage, ListApisFixedSizeCollection> { - - private ListApisFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListApisFixedSizeCollection createEmptyCollection() { - return new ListApisFixedSizeCollection(null, 0); - } - - @Override - protected ListApisFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListApisFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListApiVersionsPagedResponse - extends AbstractPagedListResponse< - ListApiVersionsRequest, ListApiVersionsResponse, ApiVersion, ListApiVersionsPage, - ListApiVersionsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListApiVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListApiVersionsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListApiVersionsPagedResponse(ListApiVersionsPage page) { - super(page, ListApiVersionsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListApiVersionsPage - extends AbstractPage< - ListApiVersionsRequest, ListApiVersionsResponse, ApiVersion, ListApiVersionsPage> { - - private ListApiVersionsPage( - PageContext context, - ListApiVersionsResponse response) { - super(context, response); - } - - private static ListApiVersionsPage createEmptyPage() { - return new ListApiVersionsPage(null, null); - } - - @Override - protected ListApiVersionsPage createPage( - PageContext context, - ListApiVersionsResponse response) { - return new ListApiVersionsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListApiVersionsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListApiVersionsRequest, ListApiVersionsResponse, ApiVersion, ListApiVersionsPage, - ListApiVersionsFixedSizeCollection> { - - private ListApiVersionsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListApiVersionsFixedSizeCollection createEmptyCollection() { - return new ListApiVersionsFixedSizeCollection(null, 0); - } - - @Override - protected ListApiVersionsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListApiVersionsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListApiSpecsPagedResponse - extends AbstractPagedListResponse< - ListApiSpecsRequest, ListApiSpecsResponse, ApiSpec, ListApiSpecsPage, - ListApiSpecsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListApiSpecsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListApiSpecsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListApiSpecsPagedResponse(ListApiSpecsPage page) { - super(page, ListApiSpecsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListApiSpecsPage - extends AbstractPage { - - private ListApiSpecsPage( - PageContext context, - ListApiSpecsResponse response) { - super(context, response); - } - - private static ListApiSpecsPage createEmptyPage() { - return new ListApiSpecsPage(null, null); - } - - @Override - protected ListApiSpecsPage createPage( - PageContext context, - ListApiSpecsResponse response) { - return new ListApiSpecsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListApiSpecsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListApiSpecsRequest, ListApiSpecsResponse, ApiSpec, ListApiSpecsPage, - ListApiSpecsFixedSizeCollection> { - - private ListApiSpecsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListApiSpecsFixedSizeCollection createEmptyCollection() { - return new ListApiSpecsFixedSizeCollection(null, 0); - } - - @Override - protected ListApiSpecsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListApiSpecsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListApiSpecRevisionsPagedResponse - extends AbstractPagedListResponse< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, ApiSpec, - ListApiSpecRevisionsPage, ListApiSpecRevisionsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListApiSpecRevisionsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListApiSpecRevisionsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListApiSpecRevisionsPagedResponse(ListApiSpecRevisionsPage page) { - super(page, ListApiSpecRevisionsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListApiSpecRevisionsPage - extends AbstractPage< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, ApiSpec, - ListApiSpecRevisionsPage> { - - private ListApiSpecRevisionsPage( - PageContext context, - ListApiSpecRevisionsResponse response) { - super(context, response); - } - - private static ListApiSpecRevisionsPage createEmptyPage() { - return new ListApiSpecRevisionsPage(null, null); - } - - @Override - protected ListApiSpecRevisionsPage createPage( - PageContext context, - ListApiSpecRevisionsResponse response) { - return new ListApiSpecRevisionsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListApiSpecRevisionsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, ApiSpec, - ListApiSpecRevisionsPage, ListApiSpecRevisionsFixedSizeCollection> { - - private ListApiSpecRevisionsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListApiSpecRevisionsFixedSizeCollection createEmptyCollection() { - return new ListApiSpecRevisionsFixedSizeCollection(null, 0); - } - - @Override - protected ListApiSpecRevisionsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListApiSpecRevisionsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListApiDeploymentsPagedResponse - extends AbstractPagedListResponse< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ApiDeployment, - ListApiDeploymentsPage, ListApiDeploymentsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListApiDeploymentsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListApiDeploymentsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListApiDeploymentsPagedResponse(ListApiDeploymentsPage page) { - super(page, ListApiDeploymentsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListApiDeploymentsPage - extends AbstractPage< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ApiDeployment, - ListApiDeploymentsPage> { - - private ListApiDeploymentsPage( - PageContext context, - ListApiDeploymentsResponse response) { - super(context, response); - } - - private static ListApiDeploymentsPage createEmptyPage() { - return new ListApiDeploymentsPage(null, null); - } - - @Override - protected ListApiDeploymentsPage createPage( - PageContext context, - ListApiDeploymentsResponse response) { - return new ListApiDeploymentsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListApiDeploymentsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ApiDeployment, - ListApiDeploymentsPage, ListApiDeploymentsFixedSizeCollection> { - - private ListApiDeploymentsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListApiDeploymentsFixedSizeCollection createEmptyCollection() { - return new ListApiDeploymentsFixedSizeCollection(null, 0); - } - - @Override - protected ListApiDeploymentsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListApiDeploymentsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListApiDeploymentRevisionsPagedResponse - extends AbstractPagedListResponse< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, ApiDeployment, - ListApiDeploymentRevisionsPage, ListApiDeploymentRevisionsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ApiDeployment> - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListApiDeploymentRevisionsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListApiDeploymentRevisionsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListApiDeploymentRevisionsPagedResponse(ListApiDeploymentRevisionsPage page) { - super(page, ListApiDeploymentRevisionsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListApiDeploymentRevisionsPage - extends AbstractPage< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, ApiDeployment, - ListApiDeploymentRevisionsPage> { - - private ListApiDeploymentRevisionsPage( - PageContext< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ApiDeployment> - context, - ListApiDeploymentRevisionsResponse response) { - super(context, response); - } - - private static ListApiDeploymentRevisionsPage createEmptyPage() { - return new ListApiDeploymentRevisionsPage(null, null); - } - - @Override - protected ListApiDeploymentRevisionsPage createPage( - PageContext< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ApiDeployment> - context, - ListApiDeploymentRevisionsResponse response) { - return new ListApiDeploymentRevisionsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ApiDeployment> - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListApiDeploymentRevisionsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, ApiDeployment, - ListApiDeploymentRevisionsPage, ListApiDeploymentRevisionsFixedSizeCollection> { - - private ListApiDeploymentRevisionsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListApiDeploymentRevisionsFixedSizeCollection createEmptyCollection() { - return new ListApiDeploymentRevisionsFixedSizeCollection(null, 0); - } - - @Override - protected ListApiDeploymentRevisionsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListApiDeploymentRevisionsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListArtifactsPagedResponse - extends AbstractPagedListResponse< - ListArtifactsRequest, ListArtifactsResponse, Artifact, ListArtifactsPage, - ListArtifactsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListArtifactsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListArtifactsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListArtifactsPagedResponse(ListArtifactsPage page) { - super(page, ListArtifactsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListArtifactsPage - extends AbstractPage< - ListArtifactsRequest, ListArtifactsResponse, Artifact, ListArtifactsPage> { - - private ListArtifactsPage( - PageContext context, - ListArtifactsResponse response) { - super(context, response); - } - - private static ListArtifactsPage createEmptyPage() { - return new ListArtifactsPage(null, null); - } - - @Override - protected ListArtifactsPage createPage( - PageContext context, - ListArtifactsResponse response) { - return new ListArtifactsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListArtifactsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListArtifactsRequest, ListArtifactsResponse, Artifact, ListArtifactsPage, - ListArtifactsFixedSizeCollection> { - - private ListArtifactsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListArtifactsFixedSizeCollection createEmptyCollection() { - return new ListArtifactsFixedSizeCollection(null, 0); - } - - @Override - protected ListArtifactsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListArtifactsFixedSizeCollection(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( - PageContext context, - ListLocationsResponse response) { - super(context, response); - } - - private static ListLocationsPage createEmptyPage() { - return new ListLocationsPage(null, null); - } - - @Override - protected ListLocationsPage createPage( - PageContext context, - ListLocationsResponse response) { - return new ListLocationsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListLocationsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage, - ListLocationsFixedSizeCollection> { - - private ListLocationsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListLocationsFixedSizeCollection createEmptyCollection() { - return new ListLocationsFixedSizeCollection(null, 0); - } - - @Override - protected ListLocationsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListLocationsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistrySettings.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistrySettings.java deleted file mode 100644 index 10cb3014448b..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/RegistrySettings.java +++ /dev/null @@ -1,664 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1; - -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; - -import com.google.api.HttpBody; -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.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.apigeeregistry.v1.stub.RegistryStubSettings; -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.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link RegistryClient}. - * - *

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

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

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

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * RegistrySettings.Builder registrySettingsBuilder = RegistrySettings.newBuilder();
- * registrySettingsBuilder
- *     .getApiSettings()
- *     .setRetrySettings(
- *         registrySettingsBuilder
- *             .getApiSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * RegistrySettings registrySettings = registrySettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class RegistrySettings extends ClientSettings { - - /** Returns the object with the settings used for calls to listApis. */ - public PagedCallSettings - listApisSettings() { - return ((RegistryStubSettings) getStubSettings()).listApisSettings(); - } - - /** Returns the object with the settings used for calls to getApi. */ - public UnaryCallSettings getApiSettings() { - return ((RegistryStubSettings) getStubSettings()).getApiSettings(); - } - - /** Returns the object with the settings used for calls to createApi. */ - public UnaryCallSettings createApiSettings() { - return ((RegistryStubSettings) getStubSettings()).createApiSettings(); - } - - /** Returns the object with the settings used for calls to updateApi. */ - public UnaryCallSettings updateApiSettings() { - return ((RegistryStubSettings) getStubSettings()).updateApiSettings(); - } - - /** Returns the object with the settings used for calls to deleteApi. */ - public UnaryCallSettings deleteApiSettings() { - return ((RegistryStubSettings) getStubSettings()).deleteApiSettings(); - } - - /** Returns the object with the settings used for calls to listApiVersions. */ - public PagedCallSettings< - ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> - listApiVersionsSettings() { - return ((RegistryStubSettings) getStubSettings()).listApiVersionsSettings(); - } - - /** Returns the object with the settings used for calls to getApiVersion. */ - public UnaryCallSettings getApiVersionSettings() { - return ((RegistryStubSettings) getStubSettings()).getApiVersionSettings(); - } - - /** Returns the object with the settings used for calls to createApiVersion. */ - public UnaryCallSettings createApiVersionSettings() { - return ((RegistryStubSettings) getStubSettings()).createApiVersionSettings(); - } - - /** Returns the object with the settings used for calls to updateApiVersion. */ - public UnaryCallSettings updateApiVersionSettings() { - return ((RegistryStubSettings) getStubSettings()).updateApiVersionSettings(); - } - - /** Returns the object with the settings used for calls to deleteApiVersion. */ - public UnaryCallSettings deleteApiVersionSettings() { - return ((RegistryStubSettings) getStubSettings()).deleteApiVersionSettings(); - } - - /** Returns the object with the settings used for calls to listApiSpecs. */ - public PagedCallSettings - listApiSpecsSettings() { - return ((RegistryStubSettings) getStubSettings()).listApiSpecsSettings(); - } - - /** Returns the object with the settings used for calls to getApiSpec. */ - public UnaryCallSettings getApiSpecSettings() { - return ((RegistryStubSettings) getStubSettings()).getApiSpecSettings(); - } - - /** Returns the object with the settings used for calls to getApiSpecContents. */ - public UnaryCallSettings getApiSpecContentsSettings() { - return ((RegistryStubSettings) getStubSettings()).getApiSpecContentsSettings(); - } - - /** Returns the object with the settings used for calls to createApiSpec. */ - public UnaryCallSettings createApiSpecSettings() { - return ((RegistryStubSettings) getStubSettings()).createApiSpecSettings(); - } - - /** Returns the object with the settings used for calls to updateApiSpec. */ - public UnaryCallSettings updateApiSpecSettings() { - return ((RegistryStubSettings) getStubSettings()).updateApiSpecSettings(); - } - - /** Returns the object with the settings used for calls to deleteApiSpec. */ - public UnaryCallSettings deleteApiSpecSettings() { - return ((RegistryStubSettings) getStubSettings()).deleteApiSpecSettings(); - } - - /** Returns the object with the settings used for calls to tagApiSpecRevision. */ - public UnaryCallSettings tagApiSpecRevisionSettings() { - return ((RegistryStubSettings) getStubSettings()).tagApiSpecRevisionSettings(); - } - - /** Returns the object with the settings used for calls to listApiSpecRevisions. */ - public PagedCallSettings< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, - ListApiSpecRevisionsPagedResponse> - listApiSpecRevisionsSettings() { - return ((RegistryStubSettings) getStubSettings()).listApiSpecRevisionsSettings(); - } - - /** Returns the object with the settings used for calls to rollbackApiSpec. */ - public UnaryCallSettings rollbackApiSpecSettings() { - return ((RegistryStubSettings) getStubSettings()).rollbackApiSpecSettings(); - } - - /** Returns the object with the settings used for calls to deleteApiSpecRevision. */ - public UnaryCallSettings deleteApiSpecRevisionSettings() { - return ((RegistryStubSettings) getStubSettings()).deleteApiSpecRevisionSettings(); - } - - /** Returns the object with the settings used for calls to listApiDeployments. */ - public PagedCallSettings< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> - listApiDeploymentsSettings() { - return ((RegistryStubSettings) getStubSettings()).listApiDeploymentsSettings(); - } - - /** Returns the object with the settings used for calls to getApiDeployment. */ - public UnaryCallSettings getApiDeploymentSettings() { - return ((RegistryStubSettings) getStubSettings()).getApiDeploymentSettings(); - } - - /** Returns the object with the settings used for calls to createApiDeployment. */ - public UnaryCallSettings - createApiDeploymentSettings() { - return ((RegistryStubSettings) getStubSettings()).createApiDeploymentSettings(); - } - - /** Returns the object with the settings used for calls to updateApiDeployment. */ - public UnaryCallSettings - updateApiDeploymentSettings() { - return ((RegistryStubSettings) getStubSettings()).updateApiDeploymentSettings(); - } - - /** Returns the object with the settings used for calls to deleteApiDeployment. */ - public UnaryCallSettings deleteApiDeploymentSettings() { - return ((RegistryStubSettings) getStubSettings()).deleteApiDeploymentSettings(); - } - - /** Returns the object with the settings used for calls to tagApiDeploymentRevision. */ - public UnaryCallSettings - tagApiDeploymentRevisionSettings() { - return ((RegistryStubSettings) getStubSettings()).tagApiDeploymentRevisionSettings(); - } - - /** Returns the object with the settings used for calls to listApiDeploymentRevisions. */ - public PagedCallSettings< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ListApiDeploymentRevisionsPagedResponse> - listApiDeploymentRevisionsSettings() { - return ((RegistryStubSettings) getStubSettings()).listApiDeploymentRevisionsSettings(); - } - - /** Returns the object with the settings used for calls to rollbackApiDeployment. */ - public UnaryCallSettings - rollbackApiDeploymentSettings() { - return ((RegistryStubSettings) getStubSettings()).rollbackApiDeploymentSettings(); - } - - /** Returns the object with the settings used for calls to deleteApiDeploymentRevision. */ - public UnaryCallSettings - deleteApiDeploymentRevisionSettings() { - return ((RegistryStubSettings) getStubSettings()).deleteApiDeploymentRevisionSettings(); - } - - /** Returns the object with the settings used for calls to listArtifacts. */ - public PagedCallSettings - listArtifactsSettings() { - return ((RegistryStubSettings) getStubSettings()).listArtifactsSettings(); - } - - /** Returns the object with the settings used for calls to getArtifact. */ - public UnaryCallSettings getArtifactSettings() { - return ((RegistryStubSettings) getStubSettings()).getArtifactSettings(); - } - - /** Returns the object with the settings used for calls to getArtifactContents. */ - public UnaryCallSettings getArtifactContentsSettings() { - return ((RegistryStubSettings) getStubSettings()).getArtifactContentsSettings(); - } - - /** Returns the object with the settings used for calls to createArtifact. */ - public UnaryCallSettings createArtifactSettings() { - return ((RegistryStubSettings) getStubSettings()).createArtifactSettings(); - } - - /** Returns the object with the settings used for calls to replaceArtifact. */ - public UnaryCallSettings replaceArtifactSettings() { - return ((RegistryStubSettings) getStubSettings()).replaceArtifactSettings(); - } - - /** Returns the object with the settings used for calls to deleteArtifact. */ - public UnaryCallSettings deleteArtifactSettings() { - return ((RegistryStubSettings) getStubSettings()).deleteArtifactSettings(); - } - - /** Returns the object with the settings used for calls to listLocations. */ - public PagedCallSettings - listLocationsSettings() { - return ((RegistryStubSettings) getStubSettings()).listLocationsSettings(); - } - - /** Returns the object with the settings used for calls to getLocation. */ - public UnaryCallSettings getLocationSettings() { - return ((RegistryStubSettings) getStubSettings()).getLocationSettings(); - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return ((RegistryStubSettings) getStubSettings()).setIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to getIamPolicy. */ - public UnaryCallSettings getIamPolicySettings() { - return ((RegistryStubSettings) getStubSettings()).getIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return ((RegistryStubSettings) getStubSettings()).testIamPermissionsSettings(); - } - - public static final RegistrySettings create(RegistryStubSettings stub) throws IOException { - return new RegistrySettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return RegistryStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return RegistryStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return RegistryStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return RegistryStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return RegistryStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return RegistryStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return RegistryStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return RegistryStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(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 RegistrySettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for RegistrySettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(RegistryStubSettings.newBuilder(clientContext)); - } - - protected Builder(RegistrySettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(RegistryStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(RegistryStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(RegistryStubSettings.newHttpJsonBuilder()); - } - - public RegistryStubSettings.Builder getStubSettingsBuilder() { - return ((RegistryStubSettings.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 listApis. */ - public PagedCallSettings.Builder - listApisSettings() { - return getStubSettingsBuilder().listApisSettings(); - } - - /** Returns the builder for the settings used for calls to getApi. */ - public UnaryCallSettings.Builder getApiSettings() { - return getStubSettingsBuilder().getApiSettings(); - } - - /** Returns the builder for the settings used for calls to createApi. */ - public UnaryCallSettings.Builder createApiSettings() { - return getStubSettingsBuilder().createApiSettings(); - } - - /** Returns the builder for the settings used for calls to updateApi. */ - public UnaryCallSettings.Builder updateApiSettings() { - return getStubSettingsBuilder().updateApiSettings(); - } - - /** Returns the builder for the settings used for calls to deleteApi. */ - public UnaryCallSettings.Builder deleteApiSettings() { - return getStubSettingsBuilder().deleteApiSettings(); - } - - /** Returns the builder for the settings used for calls to listApiVersions. */ - public PagedCallSettings.Builder< - ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> - listApiVersionsSettings() { - return getStubSettingsBuilder().listApiVersionsSettings(); - } - - /** Returns the builder for the settings used for calls to getApiVersion. */ - public UnaryCallSettings.Builder getApiVersionSettings() { - return getStubSettingsBuilder().getApiVersionSettings(); - } - - /** Returns the builder for the settings used for calls to createApiVersion. */ - public UnaryCallSettings.Builder - createApiVersionSettings() { - return getStubSettingsBuilder().createApiVersionSettings(); - } - - /** Returns the builder for the settings used for calls to updateApiVersion. */ - public UnaryCallSettings.Builder - updateApiVersionSettings() { - return getStubSettingsBuilder().updateApiVersionSettings(); - } - - /** Returns the builder for the settings used for calls to deleteApiVersion. */ - public UnaryCallSettings.Builder deleteApiVersionSettings() { - return getStubSettingsBuilder().deleteApiVersionSettings(); - } - - /** Returns the builder for the settings used for calls to listApiSpecs. */ - public PagedCallSettings.Builder< - ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse> - listApiSpecsSettings() { - return getStubSettingsBuilder().listApiSpecsSettings(); - } - - /** Returns the builder for the settings used for calls to getApiSpec. */ - public UnaryCallSettings.Builder getApiSpecSettings() { - return getStubSettingsBuilder().getApiSpecSettings(); - } - - /** Returns the builder for the settings used for calls to getApiSpecContents. */ - public UnaryCallSettings.Builder - getApiSpecContentsSettings() { - return getStubSettingsBuilder().getApiSpecContentsSettings(); - } - - /** Returns the builder for the settings used for calls to createApiSpec. */ - public UnaryCallSettings.Builder createApiSpecSettings() { - return getStubSettingsBuilder().createApiSpecSettings(); - } - - /** Returns the builder for the settings used for calls to updateApiSpec. */ - public UnaryCallSettings.Builder updateApiSpecSettings() { - return getStubSettingsBuilder().updateApiSpecSettings(); - } - - /** Returns the builder for the settings used for calls to deleteApiSpec. */ - public UnaryCallSettings.Builder deleteApiSpecSettings() { - return getStubSettingsBuilder().deleteApiSpecSettings(); - } - - /** Returns the builder for the settings used for calls to tagApiSpecRevision. */ - public UnaryCallSettings.Builder - tagApiSpecRevisionSettings() { - return getStubSettingsBuilder().tagApiSpecRevisionSettings(); - } - - /** Returns the builder for the settings used for calls to listApiSpecRevisions. */ - public PagedCallSettings.Builder< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, - ListApiSpecRevisionsPagedResponse> - listApiSpecRevisionsSettings() { - return getStubSettingsBuilder().listApiSpecRevisionsSettings(); - } - - /** Returns the builder for the settings used for calls to rollbackApiSpec. */ - public UnaryCallSettings.Builder rollbackApiSpecSettings() { - return getStubSettingsBuilder().rollbackApiSpecSettings(); - } - - /** Returns the builder for the settings used for calls to deleteApiSpecRevision. */ - public UnaryCallSettings.Builder - deleteApiSpecRevisionSettings() { - return getStubSettingsBuilder().deleteApiSpecRevisionSettings(); - } - - /** Returns the builder for the settings used for calls to listApiDeployments. */ - public PagedCallSettings.Builder< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> - listApiDeploymentsSettings() { - return getStubSettingsBuilder().listApiDeploymentsSettings(); - } - - /** Returns the builder for the settings used for calls to getApiDeployment. */ - public UnaryCallSettings.Builder - getApiDeploymentSettings() { - return getStubSettingsBuilder().getApiDeploymentSettings(); - } - - /** Returns the builder for the settings used for calls to createApiDeployment. */ - public UnaryCallSettings.Builder - createApiDeploymentSettings() { - return getStubSettingsBuilder().createApiDeploymentSettings(); - } - - /** Returns the builder for the settings used for calls to updateApiDeployment. */ - public UnaryCallSettings.Builder - updateApiDeploymentSettings() { - return getStubSettingsBuilder().updateApiDeploymentSettings(); - } - - /** Returns the builder for the settings used for calls to deleteApiDeployment. */ - public UnaryCallSettings.Builder - deleteApiDeploymentSettings() { - return getStubSettingsBuilder().deleteApiDeploymentSettings(); - } - - /** Returns the builder for the settings used for calls to tagApiDeploymentRevision. */ - public UnaryCallSettings.Builder - tagApiDeploymentRevisionSettings() { - return getStubSettingsBuilder().tagApiDeploymentRevisionSettings(); - } - - /** Returns the builder for the settings used for calls to listApiDeploymentRevisions. */ - public PagedCallSettings.Builder< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ListApiDeploymentRevisionsPagedResponse> - listApiDeploymentRevisionsSettings() { - return getStubSettingsBuilder().listApiDeploymentRevisionsSettings(); - } - - /** Returns the builder for the settings used for calls to rollbackApiDeployment. */ - public UnaryCallSettings.Builder - rollbackApiDeploymentSettings() { - return getStubSettingsBuilder().rollbackApiDeploymentSettings(); - } - - /** Returns the builder for the settings used for calls to deleteApiDeploymentRevision. */ - public UnaryCallSettings.Builder - deleteApiDeploymentRevisionSettings() { - return getStubSettingsBuilder().deleteApiDeploymentRevisionSettings(); - } - - /** Returns the builder for the settings used for calls to listArtifacts. */ - public PagedCallSettings.Builder< - ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse> - listArtifactsSettings() { - return getStubSettingsBuilder().listArtifactsSettings(); - } - - /** Returns the builder for the settings used for calls to getArtifact. */ - public UnaryCallSettings.Builder getArtifactSettings() { - return getStubSettingsBuilder().getArtifactSettings(); - } - - /** Returns the builder for the settings used for calls to getArtifactContents. */ - public UnaryCallSettings.Builder - getArtifactContentsSettings() { - return getStubSettingsBuilder().getArtifactContentsSettings(); - } - - /** Returns the builder for the settings used for calls to createArtifact. */ - public UnaryCallSettings.Builder createArtifactSettings() { - return getStubSettingsBuilder().createArtifactSettings(); - } - - /** Returns the builder for the settings used for calls to replaceArtifact. */ - public UnaryCallSettings.Builder replaceArtifactSettings() { - return getStubSettingsBuilder().replaceArtifactSettings(); - } - - /** Returns the builder for the settings used for calls to deleteArtifact. */ - public UnaryCallSettings.Builder deleteArtifactSettings() { - return getStubSettingsBuilder().deleteArtifactSettings(); - } - - /** 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(); - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return getStubSettingsBuilder().setIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to getIamPolicy. */ - public UnaryCallSettings.Builder getIamPolicySettings() { - return getStubSettingsBuilder().getIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return getStubSettingsBuilder().testIamPermissionsSettings(); - } - - @Override - public RegistrySettings build() throws IOException { - return new RegistrySettings(this); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/gapic_metadata.json b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/gapic_metadata.json deleted file mode 100644 index bc8c07923bf7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/gapic_metadata.json +++ /dev/null @@ -1,171 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.apigeeregistry.v1", - "libraryPackage": "com.google.cloud.apigeeregistry.v1", - "services": { - "Provisioning": { - "clients": { - "grpc": { - "libraryClient": "ProvisioningClient", - "rpcs": { - "CreateInstance": { - "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"] - }, - "DeleteInstance": { - "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"] - }, - "GetIamPolicy": { - "methods": ["getIamPolicy", "getIamPolicyCallable"] - }, - "GetInstance": { - "methods": ["getInstance", "getInstance", "getInstance", "getInstanceCallable"] - }, - "GetLocation": { - "methods": ["getLocation", "getLocationCallable"] - }, - "ListLocations": { - "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] - }, - "SetIamPolicy": { - "methods": ["setIamPolicy", "setIamPolicyCallable"] - }, - "TestIamPermissions": { - "methods": ["testIamPermissions", "testIamPermissionsCallable"] - } - } - } - } - }, - "Registry": { - "clients": { - "grpc": { - "libraryClient": "RegistryClient", - "rpcs": { - "CreateApi": { - "methods": ["createApi", "createApi", "createApi", "createApiCallable"] - }, - "CreateApiDeployment": { - "methods": ["createApiDeployment", "createApiDeployment", "createApiDeployment", "createApiDeploymentCallable"] - }, - "CreateApiSpec": { - "methods": ["createApiSpec", "createApiSpec", "createApiSpec", "createApiSpecCallable"] - }, - "CreateApiVersion": { - "methods": ["createApiVersion", "createApiVersion", "createApiVersion", "createApiVersionCallable"] - }, - "CreateArtifact": { - "methods": ["createArtifact", "createArtifact", "createArtifact", "createArtifact", "createArtifact", "createArtifact", "createArtifact", "createArtifactCallable"] - }, - "DeleteApi": { - "methods": ["deleteApi", "deleteApi", "deleteApi", "deleteApiCallable"] - }, - "DeleteApiDeployment": { - "methods": ["deleteApiDeployment", "deleteApiDeployment", "deleteApiDeployment", "deleteApiDeploymentCallable"] - }, - "DeleteApiDeploymentRevision": { - "methods": ["deleteApiDeploymentRevision", "deleteApiDeploymentRevision", "deleteApiDeploymentRevision", "deleteApiDeploymentRevisionCallable"] - }, - "DeleteApiSpec": { - "methods": ["deleteApiSpec", "deleteApiSpec", "deleteApiSpec", "deleteApiSpecCallable"] - }, - "DeleteApiSpecRevision": { - "methods": ["deleteApiSpecRevision", "deleteApiSpecRevision", "deleteApiSpecRevision", "deleteApiSpecRevisionCallable"] - }, - "DeleteApiVersion": { - "methods": ["deleteApiVersion", "deleteApiVersion", "deleteApiVersion", "deleteApiVersionCallable"] - }, - "DeleteArtifact": { - "methods": ["deleteArtifact", "deleteArtifact", "deleteArtifact", "deleteArtifactCallable"] - }, - "GetApi": { - "methods": ["getApi", "getApi", "getApi", "getApiCallable"] - }, - "GetApiDeployment": { - "methods": ["getApiDeployment", "getApiDeployment", "getApiDeployment", "getApiDeploymentCallable"] - }, - "GetApiSpec": { - "methods": ["getApiSpec", "getApiSpec", "getApiSpec", "getApiSpecCallable"] - }, - "GetApiSpecContents": { - "methods": ["getApiSpecContents", "getApiSpecContents", "getApiSpecContents", "getApiSpecContentsCallable"] - }, - "GetApiVersion": { - "methods": ["getApiVersion", "getApiVersion", "getApiVersion", "getApiVersionCallable"] - }, - "GetArtifact": { - "methods": ["getArtifact", "getArtifact", "getArtifact", "getArtifactCallable"] - }, - "GetArtifactContents": { - "methods": ["getArtifactContents", "getArtifactContents", "getArtifactContents", "getArtifactContentsCallable"] - }, - "GetIamPolicy": { - "methods": ["getIamPolicy", "getIamPolicyCallable"] - }, - "GetLocation": { - "methods": ["getLocation", "getLocationCallable"] - }, - "ListApiDeploymentRevisions": { - "methods": ["listApiDeploymentRevisions", "listApiDeploymentRevisionsPagedCallable", "listApiDeploymentRevisionsCallable"] - }, - "ListApiDeployments": { - "methods": ["listApiDeployments", "listApiDeployments", "listApiDeployments", "listApiDeploymentsPagedCallable", "listApiDeploymentsCallable"] - }, - "ListApiSpecRevisions": { - "methods": ["listApiSpecRevisions", "listApiSpecRevisionsPagedCallable", "listApiSpecRevisionsCallable"] - }, - "ListApiSpecs": { - "methods": ["listApiSpecs", "listApiSpecs", "listApiSpecs", "listApiSpecsPagedCallable", "listApiSpecsCallable"] - }, - "ListApiVersions": { - "methods": ["listApiVersions", "listApiVersions", "listApiVersions", "listApiVersionsPagedCallable", "listApiVersionsCallable"] - }, - "ListApis": { - "methods": ["listApis", "listApis", "listApis", "listApisPagedCallable", "listApisCallable"] - }, - "ListArtifacts": { - "methods": ["listArtifacts", "listArtifacts", "listArtifacts", "listArtifacts", "listArtifacts", "listArtifacts", "listArtifacts", "listArtifactsPagedCallable", "listArtifactsCallable"] - }, - "ListLocations": { - "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] - }, - "ReplaceArtifact": { - "methods": ["replaceArtifact", "replaceArtifact", "replaceArtifactCallable"] - }, - "RollbackApiDeployment": { - "methods": ["rollbackApiDeployment", "rollbackApiDeploymentCallable"] - }, - "RollbackApiSpec": { - "methods": ["rollbackApiSpec", "rollbackApiSpecCallable"] - }, - "SetIamPolicy": { - "methods": ["setIamPolicy", "setIamPolicyCallable"] - }, - "TagApiDeploymentRevision": { - "methods": ["tagApiDeploymentRevision", "tagApiDeploymentRevisionCallable"] - }, - "TagApiSpecRevision": { - "methods": ["tagApiSpecRevision", "tagApiSpecRevisionCallable"] - }, - "TestIamPermissions": { - "methods": ["testIamPermissions", "testIamPermissionsCallable"] - }, - "UpdateApi": { - "methods": ["updateApi", "updateApi", "updateApiCallable"] - }, - "UpdateApiDeployment": { - "methods": ["updateApiDeployment", "updateApiDeployment", "updateApiDeploymentCallable"] - }, - "UpdateApiSpec": { - "methods": ["updateApiSpec", "updateApiSpec", "updateApiSpecCallable"] - }, - "UpdateApiVersion": { - "methods": ["updateApiVersion", "updateApiVersion", "updateApiVersionCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/package-info.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/package-info.java deleted file mode 100644 index f3f75ba59638..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/package-info.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 Apigee Registry API - * - *

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

======================= ProvisioningClient ======================= - * - *

Service Description: The service that is used for managing the data plane provisioning of the - * Registry. - * - *

Sample for ProvisioningClient: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
- *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
- *   Instance response = provisioningClient.getInstance(name);
- * }
- * }
- * - *

======================= RegistryClient ======================= - * - *

Service Description: The Registry service allows teams to manage descriptions of APIs. - * - *

Sample for RegistryClient: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (RegistryClient registryClient = RegistryClient.create()) {
- *   ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]");
- *   Api response = registryClient.getApi(name);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.apigeeregistry.v1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningCallableFactory.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningCallableFactory.java deleted file mode 100644 index 78c4842045e4..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the Provisioning service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcProvisioningCallableFactory 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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningStub.java deleted file mode 100644 index 6661d8addb18..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcProvisioningStub.java +++ /dev/null @@ -1,419 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub; - -import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; - -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.UnaryCallable; -import com.google.cloud.apigeeregistry.v1.CreateInstanceRequest; -import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; -import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.OperationMetadata; -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.ImmutableMap; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the Provisioning service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcProvisioningStub extends ProvisioningStub { - private static final MethodDescriptor - createInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/CreateInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/DeleteInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/GetInstance") - .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) - .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())) - .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())) - .build(); - - private static final MethodDescriptor setIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - testIamPermissionsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") - .setRequestMarshaller( - ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable createInstanceCallable; - private final OperationCallable - createInstanceOperationCallable; - private final UnaryCallable deleteInstanceCallable; - private final OperationCallable - deleteInstanceOperationCallable; - private final UnaryCallable getInstanceCallable; - private final UnaryCallable listLocationsCallable; - private final UnaryCallable - listLocationsPagedCallable; - private final UnaryCallable getLocationCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcProvisioningStub create(ProvisioningStubSettings settings) - throws IOException { - return new GrpcProvisioningStub(settings, ClientContext.create(settings)); - } - - public static final GrpcProvisioningStub create(ClientContext clientContext) throws IOException { - return new GrpcProvisioningStub(ProvisioningStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcProvisioningStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcProvisioningStub( - ProvisioningStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcProvisioningStub, 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 GrpcProvisioningStub(ProvisioningStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcProvisioningCallableFactory()); - } - - /** - * Constructs an instance of GrpcProvisioningStub, 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 GrpcProvisioningStub( - ProvisioningStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings createInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createInstanceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteInstanceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getInstanceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listLocationsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listLocationsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getLocationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getLocationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings setIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings getIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings - testIamPermissionsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - - this.createInstanceCallable = - callableFactory.createUnaryCallable( - createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); - this.createInstanceOperationCallable = - callableFactory.createOperationCallable( - createInstanceTransportSettings, - settings.createInstanceOperationSettings(), - clientContext, - operationsStub); - this.deleteInstanceCallable = - callableFactory.createUnaryCallable( - deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); - this.deleteInstanceOperationCallable = - callableFactory.createOperationCallable( - deleteInstanceTransportSettings, - settings.deleteInstanceOperationSettings(), - clientContext, - operationsStub); - this.getInstanceCallable = - callableFactory.createUnaryCallable( - getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); - 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.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable createInstanceCallable() { - return createInstanceCallable; - } - - @Override - public OperationCallable - createInstanceOperationCallable() { - return createInstanceOperationCallable; - } - - @Override - public UnaryCallable deleteInstanceCallable() { - return deleteInstanceCallable; - } - - @Override - public OperationCallable - deleteInstanceOperationCallable() { - return deleteInstanceOperationCallable; - } - - @Override - public UnaryCallable getInstanceCallable() { - return getInstanceCallable; - } - - @Override - public UnaryCallable listLocationsCallable() { - return listLocationsCallable; - } - - @Override - public UnaryCallable - listLocationsPagedCallable() { - return listLocationsPagedCallable; - } - - @Override - public UnaryCallable getLocationCallable() { - return getLocationCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryCallableFactory.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryCallableFactory.java deleted file mode 100644 index 92e38e45e345..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the Registry service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcRegistryCallableFactory 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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryStub.java deleted file mode 100644 index 70303cad5f08..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/GrpcRegistryStub.java +++ /dev/null @@ -1,1494 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub; - -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; - -import com.google.api.HttpBody; -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.UnaryCallable; -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; -import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.GetApiRequest; -import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; -import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; -import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApisRequest; -import com.google.cloud.apigeeregistry.v1.ListApisResponse; -import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; -import com.google.cloud.apigeeregistry.v1.ListArtifactsResponse; -import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; -import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; -import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; -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.ImmutableMap; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the Registry service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcRegistryStub extends RegistryStub { - private static final MethodDescriptor - listApisMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApis") - .setRequestMarshaller(ProtoUtils.marshaller(ListApisRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ListApisResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getApiMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApi") - .setRequestMarshaller(ProtoUtils.marshaller(GetApiRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Api.getDefaultInstance())) - .build(); - - private static final MethodDescriptor createApiMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApi") - .setRequestMarshaller(ProtoUtils.marshaller(CreateApiRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Api.getDefaultInstance())) - .build(); - - private static final MethodDescriptor updateApiMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApi") - .setRequestMarshaller(ProtoUtils.marshaller(UpdateApiRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Api.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteApiMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApi") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteApiRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listApiVersionsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiVersions") - .setRequestMarshaller( - ProtoUtils.marshaller(ListApiVersionsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListApiVersionsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getApiVersionMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiVersion") - .setRequestMarshaller( - ProtoUtils.marshaller(GetApiVersionRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiVersion.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createApiVersionMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiVersion") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateApiVersionRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiVersion.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateApiVersionMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiVersion") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateApiVersionRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiVersion.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteApiVersionMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiVersion") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteApiVersionRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listApiSpecsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiSpecs") - .setRequestMarshaller(ProtoUtils.marshaller(ListApiSpecsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListApiSpecsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getApiSpecMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiSpec") - .setRequestMarshaller(ProtoUtils.marshaller(GetApiSpecRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getApiSpecContentsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiSpecContents") - .setRequestMarshaller( - ProtoUtils.marshaller(GetApiSpecContentsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(HttpBody.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createApiSpecMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiSpec") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateApiSpecRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateApiSpecMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiSpec") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateApiSpecRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteApiSpecMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiSpec") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteApiSpecRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - tagApiSpecRevisionMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/TagApiSpecRevision") - .setRequestMarshaller( - ProtoUtils.marshaller(TagApiSpecRevisionRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listApiSpecRevisionsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiSpecRevisions") - .setRequestMarshaller( - ProtoUtils.marshaller(ListApiSpecRevisionsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListApiSpecRevisionsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - rollbackApiSpecMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/RollbackApiSpec") - .setRequestMarshaller( - ProtoUtils.marshaller(RollbackApiSpecRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteApiSpecRevisionMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiSpecRevision") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteApiSpecRevisionRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiSpec.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listApiDeploymentsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiDeployments") - .setRequestMarshaller( - ProtoUtils.marshaller(ListApiDeploymentsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListApiDeploymentsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getApiDeploymentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiDeployment") - .setRequestMarshaller( - ProtoUtils.marshaller(GetApiDeploymentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createApiDeploymentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiDeployment") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateApiDeploymentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateApiDeploymentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiDeployment") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateApiDeploymentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteApiDeploymentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiDeployment") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteApiDeploymentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - tagApiDeploymentRevisionMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/TagApiDeploymentRevision") - .setRequestMarshaller( - ProtoUtils.marshaller(TagApiDeploymentRevisionRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse> - listApiDeploymentRevisionsMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.apigeeregistry.v1.Registry/ListApiDeploymentRevisions") - .setRequestMarshaller( - ProtoUtils.marshaller(ListApiDeploymentRevisionsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListApiDeploymentRevisionsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - rollbackApiDeploymentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/RollbackApiDeployment") - .setRequestMarshaller( - ProtoUtils.marshaller(RollbackApiDeploymentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteApiDeploymentRevisionMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.apigeeregistry.v1.Registry/DeleteApiDeploymentRevision") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteApiDeploymentRevisionRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ApiDeployment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listArtifactsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListArtifacts") - .setRequestMarshaller( - ProtoUtils.marshaller(ListArtifactsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListArtifactsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getArtifactMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetArtifact") - .setRequestMarshaller(ProtoUtils.marshaller(GetArtifactRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Artifact.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getArtifactContentsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetArtifactContents") - .setRequestMarshaller( - ProtoUtils.marshaller(GetArtifactContentsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(HttpBody.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createArtifactMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateArtifact") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateArtifactRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Artifact.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - replaceArtifactMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ReplaceArtifact") - .setRequestMarshaller( - ProtoUtils.marshaller(ReplaceArtifactRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Artifact.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteArtifactMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteArtifact") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteArtifactRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .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())) - .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())) - .build(); - - private static final MethodDescriptor setIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - testIamPermissionsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") - .setRequestMarshaller( - ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable listApisCallable; - private final UnaryCallable listApisPagedCallable; - private final UnaryCallable getApiCallable; - private final UnaryCallable createApiCallable; - private final UnaryCallable updateApiCallable; - private final UnaryCallable deleteApiCallable; - private final UnaryCallable - listApiVersionsCallable; - private final UnaryCallable - listApiVersionsPagedCallable; - private final UnaryCallable getApiVersionCallable; - private final UnaryCallable createApiVersionCallable; - private final UnaryCallable updateApiVersionCallable; - private final UnaryCallable deleteApiVersionCallable; - private final UnaryCallable listApiSpecsCallable; - private final UnaryCallable - listApiSpecsPagedCallable; - private final UnaryCallable getApiSpecCallable; - private final UnaryCallable getApiSpecContentsCallable; - private final UnaryCallable createApiSpecCallable; - private final UnaryCallable updateApiSpecCallable; - private final UnaryCallable deleteApiSpecCallable; - private final UnaryCallable tagApiSpecRevisionCallable; - private final UnaryCallable - listApiSpecRevisionsCallable; - private final UnaryCallable - listApiSpecRevisionsPagedCallable; - private final UnaryCallable rollbackApiSpecCallable; - private final UnaryCallable deleteApiSpecRevisionCallable; - private final UnaryCallable - listApiDeploymentsCallable; - private final UnaryCallable - listApiDeploymentsPagedCallable; - private final UnaryCallable getApiDeploymentCallable; - private final UnaryCallable - createApiDeploymentCallable; - private final UnaryCallable - updateApiDeploymentCallable; - private final UnaryCallable deleteApiDeploymentCallable; - private final UnaryCallable - tagApiDeploymentRevisionCallable; - private final UnaryCallable - listApiDeploymentRevisionsCallable; - private final UnaryCallable< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsPagedResponse> - listApiDeploymentRevisionsPagedCallable; - private final UnaryCallable - rollbackApiDeploymentCallable; - private final UnaryCallable - deleteApiDeploymentRevisionCallable; - private final UnaryCallable listArtifactsCallable; - private final UnaryCallable - listArtifactsPagedCallable; - private final UnaryCallable getArtifactCallable; - private final UnaryCallable getArtifactContentsCallable; - private final UnaryCallable createArtifactCallable; - private final UnaryCallable replaceArtifactCallable; - private final UnaryCallable deleteArtifactCallable; - private final UnaryCallable listLocationsCallable; - private final UnaryCallable - listLocationsPagedCallable; - private final UnaryCallable getLocationCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcRegistryStub create(RegistryStubSettings settings) throws IOException { - return new GrpcRegistryStub(settings, ClientContext.create(settings)); - } - - public static final GrpcRegistryStub create(ClientContext clientContext) throws IOException { - return new GrpcRegistryStub(RegistryStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcRegistryStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcRegistryStub( - RegistryStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcRegistryStub, 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 GrpcRegistryStub(RegistryStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcRegistryCallableFactory()); - } - - /** - * Constructs an instance of GrpcRegistryStub, 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 GrpcRegistryStub( - RegistryStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings listApisTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listApisMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getApiTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getApiMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createApiTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createApiMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateApiTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateApiMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("api.name", String.valueOf(request.getApi().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteApiTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteApiMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listApiVersionsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listApiVersionsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getApiVersionTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getApiVersionMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createApiVersionTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createApiVersionMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateApiVersionTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateApiVersionMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("api_version.name", String.valueOf(request.getApiVersion().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteApiVersionTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteApiVersionMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listApiSpecsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listApiSpecsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getApiSpecTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getApiSpecMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getApiSpecContentsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getApiSpecContentsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createApiSpecTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createApiSpecMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateApiSpecTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateApiSpecMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("api_spec.name", String.valueOf(request.getApiSpec().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteApiSpecTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteApiSpecMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings tagApiSpecRevisionTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(tagApiSpecRevisionMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listApiSpecRevisionsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listApiSpecRevisionsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings rollbackApiSpecTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(rollbackApiSpecMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteApiSpecRevisionTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteApiSpecRevisionMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listApiDeploymentsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listApiDeploymentsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getApiDeploymentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getApiDeploymentMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - createApiDeploymentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createApiDeploymentMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateApiDeploymentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateApiDeploymentMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "api_deployment.name", - String.valueOf(request.getApiDeployment().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteApiDeploymentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteApiDeploymentMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - tagApiDeploymentRevisionTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(tagApiDeploymentRevisionMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listApiDeploymentRevisionsTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listApiDeploymentRevisionsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - rollbackApiDeploymentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(rollbackApiDeploymentMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - deleteApiDeploymentRevisionTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteApiDeploymentRevisionMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listArtifactsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listArtifactsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getArtifactTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getArtifactMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getArtifactContentsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getArtifactContentsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createArtifactTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createArtifactMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings replaceArtifactTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(replaceArtifactMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("artifact.name", String.valueOf(request.getArtifact().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteArtifactTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteArtifactMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listLocationsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listLocationsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getLocationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getLocationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings setIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings getIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings - testIamPermissionsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - - this.listApisCallable = - callableFactory.createUnaryCallable( - listApisTransportSettings, settings.listApisSettings(), clientContext); - this.listApisPagedCallable = - callableFactory.createPagedCallable( - listApisTransportSettings, settings.listApisSettings(), clientContext); - this.getApiCallable = - callableFactory.createUnaryCallable( - getApiTransportSettings, settings.getApiSettings(), clientContext); - this.createApiCallable = - callableFactory.createUnaryCallable( - createApiTransportSettings, settings.createApiSettings(), clientContext); - this.updateApiCallable = - callableFactory.createUnaryCallable( - updateApiTransportSettings, settings.updateApiSettings(), clientContext); - this.deleteApiCallable = - callableFactory.createUnaryCallable( - deleteApiTransportSettings, settings.deleteApiSettings(), clientContext); - this.listApiVersionsCallable = - callableFactory.createUnaryCallable( - listApiVersionsTransportSettings, settings.listApiVersionsSettings(), clientContext); - this.listApiVersionsPagedCallable = - callableFactory.createPagedCallable( - listApiVersionsTransportSettings, settings.listApiVersionsSettings(), clientContext); - this.getApiVersionCallable = - callableFactory.createUnaryCallable( - getApiVersionTransportSettings, settings.getApiVersionSettings(), clientContext); - this.createApiVersionCallable = - callableFactory.createUnaryCallable( - createApiVersionTransportSettings, settings.createApiVersionSettings(), clientContext); - this.updateApiVersionCallable = - callableFactory.createUnaryCallable( - updateApiVersionTransportSettings, settings.updateApiVersionSettings(), clientContext); - this.deleteApiVersionCallable = - callableFactory.createUnaryCallable( - deleteApiVersionTransportSettings, settings.deleteApiVersionSettings(), clientContext); - this.listApiSpecsCallable = - callableFactory.createUnaryCallable( - listApiSpecsTransportSettings, settings.listApiSpecsSettings(), clientContext); - this.listApiSpecsPagedCallable = - callableFactory.createPagedCallable( - listApiSpecsTransportSettings, settings.listApiSpecsSettings(), clientContext); - this.getApiSpecCallable = - callableFactory.createUnaryCallable( - getApiSpecTransportSettings, settings.getApiSpecSettings(), clientContext); - this.getApiSpecContentsCallable = - callableFactory.createUnaryCallable( - getApiSpecContentsTransportSettings, - settings.getApiSpecContentsSettings(), - clientContext); - this.createApiSpecCallable = - callableFactory.createUnaryCallable( - createApiSpecTransportSettings, settings.createApiSpecSettings(), clientContext); - this.updateApiSpecCallable = - callableFactory.createUnaryCallable( - updateApiSpecTransportSettings, settings.updateApiSpecSettings(), clientContext); - this.deleteApiSpecCallable = - callableFactory.createUnaryCallable( - deleteApiSpecTransportSettings, settings.deleteApiSpecSettings(), clientContext); - this.tagApiSpecRevisionCallable = - callableFactory.createUnaryCallable( - tagApiSpecRevisionTransportSettings, - settings.tagApiSpecRevisionSettings(), - clientContext); - this.listApiSpecRevisionsCallable = - callableFactory.createUnaryCallable( - listApiSpecRevisionsTransportSettings, - settings.listApiSpecRevisionsSettings(), - clientContext); - this.listApiSpecRevisionsPagedCallable = - callableFactory.createPagedCallable( - listApiSpecRevisionsTransportSettings, - settings.listApiSpecRevisionsSettings(), - clientContext); - this.rollbackApiSpecCallable = - callableFactory.createUnaryCallable( - rollbackApiSpecTransportSettings, settings.rollbackApiSpecSettings(), clientContext); - this.deleteApiSpecRevisionCallable = - callableFactory.createUnaryCallable( - deleteApiSpecRevisionTransportSettings, - settings.deleteApiSpecRevisionSettings(), - clientContext); - this.listApiDeploymentsCallable = - callableFactory.createUnaryCallable( - listApiDeploymentsTransportSettings, - settings.listApiDeploymentsSettings(), - clientContext); - this.listApiDeploymentsPagedCallable = - callableFactory.createPagedCallable( - listApiDeploymentsTransportSettings, - settings.listApiDeploymentsSettings(), - clientContext); - this.getApiDeploymentCallable = - callableFactory.createUnaryCallable( - getApiDeploymentTransportSettings, settings.getApiDeploymentSettings(), clientContext); - this.createApiDeploymentCallable = - callableFactory.createUnaryCallable( - createApiDeploymentTransportSettings, - settings.createApiDeploymentSettings(), - clientContext); - this.updateApiDeploymentCallable = - callableFactory.createUnaryCallable( - updateApiDeploymentTransportSettings, - settings.updateApiDeploymentSettings(), - clientContext); - this.deleteApiDeploymentCallable = - callableFactory.createUnaryCallable( - deleteApiDeploymentTransportSettings, - settings.deleteApiDeploymentSettings(), - clientContext); - this.tagApiDeploymentRevisionCallable = - callableFactory.createUnaryCallable( - tagApiDeploymentRevisionTransportSettings, - settings.tagApiDeploymentRevisionSettings(), - clientContext); - this.listApiDeploymentRevisionsCallable = - callableFactory.createUnaryCallable( - listApiDeploymentRevisionsTransportSettings, - settings.listApiDeploymentRevisionsSettings(), - clientContext); - this.listApiDeploymentRevisionsPagedCallable = - callableFactory.createPagedCallable( - listApiDeploymentRevisionsTransportSettings, - settings.listApiDeploymentRevisionsSettings(), - clientContext); - this.rollbackApiDeploymentCallable = - callableFactory.createUnaryCallable( - rollbackApiDeploymentTransportSettings, - settings.rollbackApiDeploymentSettings(), - clientContext); - this.deleteApiDeploymentRevisionCallable = - callableFactory.createUnaryCallable( - deleteApiDeploymentRevisionTransportSettings, - settings.deleteApiDeploymentRevisionSettings(), - clientContext); - this.listArtifactsCallable = - callableFactory.createUnaryCallable( - listArtifactsTransportSettings, settings.listArtifactsSettings(), clientContext); - this.listArtifactsPagedCallable = - callableFactory.createPagedCallable( - listArtifactsTransportSettings, settings.listArtifactsSettings(), clientContext); - this.getArtifactCallable = - callableFactory.createUnaryCallable( - getArtifactTransportSettings, settings.getArtifactSettings(), clientContext); - this.getArtifactContentsCallable = - callableFactory.createUnaryCallable( - getArtifactContentsTransportSettings, - settings.getArtifactContentsSettings(), - clientContext); - this.createArtifactCallable = - callableFactory.createUnaryCallable( - createArtifactTransportSettings, settings.createArtifactSettings(), clientContext); - this.replaceArtifactCallable = - callableFactory.createUnaryCallable( - replaceArtifactTransportSettings, settings.replaceArtifactSettings(), clientContext); - this.deleteArtifactCallable = - callableFactory.createUnaryCallable( - deleteArtifactTransportSettings, settings.deleteArtifactSettings(), clientContext); - 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.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listApisCallable() { - return listApisCallable; - } - - @Override - public UnaryCallable listApisPagedCallable() { - return listApisPagedCallable; - } - - @Override - public UnaryCallable getApiCallable() { - return getApiCallable; - } - - @Override - public UnaryCallable createApiCallable() { - return createApiCallable; - } - - @Override - public UnaryCallable updateApiCallable() { - return updateApiCallable; - } - - @Override - public UnaryCallable deleteApiCallable() { - return deleteApiCallable; - } - - @Override - public UnaryCallable listApiVersionsCallable() { - return listApiVersionsCallable; - } - - @Override - public UnaryCallable - listApiVersionsPagedCallable() { - return listApiVersionsPagedCallable; - } - - @Override - public UnaryCallable getApiVersionCallable() { - return getApiVersionCallable; - } - - @Override - public UnaryCallable createApiVersionCallable() { - return createApiVersionCallable; - } - - @Override - public UnaryCallable updateApiVersionCallable() { - return updateApiVersionCallable; - } - - @Override - public UnaryCallable deleteApiVersionCallable() { - return deleteApiVersionCallable; - } - - @Override - public UnaryCallable listApiSpecsCallable() { - return listApiSpecsCallable; - } - - @Override - public UnaryCallable listApiSpecsPagedCallable() { - return listApiSpecsPagedCallable; - } - - @Override - public UnaryCallable getApiSpecCallable() { - return getApiSpecCallable; - } - - @Override - public UnaryCallable getApiSpecContentsCallable() { - return getApiSpecContentsCallable; - } - - @Override - public UnaryCallable createApiSpecCallable() { - return createApiSpecCallable; - } - - @Override - public UnaryCallable updateApiSpecCallable() { - return updateApiSpecCallable; - } - - @Override - public UnaryCallable deleteApiSpecCallable() { - return deleteApiSpecCallable; - } - - @Override - public UnaryCallable tagApiSpecRevisionCallable() { - return tagApiSpecRevisionCallable; - } - - @Override - public UnaryCallable - listApiSpecRevisionsCallable() { - return listApiSpecRevisionsCallable; - } - - @Override - public UnaryCallable - listApiSpecRevisionsPagedCallable() { - return listApiSpecRevisionsPagedCallable; - } - - @Override - public UnaryCallable rollbackApiSpecCallable() { - return rollbackApiSpecCallable; - } - - @Override - public UnaryCallable deleteApiSpecRevisionCallable() { - return deleteApiSpecRevisionCallable; - } - - @Override - public UnaryCallable - listApiDeploymentsCallable() { - return listApiDeploymentsCallable; - } - - @Override - public UnaryCallable - listApiDeploymentsPagedCallable() { - return listApiDeploymentsPagedCallable; - } - - @Override - public UnaryCallable getApiDeploymentCallable() { - return getApiDeploymentCallable; - } - - @Override - public UnaryCallable createApiDeploymentCallable() { - return createApiDeploymentCallable; - } - - @Override - public UnaryCallable updateApiDeploymentCallable() { - return updateApiDeploymentCallable; - } - - @Override - public UnaryCallable deleteApiDeploymentCallable() { - return deleteApiDeploymentCallable; - } - - @Override - public UnaryCallable - tagApiDeploymentRevisionCallable() { - return tagApiDeploymentRevisionCallable; - } - - @Override - public UnaryCallable - listApiDeploymentRevisionsCallable() { - return listApiDeploymentRevisionsCallable; - } - - @Override - public UnaryCallable - listApiDeploymentRevisionsPagedCallable() { - return listApiDeploymentRevisionsPagedCallable; - } - - @Override - public UnaryCallable - rollbackApiDeploymentCallable() { - return rollbackApiDeploymentCallable; - } - - @Override - public UnaryCallable - deleteApiDeploymentRevisionCallable() { - return deleteApiDeploymentRevisionCallable; - } - - @Override - public UnaryCallable listArtifactsCallable() { - return listArtifactsCallable; - } - - @Override - public UnaryCallable - listArtifactsPagedCallable() { - return listArtifactsPagedCallable; - } - - @Override - public UnaryCallable getArtifactCallable() { - return getArtifactCallable; - } - - @Override - public UnaryCallable getArtifactContentsCallable() { - return getArtifactContentsCallable; - } - - @Override - public UnaryCallable createArtifactCallable() { - return createArtifactCallable; - } - - @Override - public UnaryCallable replaceArtifactCallable() { - return replaceArtifactCallable; - } - - @Override - public UnaryCallable deleteArtifactCallable() { - return deleteArtifactCallable; - } - - @Override - public UnaryCallable listLocationsCallable() { - return listLocationsCallable; - } - - @Override - public UnaryCallable - listLocationsPagedCallable() { - return listLocationsPagedCallable; - } - - @Override - public UnaryCallable getLocationCallable() { - return getLocationCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningCallableFactory.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningCallableFactory.java deleted file mode 100644 index 26803e1608ec..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub; - -import com.google.api.core.BetaApi; -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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the Provisioning service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonProvisioningCallableFactory - 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); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningStub.java deleted file mode 100644 index 80808275bc07..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonProvisioningStub.java +++ /dev/null @@ -1,650 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub; - -import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; - -import com.google.api.core.BetaApi; -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.longrunning.OperationSnapshot; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.apigeeregistry.v1.CreateInstanceRequest; -import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; -import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.OperationMetadata; -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.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the Provisioning service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonProvisioningStub extends ProvisioningStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Empty.getDescriptor()) - .add(Instance.getDescriptor()) - .add(OperationMetadata.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - createInstanceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/CreateInstance") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/instances", - 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, "instanceId", request.getInstanceId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("instance", request.getInstance())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateInstanceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteInstanceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/DeleteInstance") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/instances/*}", - 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(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteInstanceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - getInstanceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Provisioning/GetInstance") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/instances/*}", - 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(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Instance.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .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; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - 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; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Location.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - setIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/apis/*}:setIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/artifacts/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/runtime}:setIamPolicy") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/apis/*}:getIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/artifacts/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/runtime}:getIamPolicy") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - testIamPermissionsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/apis/*}:testIamPermissions", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/artifacts/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/runtime}:testIamPermissions") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable createInstanceCallable; - private final OperationCallable - createInstanceOperationCallable; - private final UnaryCallable deleteInstanceCallable; - private final OperationCallable - deleteInstanceOperationCallable; - private final UnaryCallable getInstanceCallable; - private final UnaryCallable listLocationsCallable; - private final UnaryCallable - listLocationsPagedCallable; - private final UnaryCallable getLocationCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonProvisioningStub create(ProvisioningStubSettings settings) - throws IOException { - return new HttpJsonProvisioningStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonProvisioningStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonProvisioningStub( - ProvisioningStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonProvisioningStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonProvisioningStub( - ProvisioningStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonProvisioningStub, 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 HttpJsonProvisioningStub(ProvisioningStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonProvisioningCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonProvisioningStub, 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 HttpJsonProvisioningStub( - ProvisioningStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings createInstanceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createInstanceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteInstanceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteInstanceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getInstanceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getInstanceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listLocationsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listLocationsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getLocationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getLocationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings setIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - testIamPermissionsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.createInstanceCallable = - callableFactory.createUnaryCallable( - createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); - this.createInstanceOperationCallable = - callableFactory.createOperationCallable( - createInstanceTransportSettings, - settings.createInstanceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteInstanceCallable = - callableFactory.createUnaryCallable( - deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); - this.deleteInstanceOperationCallable = - callableFactory.createOperationCallable( - deleteInstanceTransportSettings, - settings.deleteInstanceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.getInstanceCallable = - callableFactory.createUnaryCallable( - getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); - 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.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(createInstanceMethodDescriptor); - methodDescriptors.add(deleteInstanceMethodDescriptor); - methodDescriptors.add(getInstanceMethodDescriptor); - methodDescriptors.add(listLocationsMethodDescriptor); - methodDescriptors.add(getLocationMethodDescriptor); - methodDescriptors.add(setIamPolicyMethodDescriptor); - methodDescriptors.add(getIamPolicyMethodDescriptor); - methodDescriptors.add(testIamPermissionsMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable createInstanceCallable() { - return createInstanceCallable; - } - - @Override - public OperationCallable - createInstanceOperationCallable() { - return createInstanceOperationCallable; - } - - @Override - public UnaryCallable deleteInstanceCallable() { - return deleteInstanceCallable; - } - - @Override - public OperationCallable - deleteInstanceOperationCallable() { - return deleteInstanceOperationCallable; - } - - @Override - public UnaryCallable getInstanceCallable() { - return getInstanceCallable; - } - - @Override - public UnaryCallable listLocationsCallable() { - return listLocationsCallable; - } - - @Override - public UnaryCallable - listLocationsPagedCallable() { - return listLocationsPagedCallable; - } - - @Override - public UnaryCallable getLocationCallable() { - return getLocationCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryCallableFactory.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryCallableFactory.java deleted file mode 100644 index 40fc50fcf989..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub; - -import com.google.api.core.BetaApi; -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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the Registry service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonRegistryCallableFactory - 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); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryStub.java deleted file mode 100644 index 3c94c2264980..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/HttpJsonRegistryStub.java +++ /dev/null @@ -1,2428 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub; - -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; - -import com.google.api.HttpBody; -import com.google.api.core.BetaApi; -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.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.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; -import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.GetApiRequest; -import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; -import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; -import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApisRequest; -import com.google.cloud.apigeeregistry.v1.ListApisResponse; -import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; -import com.google.cloud.apigeeregistry.v1.ListArtifactsResponse; -import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; -import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; -import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; -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.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the Registry service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonRegistryStub extends RegistryStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - listApisMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApis") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/apis", - 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, "filter", request.getFilter()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListApisResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getApiMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApi") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*}", - 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(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Api.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor createApiMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApi") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/apis", - 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, "apiId", request.getApiId()); - return fields; - }) - .setRequestBodyExtractor( - request -> ProtoRestSerializer.create().toBody("api", request.getApi())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Api.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor updateApiMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApi") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{api.name=projects/*/locations/*/apis/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "api.name", request.getApi().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "allowMissing", request.getAllowMissing()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> ProtoRestSerializer.create().toBody("api", request.getApi())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Api.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor deleteApiMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApi") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*}", - 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, "force", request.getForce()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listApiVersionsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiVersions") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/apis/*}/versions", - 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, "filter", request.getFilter()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListApiVersionsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getApiVersionMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiVersion") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/versions/*}", - 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(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiVersion.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createApiVersionMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiVersion") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/apis/*}/versions", - 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, "apiVersionId", request.getApiVersionId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("apiVersion", request.getApiVersion())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiVersion.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateApiVersionMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiVersion") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{apiVersion.name=projects/*/locations/*/apis/*/versions/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "apiVersion.name", request.getApiVersion().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "allowMissing", request.getAllowMissing()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("apiVersion", request.getApiVersion())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiVersion.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteApiVersionMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiVersion") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/versions/*}", - 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, "force", request.getForce()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listApiSpecsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiSpecs") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs", - 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, "filter", request.getFilter()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListApiSpecsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getApiSpecMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiSpec") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}", - 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(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiSpec.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getApiSpecContentsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiSpecContents") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:getContents", - 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(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(HttpBody.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createApiSpecMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiSpec") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs", - 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, "apiSpecId", request.getApiSpecId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create().toBody("apiSpec", request.getApiSpec())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiSpec.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateApiSpecMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiSpec") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{apiSpec.name=projects/*/locations/*/apis/*/versions/*/specs/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "apiSpec.name", request.getApiSpec().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "allowMissing", request.getAllowMissing()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create().toBody("apiSpec", request.getApiSpec())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiSpec.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteApiSpecMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiSpec") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}", - 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, "force", request.getForce()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - tagApiSpecRevisionMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/TagApiSpecRevision") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision", - 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(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiSpec.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse> - listApiSpecRevisionsMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiSpecRevisions") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:listRevisions", - 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, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListApiSpecRevisionsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - rollbackApiSpecMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/RollbackApiSpec") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:rollback", - 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(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiSpec.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteApiSpecRevisionMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiSpecRevision") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision", - 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(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiSpec.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listApiDeploymentsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListApiDeployments") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/apis/*}/deployments", - 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, "filter", request.getFilter()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListApiDeploymentsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getApiDeploymentMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetApiDeployment") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/deployments/*}", - 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(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiDeployment.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createApiDeploymentMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateApiDeployment") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/apis/*}/deployments", - 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, "apiDeploymentId", request.getApiDeploymentId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("apiDeployment", request.getApiDeployment())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiDeployment.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateApiDeploymentMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/UpdateApiDeployment") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{apiDeployment.name=projects/*/locations/*/apis/*/deployments/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "apiDeployment.name", request.getApiDeployment().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "allowMissing", request.getAllowMissing()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("apiDeployment", request.getApiDeployment())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiDeployment.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteApiDeploymentMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteApiDeployment") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/deployments/*}", - 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, "force", request.getForce()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - tagApiDeploymentRevisionMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/TagApiDeploymentRevision") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:tagRevision", - 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(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiDeployment.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse> - listApiDeploymentRevisionsMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName( - "google.cloud.apigeeregistry.v1.Registry/ListApiDeploymentRevisions") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:listRevisions", - 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, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListApiDeploymentRevisionsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - rollbackApiDeploymentMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/RollbackApiDeployment") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:rollback", - 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(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiDeployment.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteApiDeploymentRevisionMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.apigeeregistry.v1.Registry/DeleteApiDeploymentRevision") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision", - 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(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ApiDeployment.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listArtifactsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ListArtifacts") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/artifacts", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=projects/*/locations/*/apis/*}/artifacts", - "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts", - "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts", - "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListArtifactsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getArtifactMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetArtifact") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/artifacts/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}", - "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}", - "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}", - "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Artifact.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getArtifactContentsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/GetArtifactContents") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/artifacts/*}:getContents", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}:getContents", - "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getContents", - "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getContents", - "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:getContents") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(HttpBody.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createArtifactMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/CreateArtifact") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/artifacts", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=projects/*/locations/*/apis/*}/artifacts", - "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts", - "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts", - "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "artifactId", request.getArtifactId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("artifact", request.getArtifact())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Artifact.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - replaceArtifactMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/ReplaceArtifact") - .setHttpMethod("PUT") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{artifact.name=projects/*/locations/*/artifacts/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "artifact.name", request.getArtifact().getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{artifact.name=projects/*/locations/*/apis/*/artifacts/*}", - "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/artifacts/*}", - "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}", - "/v1/{artifact.name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("artifact", request.getArtifact())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Artifact.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteArtifactMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.apigeeregistry.v1.Registry/DeleteArtifact") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/artifacts/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}", - "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}", - "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}", - "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .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; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - 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; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Location.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - setIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/apis/*}:setIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/artifacts/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/runtime}:setIamPolicy") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/apis/*}:getIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/artifacts/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/runtime}:getIamPolicy") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - testIamPermissionsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/apis/*}:testIamPermissions", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/artifacts/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/runtime}:testIamPermissions") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable listApisCallable; - private final UnaryCallable listApisPagedCallable; - private final UnaryCallable getApiCallable; - private final UnaryCallable createApiCallable; - private final UnaryCallable updateApiCallable; - private final UnaryCallable deleteApiCallable; - private final UnaryCallable - listApiVersionsCallable; - private final UnaryCallable - listApiVersionsPagedCallable; - private final UnaryCallable getApiVersionCallable; - private final UnaryCallable createApiVersionCallable; - private final UnaryCallable updateApiVersionCallable; - private final UnaryCallable deleteApiVersionCallable; - private final UnaryCallable listApiSpecsCallable; - private final UnaryCallable - listApiSpecsPagedCallable; - private final UnaryCallable getApiSpecCallable; - private final UnaryCallable getApiSpecContentsCallable; - private final UnaryCallable createApiSpecCallable; - private final UnaryCallable updateApiSpecCallable; - private final UnaryCallable deleteApiSpecCallable; - private final UnaryCallable tagApiSpecRevisionCallable; - private final UnaryCallable - listApiSpecRevisionsCallable; - private final UnaryCallable - listApiSpecRevisionsPagedCallable; - private final UnaryCallable rollbackApiSpecCallable; - private final UnaryCallable deleteApiSpecRevisionCallable; - private final UnaryCallable - listApiDeploymentsCallable; - private final UnaryCallable - listApiDeploymentsPagedCallable; - private final UnaryCallable getApiDeploymentCallable; - private final UnaryCallable - createApiDeploymentCallable; - private final UnaryCallable - updateApiDeploymentCallable; - private final UnaryCallable deleteApiDeploymentCallable; - private final UnaryCallable - tagApiDeploymentRevisionCallable; - private final UnaryCallable - listApiDeploymentRevisionsCallable; - private final UnaryCallable< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsPagedResponse> - listApiDeploymentRevisionsPagedCallable; - private final UnaryCallable - rollbackApiDeploymentCallable; - private final UnaryCallable - deleteApiDeploymentRevisionCallable; - private final UnaryCallable listArtifactsCallable; - private final UnaryCallable - listArtifactsPagedCallable; - private final UnaryCallable getArtifactCallable; - private final UnaryCallable getArtifactContentsCallable; - private final UnaryCallable createArtifactCallable; - private final UnaryCallable replaceArtifactCallable; - private final UnaryCallable deleteArtifactCallable; - private final UnaryCallable listLocationsCallable; - private final UnaryCallable - listLocationsPagedCallable; - private final UnaryCallable getLocationCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonRegistryStub create(RegistryStubSettings settings) - throws IOException { - return new HttpJsonRegistryStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonRegistryStub create(ClientContext clientContext) throws IOException { - return new HttpJsonRegistryStub( - RegistryStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonRegistryStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonRegistryStub( - RegistryStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonRegistryStub, 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 HttpJsonRegistryStub(RegistryStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonRegistryCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonRegistryStub, 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 HttpJsonRegistryStub( - RegistryStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings listApisTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listApisMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getApiTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getApiMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createApiTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createApiMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateApiTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateApiMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteApiTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteApiMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listApiVersionsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listApiVersionsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getApiVersionTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getApiVersionMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createApiVersionTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createApiVersionMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateApiVersionTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateApiVersionMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteApiVersionTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteApiVersionMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listApiSpecsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listApiSpecsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getApiSpecTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getApiSpecMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getApiSpecContentsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getApiSpecContentsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createApiSpecTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createApiSpecMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateApiSpecTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateApiSpecMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteApiSpecTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteApiSpecMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings tagApiSpecRevisionTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(tagApiSpecRevisionMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listApiSpecRevisionsTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listApiSpecRevisionsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings rollbackApiSpecTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(rollbackApiSpecMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - deleteApiSpecRevisionTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteApiSpecRevisionMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listApiDeploymentsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listApiDeploymentsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getApiDeploymentTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getApiDeploymentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createApiDeploymentTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createApiDeploymentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateApiDeploymentTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateApiDeploymentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteApiDeploymentTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteApiDeploymentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - tagApiDeploymentRevisionTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(tagApiDeploymentRevisionMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listApiDeploymentRevisionsTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listApiDeploymentRevisionsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - rollbackApiDeploymentTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(rollbackApiDeploymentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - deleteApiDeploymentRevisionTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteApiDeploymentRevisionMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listArtifactsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listArtifactsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getArtifactTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getArtifactMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getArtifactContentsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getArtifactContentsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createArtifactTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createArtifactMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings replaceArtifactTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(replaceArtifactMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteArtifactTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteArtifactMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listLocationsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listLocationsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getLocationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getLocationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings setIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - testIamPermissionsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.listApisCallable = - callableFactory.createUnaryCallable( - listApisTransportSettings, settings.listApisSettings(), clientContext); - this.listApisPagedCallable = - callableFactory.createPagedCallable( - listApisTransportSettings, settings.listApisSettings(), clientContext); - this.getApiCallable = - callableFactory.createUnaryCallable( - getApiTransportSettings, settings.getApiSettings(), clientContext); - this.createApiCallable = - callableFactory.createUnaryCallable( - createApiTransportSettings, settings.createApiSettings(), clientContext); - this.updateApiCallable = - callableFactory.createUnaryCallable( - updateApiTransportSettings, settings.updateApiSettings(), clientContext); - this.deleteApiCallable = - callableFactory.createUnaryCallable( - deleteApiTransportSettings, settings.deleteApiSettings(), clientContext); - this.listApiVersionsCallable = - callableFactory.createUnaryCallable( - listApiVersionsTransportSettings, settings.listApiVersionsSettings(), clientContext); - this.listApiVersionsPagedCallable = - callableFactory.createPagedCallable( - listApiVersionsTransportSettings, settings.listApiVersionsSettings(), clientContext); - this.getApiVersionCallable = - callableFactory.createUnaryCallable( - getApiVersionTransportSettings, settings.getApiVersionSettings(), clientContext); - this.createApiVersionCallable = - callableFactory.createUnaryCallable( - createApiVersionTransportSettings, settings.createApiVersionSettings(), clientContext); - this.updateApiVersionCallable = - callableFactory.createUnaryCallable( - updateApiVersionTransportSettings, settings.updateApiVersionSettings(), clientContext); - this.deleteApiVersionCallable = - callableFactory.createUnaryCallable( - deleteApiVersionTransportSettings, settings.deleteApiVersionSettings(), clientContext); - this.listApiSpecsCallable = - callableFactory.createUnaryCallable( - listApiSpecsTransportSettings, settings.listApiSpecsSettings(), clientContext); - this.listApiSpecsPagedCallable = - callableFactory.createPagedCallable( - listApiSpecsTransportSettings, settings.listApiSpecsSettings(), clientContext); - this.getApiSpecCallable = - callableFactory.createUnaryCallable( - getApiSpecTransportSettings, settings.getApiSpecSettings(), clientContext); - this.getApiSpecContentsCallable = - callableFactory.createUnaryCallable( - getApiSpecContentsTransportSettings, - settings.getApiSpecContentsSettings(), - clientContext); - this.createApiSpecCallable = - callableFactory.createUnaryCallable( - createApiSpecTransportSettings, settings.createApiSpecSettings(), clientContext); - this.updateApiSpecCallable = - callableFactory.createUnaryCallable( - updateApiSpecTransportSettings, settings.updateApiSpecSettings(), clientContext); - this.deleteApiSpecCallable = - callableFactory.createUnaryCallable( - deleteApiSpecTransportSettings, settings.deleteApiSpecSettings(), clientContext); - this.tagApiSpecRevisionCallable = - callableFactory.createUnaryCallable( - tagApiSpecRevisionTransportSettings, - settings.tagApiSpecRevisionSettings(), - clientContext); - this.listApiSpecRevisionsCallable = - callableFactory.createUnaryCallable( - listApiSpecRevisionsTransportSettings, - settings.listApiSpecRevisionsSettings(), - clientContext); - this.listApiSpecRevisionsPagedCallable = - callableFactory.createPagedCallable( - listApiSpecRevisionsTransportSettings, - settings.listApiSpecRevisionsSettings(), - clientContext); - this.rollbackApiSpecCallable = - callableFactory.createUnaryCallable( - rollbackApiSpecTransportSettings, settings.rollbackApiSpecSettings(), clientContext); - this.deleteApiSpecRevisionCallable = - callableFactory.createUnaryCallable( - deleteApiSpecRevisionTransportSettings, - settings.deleteApiSpecRevisionSettings(), - clientContext); - this.listApiDeploymentsCallable = - callableFactory.createUnaryCallable( - listApiDeploymentsTransportSettings, - settings.listApiDeploymentsSettings(), - clientContext); - this.listApiDeploymentsPagedCallable = - callableFactory.createPagedCallable( - listApiDeploymentsTransportSettings, - settings.listApiDeploymentsSettings(), - clientContext); - this.getApiDeploymentCallable = - callableFactory.createUnaryCallable( - getApiDeploymentTransportSettings, settings.getApiDeploymentSettings(), clientContext); - this.createApiDeploymentCallable = - callableFactory.createUnaryCallable( - createApiDeploymentTransportSettings, - settings.createApiDeploymentSettings(), - clientContext); - this.updateApiDeploymentCallable = - callableFactory.createUnaryCallable( - updateApiDeploymentTransportSettings, - settings.updateApiDeploymentSettings(), - clientContext); - this.deleteApiDeploymentCallable = - callableFactory.createUnaryCallable( - deleteApiDeploymentTransportSettings, - settings.deleteApiDeploymentSettings(), - clientContext); - this.tagApiDeploymentRevisionCallable = - callableFactory.createUnaryCallable( - tagApiDeploymentRevisionTransportSettings, - settings.tagApiDeploymentRevisionSettings(), - clientContext); - this.listApiDeploymentRevisionsCallable = - callableFactory.createUnaryCallable( - listApiDeploymentRevisionsTransportSettings, - settings.listApiDeploymentRevisionsSettings(), - clientContext); - this.listApiDeploymentRevisionsPagedCallable = - callableFactory.createPagedCallable( - listApiDeploymentRevisionsTransportSettings, - settings.listApiDeploymentRevisionsSettings(), - clientContext); - this.rollbackApiDeploymentCallable = - callableFactory.createUnaryCallable( - rollbackApiDeploymentTransportSettings, - settings.rollbackApiDeploymentSettings(), - clientContext); - this.deleteApiDeploymentRevisionCallable = - callableFactory.createUnaryCallable( - deleteApiDeploymentRevisionTransportSettings, - settings.deleteApiDeploymentRevisionSettings(), - clientContext); - this.listArtifactsCallable = - callableFactory.createUnaryCallable( - listArtifactsTransportSettings, settings.listArtifactsSettings(), clientContext); - this.listArtifactsPagedCallable = - callableFactory.createPagedCallable( - listArtifactsTransportSettings, settings.listArtifactsSettings(), clientContext); - this.getArtifactCallable = - callableFactory.createUnaryCallable( - getArtifactTransportSettings, settings.getArtifactSettings(), clientContext); - this.getArtifactContentsCallable = - callableFactory.createUnaryCallable( - getArtifactContentsTransportSettings, - settings.getArtifactContentsSettings(), - clientContext); - this.createArtifactCallable = - callableFactory.createUnaryCallable( - createArtifactTransportSettings, settings.createArtifactSettings(), clientContext); - this.replaceArtifactCallable = - callableFactory.createUnaryCallable( - replaceArtifactTransportSettings, settings.replaceArtifactSettings(), clientContext); - this.deleteArtifactCallable = - callableFactory.createUnaryCallable( - deleteArtifactTransportSettings, settings.deleteArtifactSettings(), clientContext); - 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.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listApisMethodDescriptor); - methodDescriptors.add(getApiMethodDescriptor); - methodDescriptors.add(createApiMethodDescriptor); - methodDescriptors.add(updateApiMethodDescriptor); - methodDescriptors.add(deleteApiMethodDescriptor); - methodDescriptors.add(listApiVersionsMethodDescriptor); - methodDescriptors.add(getApiVersionMethodDescriptor); - methodDescriptors.add(createApiVersionMethodDescriptor); - methodDescriptors.add(updateApiVersionMethodDescriptor); - methodDescriptors.add(deleteApiVersionMethodDescriptor); - methodDescriptors.add(listApiSpecsMethodDescriptor); - methodDescriptors.add(getApiSpecMethodDescriptor); - methodDescriptors.add(getApiSpecContentsMethodDescriptor); - methodDescriptors.add(createApiSpecMethodDescriptor); - methodDescriptors.add(updateApiSpecMethodDescriptor); - methodDescriptors.add(deleteApiSpecMethodDescriptor); - methodDescriptors.add(tagApiSpecRevisionMethodDescriptor); - methodDescriptors.add(listApiSpecRevisionsMethodDescriptor); - methodDescriptors.add(rollbackApiSpecMethodDescriptor); - methodDescriptors.add(deleteApiSpecRevisionMethodDescriptor); - methodDescriptors.add(listApiDeploymentsMethodDescriptor); - methodDescriptors.add(getApiDeploymentMethodDescriptor); - methodDescriptors.add(createApiDeploymentMethodDescriptor); - methodDescriptors.add(updateApiDeploymentMethodDescriptor); - methodDescriptors.add(deleteApiDeploymentMethodDescriptor); - methodDescriptors.add(tagApiDeploymentRevisionMethodDescriptor); - methodDescriptors.add(listApiDeploymentRevisionsMethodDescriptor); - methodDescriptors.add(rollbackApiDeploymentMethodDescriptor); - methodDescriptors.add(deleteApiDeploymentRevisionMethodDescriptor); - methodDescriptors.add(listArtifactsMethodDescriptor); - methodDescriptors.add(getArtifactMethodDescriptor); - methodDescriptors.add(getArtifactContentsMethodDescriptor); - methodDescriptors.add(createArtifactMethodDescriptor); - methodDescriptors.add(replaceArtifactMethodDescriptor); - methodDescriptors.add(deleteArtifactMethodDescriptor); - methodDescriptors.add(listLocationsMethodDescriptor); - methodDescriptors.add(getLocationMethodDescriptor); - methodDescriptors.add(setIamPolicyMethodDescriptor); - methodDescriptors.add(getIamPolicyMethodDescriptor); - methodDescriptors.add(testIamPermissionsMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable listApisCallable() { - return listApisCallable; - } - - @Override - public UnaryCallable listApisPagedCallable() { - return listApisPagedCallable; - } - - @Override - public UnaryCallable getApiCallable() { - return getApiCallable; - } - - @Override - public UnaryCallable createApiCallable() { - return createApiCallable; - } - - @Override - public UnaryCallable updateApiCallable() { - return updateApiCallable; - } - - @Override - public UnaryCallable deleteApiCallable() { - return deleteApiCallable; - } - - @Override - public UnaryCallable listApiVersionsCallable() { - return listApiVersionsCallable; - } - - @Override - public UnaryCallable - listApiVersionsPagedCallable() { - return listApiVersionsPagedCallable; - } - - @Override - public UnaryCallable getApiVersionCallable() { - return getApiVersionCallable; - } - - @Override - public UnaryCallable createApiVersionCallable() { - return createApiVersionCallable; - } - - @Override - public UnaryCallable updateApiVersionCallable() { - return updateApiVersionCallable; - } - - @Override - public UnaryCallable deleteApiVersionCallable() { - return deleteApiVersionCallable; - } - - @Override - public UnaryCallable listApiSpecsCallable() { - return listApiSpecsCallable; - } - - @Override - public UnaryCallable listApiSpecsPagedCallable() { - return listApiSpecsPagedCallable; - } - - @Override - public UnaryCallable getApiSpecCallable() { - return getApiSpecCallable; - } - - @Override - public UnaryCallable getApiSpecContentsCallable() { - return getApiSpecContentsCallable; - } - - @Override - public UnaryCallable createApiSpecCallable() { - return createApiSpecCallable; - } - - @Override - public UnaryCallable updateApiSpecCallable() { - return updateApiSpecCallable; - } - - @Override - public UnaryCallable deleteApiSpecCallable() { - return deleteApiSpecCallable; - } - - @Override - public UnaryCallable tagApiSpecRevisionCallable() { - return tagApiSpecRevisionCallable; - } - - @Override - public UnaryCallable - listApiSpecRevisionsCallable() { - return listApiSpecRevisionsCallable; - } - - @Override - public UnaryCallable - listApiSpecRevisionsPagedCallable() { - return listApiSpecRevisionsPagedCallable; - } - - @Override - public UnaryCallable rollbackApiSpecCallable() { - return rollbackApiSpecCallable; - } - - @Override - public UnaryCallable deleteApiSpecRevisionCallable() { - return deleteApiSpecRevisionCallable; - } - - @Override - public UnaryCallable - listApiDeploymentsCallable() { - return listApiDeploymentsCallable; - } - - @Override - public UnaryCallable - listApiDeploymentsPagedCallable() { - return listApiDeploymentsPagedCallable; - } - - @Override - public UnaryCallable getApiDeploymentCallable() { - return getApiDeploymentCallable; - } - - @Override - public UnaryCallable createApiDeploymentCallable() { - return createApiDeploymentCallable; - } - - @Override - public UnaryCallable updateApiDeploymentCallable() { - return updateApiDeploymentCallable; - } - - @Override - public UnaryCallable deleteApiDeploymentCallable() { - return deleteApiDeploymentCallable; - } - - @Override - public UnaryCallable - tagApiDeploymentRevisionCallable() { - return tagApiDeploymentRevisionCallable; - } - - @Override - public UnaryCallable - listApiDeploymentRevisionsCallable() { - return listApiDeploymentRevisionsCallable; - } - - @Override - public UnaryCallable - listApiDeploymentRevisionsPagedCallable() { - return listApiDeploymentRevisionsPagedCallable; - } - - @Override - public UnaryCallable - rollbackApiDeploymentCallable() { - return rollbackApiDeploymentCallable; - } - - @Override - public UnaryCallable - deleteApiDeploymentRevisionCallable() { - return deleteApiDeploymentRevisionCallable; - } - - @Override - public UnaryCallable listArtifactsCallable() { - return listArtifactsCallable; - } - - @Override - public UnaryCallable - listArtifactsPagedCallable() { - return listArtifactsPagedCallable; - } - - @Override - public UnaryCallable getArtifactCallable() { - return getArtifactCallable; - } - - @Override - public UnaryCallable getArtifactContentsCallable() { - return getArtifactContentsCallable; - } - - @Override - public UnaryCallable createArtifactCallable() { - return createArtifactCallable; - } - - @Override - public UnaryCallable replaceArtifactCallable() { - return replaceArtifactCallable; - } - - @Override - public UnaryCallable deleteArtifactCallable() { - return deleteArtifactCallable; - } - - @Override - public UnaryCallable listLocationsCallable() { - return listLocationsCallable; - } - - @Override - public UnaryCallable - listLocationsPagedCallable() { - return listLocationsPagedCallable; - } - - @Override - public UnaryCallable getLocationCallable() { - return getLocationCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStub.java deleted file mode 100644 index 83ea3a6c9735..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStub.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub; - -import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; - -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.apigeeregistry.v1.CreateInstanceRequest; -import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; -import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.OperationMetadata; -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.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the Provisioning service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class ProvisioningStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public OperationCallable - createInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createInstanceOperationCallable()"); - } - - public UnaryCallable createInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: createInstanceCallable()"); - } - - public OperationCallable - deleteInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteInstanceOperationCallable()"); - } - - public UnaryCallable deleteInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()"); - } - - public UnaryCallable getInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); - } - - 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()"); - } - - public UnaryCallable setIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); - } - - public UnaryCallable getIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); - } - - public UnaryCallable - testIamPermissionsCallable() { - throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStubSettings.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStubSettings.java deleted file mode 100644 index 429412baeef4..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/ProvisioningStubSettings.java +++ /dev/null @@ -1,651 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub; - -import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -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.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.apigeeregistry.v1.CreateInstanceRequest; -import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; -import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.OperationMetadata; -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.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ProvisioningStub}. - * - *

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

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

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

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * ProvisioningStubSettings.Builder provisioningSettingsBuilder =
- *     ProvisioningStubSettings.newBuilder();
- * provisioningSettingsBuilder
- *     .getInstanceSettings()
- *     .setRetrySettings(
- *         provisioningSettingsBuilder
- *             .getInstanceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ProvisioningStubSettings provisioningSettings = provisioningSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ProvisioningStubSettings 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 createInstanceSettings; - private final OperationCallSettings - createInstanceOperationSettings; - private final UnaryCallSettings deleteInstanceSettings; - private final OperationCallSettings - deleteInstanceOperationSettings; - private final UnaryCallSettings getInstanceSettings; - private final PagedCallSettings< - ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> - listLocationsSettings; - private final UnaryCallSettings getLocationSettings; - private final UnaryCallSettings setIamPolicySettings; - private final UnaryCallSettings getIamPolicySettings; - private final UnaryCallSettings - testIamPermissionsSettings; - - 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() == null - ? ImmutableList.of() - : payload.getLocationsList(); - } - }; - - 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 createInstance. */ - public UnaryCallSettings createInstanceSettings() { - return createInstanceSettings; - } - - /** Returns the object with the settings used for calls to createInstance. */ - public OperationCallSettings - createInstanceOperationSettings() { - return createInstanceOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public UnaryCallSettings deleteInstanceSettings() { - return deleteInstanceSettings; - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public OperationCallSettings - deleteInstanceOperationSettings() { - return deleteInstanceOperationSettings; - } - - /** Returns the object with the settings used for calls to getInstance. */ - public UnaryCallSettings getInstanceSettings() { - return getInstanceSettings; - } - - /** 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; - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the object with the settings used for calls to getIamPolicy. */ - public UnaryCallSettings getIamPolicySettings() { - return getIamPolicySettings; - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - public ProvisioningStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcProvisioningStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonProvisioningStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "apigeeregistry.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "apigeeregistry.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(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ProvisioningStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ProvisioningStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ProvisioningStubSettings.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(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 ProvisioningStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - createInstanceSettings = settingsBuilder.createInstanceSettings().build(); - createInstanceOperationSettings = settingsBuilder.createInstanceOperationSettings().build(); - deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); - deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); - getInstanceSettings = settingsBuilder.getInstanceSettings().build(); - listLocationsSettings = settingsBuilder.listLocationsSettings().build(); - getLocationSettings = settingsBuilder.getLocationSettings().build(); - setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); - getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); - testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); - } - - /** Builder for ProvisioningStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - createInstanceSettings; - private final OperationCallSettings.Builder - createInstanceOperationSettings; - private final UnaryCallSettings.Builder - deleteInstanceSettings; - private final OperationCallSettings.Builder - deleteInstanceOperationSettings; - private final UnaryCallSettings.Builder getInstanceSettings; - private final PagedCallSettings.Builder< - ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> - listLocationsSettings; - private final UnaryCallSettings.Builder getLocationSettings; - private final UnaryCallSettings.Builder setIamPolicySettings; - private final UnaryCallSettings.Builder getIamPolicySettings; - private final UnaryCallSettings.Builder - testIamPermissionsSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - 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().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - createInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createInstanceOperationSettings = OperationCallSettings.newBuilder(); - deleteInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); - getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); - getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createInstanceSettings, - deleteInstanceSettings, - getInstanceSettings, - listLocationsSettings, - getLocationSettings, - setIamPolicySettings, - getIamPolicySettings, - testIamPermissionsSettings); - initDefaults(this); - } - - protected Builder(ProvisioningStubSettings settings) { - super(settings); - - createInstanceSettings = settings.createInstanceSettings.toBuilder(); - createInstanceOperationSettings = settings.createInstanceOperationSettings.toBuilder(); - deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); - deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); - getInstanceSettings = settings.getInstanceSettings.toBuilder(); - listLocationsSettings = settings.listLocationsSettings.toBuilder(); - getLocationSettings = settings.getLocationSettings.toBuilder(); - setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); - getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); - testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createInstanceSettings, - deleteInstanceSettings, - getInstanceSettings, - listLocationsSettings, - getLocationSettings, - setIamPolicySettings, - getIamPolicySettings, - testIamPermissionsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - 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.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .createInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deleteInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 - .setIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .testIamPermissionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .deleteInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .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 createInstance. */ - public UnaryCallSettings.Builder createInstanceSettings() { - return createInstanceSettings; - } - - /** Returns the builder for the settings used for calls to createInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createInstanceOperationSettings() { - return createInstanceOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - public UnaryCallSettings.Builder deleteInstanceSettings() { - return deleteInstanceSettings; - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteInstanceOperationSettings() { - return deleteInstanceOperationSettings; - } - - /** Returns the builder for the settings used for calls to getInstance. */ - public UnaryCallSettings.Builder getInstanceSettings() { - return getInstanceSettings; - } - - /** 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; - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to getIamPolicy. */ - public UnaryCallSettings.Builder getIamPolicySettings() { - return getIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - @Override - public ProvisioningStubSettings build() throws IOException { - return new ProvisioningStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStub.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStub.java deleted file mode 100644 index 3e10ebb03af4..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStub.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub; - -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; - -import com.google.api.HttpBody; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; -import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.GetApiRequest; -import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; -import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; -import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApisRequest; -import com.google.cloud.apigeeregistry.v1.ListApisResponse; -import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; -import com.google.cloud.apigeeregistry.v1.ListArtifactsResponse; -import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; -import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; -import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; -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.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the Registry service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class RegistryStub implements BackgroundResource { - - public UnaryCallable listApisPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listApisPagedCallable()"); - } - - public UnaryCallable listApisCallable() { - throw new UnsupportedOperationException("Not implemented: listApisCallable()"); - } - - public UnaryCallable getApiCallable() { - throw new UnsupportedOperationException("Not implemented: getApiCallable()"); - } - - public UnaryCallable createApiCallable() { - throw new UnsupportedOperationException("Not implemented: createApiCallable()"); - } - - public UnaryCallable updateApiCallable() { - throw new UnsupportedOperationException("Not implemented: updateApiCallable()"); - } - - public UnaryCallable deleteApiCallable() { - throw new UnsupportedOperationException("Not implemented: deleteApiCallable()"); - } - - public UnaryCallable - listApiVersionsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listApiVersionsPagedCallable()"); - } - - public UnaryCallable listApiVersionsCallable() { - throw new UnsupportedOperationException("Not implemented: listApiVersionsCallable()"); - } - - public UnaryCallable getApiVersionCallable() { - throw new UnsupportedOperationException("Not implemented: getApiVersionCallable()"); - } - - public UnaryCallable createApiVersionCallable() { - throw new UnsupportedOperationException("Not implemented: createApiVersionCallable()"); - } - - public UnaryCallable updateApiVersionCallable() { - throw new UnsupportedOperationException("Not implemented: updateApiVersionCallable()"); - } - - public UnaryCallable deleteApiVersionCallable() { - throw new UnsupportedOperationException("Not implemented: deleteApiVersionCallable()"); - } - - public UnaryCallable listApiSpecsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listApiSpecsPagedCallable()"); - } - - public UnaryCallable listApiSpecsCallable() { - throw new UnsupportedOperationException("Not implemented: listApiSpecsCallable()"); - } - - public UnaryCallable getApiSpecCallable() { - throw new UnsupportedOperationException("Not implemented: getApiSpecCallable()"); - } - - public UnaryCallable getApiSpecContentsCallable() { - throw new UnsupportedOperationException("Not implemented: getApiSpecContentsCallable()"); - } - - public UnaryCallable createApiSpecCallable() { - throw new UnsupportedOperationException("Not implemented: createApiSpecCallable()"); - } - - public UnaryCallable updateApiSpecCallable() { - throw new UnsupportedOperationException("Not implemented: updateApiSpecCallable()"); - } - - public UnaryCallable deleteApiSpecCallable() { - throw new UnsupportedOperationException("Not implemented: deleteApiSpecCallable()"); - } - - public UnaryCallable tagApiSpecRevisionCallable() { - throw new UnsupportedOperationException("Not implemented: tagApiSpecRevisionCallable()"); - } - - public UnaryCallable - listApiSpecRevisionsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listApiSpecRevisionsPagedCallable()"); - } - - public UnaryCallable - listApiSpecRevisionsCallable() { - throw new UnsupportedOperationException("Not implemented: listApiSpecRevisionsCallable()"); - } - - public UnaryCallable rollbackApiSpecCallable() { - throw new UnsupportedOperationException("Not implemented: rollbackApiSpecCallable()"); - } - - public UnaryCallable deleteApiSpecRevisionCallable() { - throw new UnsupportedOperationException("Not implemented: deleteApiSpecRevisionCallable()"); - } - - public UnaryCallable - listApiDeploymentsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listApiDeploymentsPagedCallable()"); - } - - public UnaryCallable - listApiDeploymentsCallable() { - throw new UnsupportedOperationException("Not implemented: listApiDeploymentsCallable()"); - } - - public UnaryCallable getApiDeploymentCallable() { - throw new UnsupportedOperationException("Not implemented: getApiDeploymentCallable()"); - } - - public UnaryCallable createApiDeploymentCallable() { - throw new UnsupportedOperationException("Not implemented: createApiDeploymentCallable()"); - } - - public UnaryCallable updateApiDeploymentCallable() { - throw new UnsupportedOperationException("Not implemented: updateApiDeploymentCallable()"); - } - - public UnaryCallable deleteApiDeploymentCallable() { - throw new UnsupportedOperationException("Not implemented: deleteApiDeploymentCallable()"); - } - - public UnaryCallable - tagApiDeploymentRevisionCallable() { - throw new UnsupportedOperationException("Not implemented: tagApiDeploymentRevisionCallable()"); - } - - public UnaryCallable - listApiDeploymentRevisionsPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listApiDeploymentRevisionsPagedCallable()"); - } - - public UnaryCallable - listApiDeploymentRevisionsCallable() { - throw new UnsupportedOperationException( - "Not implemented: listApiDeploymentRevisionsCallable()"); - } - - public UnaryCallable - rollbackApiDeploymentCallable() { - throw new UnsupportedOperationException("Not implemented: rollbackApiDeploymentCallable()"); - } - - public UnaryCallable - deleteApiDeploymentRevisionCallable() { - throw new UnsupportedOperationException( - "Not implemented: deleteApiDeploymentRevisionCallable()"); - } - - public UnaryCallable - listArtifactsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listArtifactsPagedCallable()"); - } - - public UnaryCallable listArtifactsCallable() { - throw new UnsupportedOperationException("Not implemented: listArtifactsCallable()"); - } - - public UnaryCallable getArtifactCallable() { - throw new UnsupportedOperationException("Not implemented: getArtifactCallable()"); - } - - public UnaryCallable getArtifactContentsCallable() { - throw new UnsupportedOperationException("Not implemented: getArtifactContentsCallable()"); - } - - public UnaryCallable createArtifactCallable() { - throw new UnsupportedOperationException("Not implemented: createArtifactCallable()"); - } - - public UnaryCallable replaceArtifactCallable() { - throw new UnsupportedOperationException("Not implemented: replaceArtifactCallable()"); - } - - public UnaryCallable deleteArtifactCallable() { - throw new UnsupportedOperationException("Not implemented: deleteArtifactCallable()"); - } - - 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()"); - } - - public UnaryCallable setIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); - } - - public UnaryCallable getIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); - } - - public UnaryCallable - testIamPermissionsCallable() { - throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java deleted file mode 100644 index f99fd2a37da9..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/main/java/com/google/cloud/apigeeregistry/v1/stub/RegistryStubSettings.java +++ /dev/null @@ -1,1844 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub; - -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; - -import com.google.api.HttpBody; -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -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.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -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.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.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; -import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.GetApiRequest; -import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; -import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; -import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse; -import com.google.cloud.apigeeregistry.v1.ListApisRequest; -import com.google.cloud.apigeeregistry.v1.ListApisResponse; -import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; -import com.google.cloud.apigeeregistry.v1.ListArtifactsResponse; -import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; -import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; -import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; -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.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link RegistryStub}. - * - *

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

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

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

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * RegistryStubSettings.Builder registrySettingsBuilder = RegistryStubSettings.newBuilder();
- * registrySettingsBuilder
- *     .getApiSettings()
- *     .setRetrySettings(
- *         registrySettingsBuilder
- *             .getApiSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * RegistryStubSettings registrySettings = registrySettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class RegistryStubSettings 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 PagedCallSettings - listApisSettings; - private final UnaryCallSettings getApiSettings; - private final UnaryCallSettings createApiSettings; - private final UnaryCallSettings updateApiSettings; - private final UnaryCallSettings deleteApiSettings; - private final PagedCallSettings< - ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> - listApiVersionsSettings; - private final UnaryCallSettings getApiVersionSettings; - private final UnaryCallSettings createApiVersionSettings; - private final UnaryCallSettings updateApiVersionSettings; - private final UnaryCallSettings deleteApiVersionSettings; - private final PagedCallSettings< - ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse> - listApiSpecsSettings; - private final UnaryCallSettings getApiSpecSettings; - private final UnaryCallSettings getApiSpecContentsSettings; - private final UnaryCallSettings createApiSpecSettings; - private final UnaryCallSettings updateApiSpecSettings; - private final UnaryCallSettings deleteApiSpecSettings; - private final UnaryCallSettings tagApiSpecRevisionSettings; - private final PagedCallSettings< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, - ListApiSpecRevisionsPagedResponse> - listApiSpecRevisionsSettings; - private final UnaryCallSettings rollbackApiSpecSettings; - private final UnaryCallSettings - deleteApiSpecRevisionSettings; - private final PagedCallSettings< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> - listApiDeploymentsSettings; - private final UnaryCallSettings getApiDeploymentSettings; - private final UnaryCallSettings - createApiDeploymentSettings; - private final UnaryCallSettings - updateApiDeploymentSettings; - private final UnaryCallSettings deleteApiDeploymentSettings; - private final UnaryCallSettings - tagApiDeploymentRevisionSettings; - private final PagedCallSettings< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ListApiDeploymentRevisionsPagedResponse> - listApiDeploymentRevisionsSettings; - private final UnaryCallSettings - rollbackApiDeploymentSettings; - private final UnaryCallSettings - deleteApiDeploymentRevisionSettings; - private final PagedCallSettings< - ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse> - listArtifactsSettings; - private final UnaryCallSettings getArtifactSettings; - private final UnaryCallSettings getArtifactContentsSettings; - private final UnaryCallSettings createArtifactSettings; - private final UnaryCallSettings replaceArtifactSettings; - private final UnaryCallSettings deleteArtifactSettings; - private final PagedCallSettings< - ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> - listLocationsSettings; - private final UnaryCallSettings getLocationSettings; - private final UnaryCallSettings setIamPolicySettings; - private final UnaryCallSettings getIamPolicySettings; - private final UnaryCallSettings - testIamPermissionsSettings; - - private static final PagedListDescriptor - LIST_APIS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListApisRequest injectToken(ListApisRequest payload, String token) { - return ListApisRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListApisRequest injectPageSize(ListApisRequest payload, int pageSize) { - return ListApisRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListApisRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListApisResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListApisResponse payload) { - return payload.getApisList() == null - ? ImmutableList.of() - : payload.getApisList(); - } - }; - - private static final PagedListDescriptor< - ListApiVersionsRequest, ListApiVersionsResponse, ApiVersion> - LIST_API_VERSIONS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListApiVersionsRequest injectToken( - ListApiVersionsRequest payload, String token) { - return ListApiVersionsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListApiVersionsRequest injectPageSize( - ListApiVersionsRequest payload, int pageSize) { - return ListApiVersionsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListApiVersionsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListApiVersionsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListApiVersionsResponse payload) { - return payload.getApiVersionsList() == null - ? ImmutableList.of() - : payload.getApiVersionsList(); - } - }; - - private static final PagedListDescriptor - LIST_API_SPECS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListApiSpecsRequest injectToken(ListApiSpecsRequest payload, String token) { - return ListApiSpecsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListApiSpecsRequest injectPageSize(ListApiSpecsRequest payload, int pageSize) { - return ListApiSpecsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListApiSpecsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListApiSpecsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListApiSpecsResponse payload) { - return payload.getApiSpecsList() == null - ? ImmutableList.of() - : payload.getApiSpecsList(); - } - }; - - private static final PagedListDescriptor< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, ApiSpec> - LIST_API_SPEC_REVISIONS_PAGE_STR_DESC = - new PagedListDescriptor< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, ApiSpec>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListApiSpecRevisionsRequest injectToken( - ListApiSpecRevisionsRequest payload, String token) { - return ListApiSpecRevisionsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListApiSpecRevisionsRequest injectPageSize( - ListApiSpecRevisionsRequest payload, int pageSize) { - return ListApiSpecRevisionsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListApiSpecRevisionsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListApiSpecRevisionsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListApiSpecRevisionsResponse payload) { - return payload.getApiSpecsList() == null - ? ImmutableList.of() - : payload.getApiSpecsList(); - } - }; - - private static final PagedListDescriptor< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ApiDeployment> - LIST_API_DEPLOYMENTS_PAGE_STR_DESC = - new PagedListDescriptor< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ApiDeployment>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListApiDeploymentsRequest injectToken( - ListApiDeploymentsRequest payload, String token) { - return ListApiDeploymentsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListApiDeploymentsRequest injectPageSize( - ListApiDeploymentsRequest payload, int pageSize) { - return ListApiDeploymentsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListApiDeploymentsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListApiDeploymentsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListApiDeploymentsResponse payload) { - return payload.getApiDeploymentsList() == null - ? ImmutableList.of() - : payload.getApiDeploymentsList(); - } - }; - - private static final PagedListDescriptor< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, ApiDeployment> - LIST_API_DEPLOYMENT_REVISIONS_PAGE_STR_DESC = - new PagedListDescriptor< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ApiDeployment>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListApiDeploymentRevisionsRequest injectToken( - ListApiDeploymentRevisionsRequest payload, String token) { - return ListApiDeploymentRevisionsRequest.newBuilder(payload) - .setPageToken(token) - .build(); - } - - @Override - public ListApiDeploymentRevisionsRequest injectPageSize( - ListApiDeploymentRevisionsRequest payload, int pageSize) { - return ListApiDeploymentRevisionsRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } - - @Override - public Integer extractPageSize(ListApiDeploymentRevisionsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListApiDeploymentRevisionsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListApiDeploymentRevisionsResponse payload) { - return payload.getApiDeploymentsList() == null - ? ImmutableList.of() - : payload.getApiDeploymentsList(); - } - }; - - private static final PagedListDescriptor - LIST_ARTIFACTS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListArtifactsRequest injectToken(ListArtifactsRequest payload, String token) { - return ListArtifactsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListArtifactsRequest injectPageSize(ListArtifactsRequest payload, int pageSize) { - return ListArtifactsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListArtifactsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListArtifactsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListArtifactsResponse payload) { - return payload.getArtifactsList() == null - ? ImmutableList.of() - : payload.getArtifactsList(); - } - }; - - 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() == null - ? ImmutableList.of() - : payload.getLocationsList(); - } - }; - - private static final PagedListResponseFactory< - ListApisRequest, ListApisResponse, ListApisPagedResponse> - LIST_APIS_PAGE_STR_FACT = - new PagedListResponseFactory() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListApisRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_APIS_PAGE_STR_DESC, request, context); - return ListApisPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> - LIST_API_VERSIONS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListApiVersionsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_API_VERSIONS_PAGE_STR_DESC, request, context); - return ListApiVersionsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse> - LIST_API_SPECS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListApiSpecsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_API_SPECS_PAGE_STR_DESC, request, context); - return ListApiSpecsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, - ListApiSpecRevisionsPagedResponse> - LIST_API_SPEC_REVISIONS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, - ListApiSpecRevisionsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListApiSpecRevisionsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_API_SPEC_REVISIONS_PAGE_STR_DESC, request, context); - return ListApiSpecRevisionsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> - LIST_API_DEPLOYMENTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, - ListApiDeploymentsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListApiDeploymentsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_API_DEPLOYMENTS_PAGE_STR_DESC, request, context); - return ListApiDeploymentsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ListApiDeploymentRevisionsPagedResponse> - LIST_API_DEPLOYMENT_REVISIONS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ListApiDeploymentRevisionsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - ListApiDeploymentRevisionsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ApiDeployment> - pageContext = - PageContext.create( - callable, LIST_API_DEPLOYMENT_REVISIONS_PAGE_STR_DESC, request, context); - return ListApiDeploymentRevisionsPagedResponse.createAsync( - pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse> - LIST_ARTIFACTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListArtifactsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_ARTIFACTS_PAGE_STR_DESC, request, context); - return ListArtifactsPagedResponse.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 listApis. */ - public PagedCallSettings - listApisSettings() { - return listApisSettings; - } - - /** Returns the object with the settings used for calls to getApi. */ - public UnaryCallSettings getApiSettings() { - return getApiSettings; - } - - /** Returns the object with the settings used for calls to createApi. */ - public UnaryCallSettings createApiSettings() { - return createApiSettings; - } - - /** Returns the object with the settings used for calls to updateApi. */ - public UnaryCallSettings updateApiSettings() { - return updateApiSettings; - } - - /** Returns the object with the settings used for calls to deleteApi. */ - public UnaryCallSettings deleteApiSettings() { - return deleteApiSettings; - } - - /** Returns the object with the settings used for calls to listApiVersions. */ - public PagedCallSettings< - ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> - listApiVersionsSettings() { - return listApiVersionsSettings; - } - - /** Returns the object with the settings used for calls to getApiVersion. */ - public UnaryCallSettings getApiVersionSettings() { - return getApiVersionSettings; - } - - /** Returns the object with the settings used for calls to createApiVersion. */ - public UnaryCallSettings createApiVersionSettings() { - return createApiVersionSettings; - } - - /** Returns the object with the settings used for calls to updateApiVersion. */ - public UnaryCallSettings updateApiVersionSettings() { - return updateApiVersionSettings; - } - - /** Returns the object with the settings used for calls to deleteApiVersion. */ - public UnaryCallSettings deleteApiVersionSettings() { - return deleteApiVersionSettings; - } - - /** Returns the object with the settings used for calls to listApiSpecs. */ - public PagedCallSettings - listApiSpecsSettings() { - return listApiSpecsSettings; - } - - /** Returns the object with the settings used for calls to getApiSpec. */ - public UnaryCallSettings getApiSpecSettings() { - return getApiSpecSettings; - } - - /** Returns the object with the settings used for calls to getApiSpecContents. */ - public UnaryCallSettings getApiSpecContentsSettings() { - return getApiSpecContentsSettings; - } - - /** Returns the object with the settings used for calls to createApiSpec. */ - public UnaryCallSettings createApiSpecSettings() { - return createApiSpecSettings; - } - - /** Returns the object with the settings used for calls to updateApiSpec. */ - public UnaryCallSettings updateApiSpecSettings() { - return updateApiSpecSettings; - } - - /** Returns the object with the settings used for calls to deleteApiSpec. */ - public UnaryCallSettings deleteApiSpecSettings() { - return deleteApiSpecSettings; - } - - /** Returns the object with the settings used for calls to tagApiSpecRevision. */ - public UnaryCallSettings tagApiSpecRevisionSettings() { - return tagApiSpecRevisionSettings; - } - - /** Returns the object with the settings used for calls to listApiSpecRevisions. */ - public PagedCallSettings< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, - ListApiSpecRevisionsPagedResponse> - listApiSpecRevisionsSettings() { - return listApiSpecRevisionsSettings; - } - - /** Returns the object with the settings used for calls to rollbackApiSpec. */ - public UnaryCallSettings rollbackApiSpecSettings() { - return rollbackApiSpecSettings; - } - - /** Returns the object with the settings used for calls to deleteApiSpecRevision. */ - public UnaryCallSettings deleteApiSpecRevisionSettings() { - return deleteApiSpecRevisionSettings; - } - - /** Returns the object with the settings used for calls to listApiDeployments. */ - public PagedCallSettings< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> - listApiDeploymentsSettings() { - return listApiDeploymentsSettings; - } - - /** Returns the object with the settings used for calls to getApiDeployment. */ - public UnaryCallSettings getApiDeploymentSettings() { - return getApiDeploymentSettings; - } - - /** Returns the object with the settings used for calls to createApiDeployment. */ - public UnaryCallSettings - createApiDeploymentSettings() { - return createApiDeploymentSettings; - } - - /** Returns the object with the settings used for calls to updateApiDeployment. */ - public UnaryCallSettings - updateApiDeploymentSettings() { - return updateApiDeploymentSettings; - } - - /** Returns the object with the settings used for calls to deleteApiDeployment. */ - public UnaryCallSettings deleteApiDeploymentSettings() { - return deleteApiDeploymentSettings; - } - - /** Returns the object with the settings used for calls to tagApiDeploymentRevision. */ - public UnaryCallSettings - tagApiDeploymentRevisionSettings() { - return tagApiDeploymentRevisionSettings; - } - - /** Returns the object with the settings used for calls to listApiDeploymentRevisions. */ - public PagedCallSettings< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ListApiDeploymentRevisionsPagedResponse> - listApiDeploymentRevisionsSettings() { - return listApiDeploymentRevisionsSettings; - } - - /** Returns the object with the settings used for calls to rollbackApiDeployment. */ - public UnaryCallSettings - rollbackApiDeploymentSettings() { - return rollbackApiDeploymentSettings; - } - - /** Returns the object with the settings used for calls to deleteApiDeploymentRevision. */ - public UnaryCallSettings - deleteApiDeploymentRevisionSettings() { - return deleteApiDeploymentRevisionSettings; - } - - /** Returns the object with the settings used for calls to listArtifacts. */ - public PagedCallSettings - listArtifactsSettings() { - return listArtifactsSettings; - } - - /** Returns the object with the settings used for calls to getArtifact. */ - public UnaryCallSettings getArtifactSettings() { - return getArtifactSettings; - } - - /** Returns the object with the settings used for calls to getArtifactContents. */ - public UnaryCallSettings getArtifactContentsSettings() { - return getArtifactContentsSettings; - } - - /** Returns the object with the settings used for calls to createArtifact. */ - public UnaryCallSettings createArtifactSettings() { - return createArtifactSettings; - } - - /** Returns the object with the settings used for calls to replaceArtifact. */ - public UnaryCallSettings replaceArtifactSettings() { - return replaceArtifactSettings; - } - - /** Returns the object with the settings used for calls to deleteArtifact. */ - public UnaryCallSettings deleteArtifactSettings() { - return deleteArtifactSettings; - } - - /** 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; - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the object with the settings used for calls to getIamPolicy. */ - public UnaryCallSettings getIamPolicySettings() { - return getIamPolicySettings; - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - public RegistryStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcRegistryStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonRegistryStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "apigeeregistry.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "apigeeregistry.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(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(RegistryStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(RegistryStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return RegistryStubSettings.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(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 RegistryStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listApisSettings = settingsBuilder.listApisSettings().build(); - getApiSettings = settingsBuilder.getApiSettings().build(); - createApiSettings = settingsBuilder.createApiSettings().build(); - updateApiSettings = settingsBuilder.updateApiSettings().build(); - deleteApiSettings = settingsBuilder.deleteApiSettings().build(); - listApiVersionsSettings = settingsBuilder.listApiVersionsSettings().build(); - getApiVersionSettings = settingsBuilder.getApiVersionSettings().build(); - createApiVersionSettings = settingsBuilder.createApiVersionSettings().build(); - updateApiVersionSettings = settingsBuilder.updateApiVersionSettings().build(); - deleteApiVersionSettings = settingsBuilder.deleteApiVersionSettings().build(); - listApiSpecsSettings = settingsBuilder.listApiSpecsSettings().build(); - getApiSpecSettings = settingsBuilder.getApiSpecSettings().build(); - getApiSpecContentsSettings = settingsBuilder.getApiSpecContentsSettings().build(); - createApiSpecSettings = settingsBuilder.createApiSpecSettings().build(); - updateApiSpecSettings = settingsBuilder.updateApiSpecSettings().build(); - deleteApiSpecSettings = settingsBuilder.deleteApiSpecSettings().build(); - tagApiSpecRevisionSettings = settingsBuilder.tagApiSpecRevisionSettings().build(); - listApiSpecRevisionsSettings = settingsBuilder.listApiSpecRevisionsSettings().build(); - rollbackApiSpecSettings = settingsBuilder.rollbackApiSpecSettings().build(); - deleteApiSpecRevisionSettings = settingsBuilder.deleteApiSpecRevisionSettings().build(); - listApiDeploymentsSettings = settingsBuilder.listApiDeploymentsSettings().build(); - getApiDeploymentSettings = settingsBuilder.getApiDeploymentSettings().build(); - createApiDeploymentSettings = settingsBuilder.createApiDeploymentSettings().build(); - updateApiDeploymentSettings = settingsBuilder.updateApiDeploymentSettings().build(); - deleteApiDeploymentSettings = settingsBuilder.deleteApiDeploymentSettings().build(); - tagApiDeploymentRevisionSettings = settingsBuilder.tagApiDeploymentRevisionSettings().build(); - listApiDeploymentRevisionsSettings = - settingsBuilder.listApiDeploymentRevisionsSettings().build(); - rollbackApiDeploymentSettings = settingsBuilder.rollbackApiDeploymentSettings().build(); - deleteApiDeploymentRevisionSettings = - settingsBuilder.deleteApiDeploymentRevisionSettings().build(); - listArtifactsSettings = settingsBuilder.listArtifactsSettings().build(); - getArtifactSettings = settingsBuilder.getArtifactSettings().build(); - getArtifactContentsSettings = settingsBuilder.getArtifactContentsSettings().build(); - createArtifactSettings = settingsBuilder.createArtifactSettings().build(); - replaceArtifactSettings = settingsBuilder.replaceArtifactSettings().build(); - deleteArtifactSettings = settingsBuilder.deleteArtifactSettings().build(); - listLocationsSettings = settingsBuilder.listLocationsSettings().build(); - getLocationSettings = settingsBuilder.getLocationSettings().build(); - setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); - getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); - testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); - } - - /** Builder for RegistryStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListApisRequest, ListApisResponse, ListApisPagedResponse> - listApisSettings; - private final UnaryCallSettings.Builder getApiSettings; - private final UnaryCallSettings.Builder createApiSettings; - private final UnaryCallSettings.Builder updateApiSettings; - private final UnaryCallSettings.Builder deleteApiSettings; - private final PagedCallSettings.Builder< - ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> - listApiVersionsSettings; - private final UnaryCallSettings.Builder getApiVersionSettings; - private final UnaryCallSettings.Builder - createApiVersionSettings; - private final UnaryCallSettings.Builder - updateApiVersionSettings; - private final UnaryCallSettings.Builder - deleteApiVersionSettings; - private final PagedCallSettings.Builder< - ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse> - listApiSpecsSettings; - private final UnaryCallSettings.Builder getApiSpecSettings; - private final UnaryCallSettings.Builder - getApiSpecContentsSettings; - private final UnaryCallSettings.Builder createApiSpecSettings; - private final UnaryCallSettings.Builder updateApiSpecSettings; - private final UnaryCallSettings.Builder deleteApiSpecSettings; - private final UnaryCallSettings.Builder - tagApiSpecRevisionSettings; - private final PagedCallSettings.Builder< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, - ListApiSpecRevisionsPagedResponse> - listApiSpecRevisionsSettings; - private final UnaryCallSettings.Builder - rollbackApiSpecSettings; - private final UnaryCallSettings.Builder - deleteApiSpecRevisionSettings; - private final PagedCallSettings.Builder< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> - listApiDeploymentsSettings; - private final UnaryCallSettings.Builder - getApiDeploymentSettings; - private final UnaryCallSettings.Builder - createApiDeploymentSettings; - private final UnaryCallSettings.Builder - updateApiDeploymentSettings; - private final UnaryCallSettings.Builder - deleteApiDeploymentSettings; - private final UnaryCallSettings.Builder - tagApiDeploymentRevisionSettings; - private final PagedCallSettings.Builder< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ListApiDeploymentRevisionsPagedResponse> - listApiDeploymentRevisionsSettings; - private final UnaryCallSettings.Builder - rollbackApiDeploymentSettings; - private final UnaryCallSettings.Builder - deleteApiDeploymentRevisionSettings; - private final PagedCallSettings.Builder< - ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse> - listArtifactsSettings; - private final UnaryCallSettings.Builder getArtifactSettings; - private final UnaryCallSettings.Builder - getArtifactContentsSettings; - private final UnaryCallSettings.Builder createArtifactSettings; - private final UnaryCallSettings.Builder - replaceArtifactSettings; - private final UnaryCallSettings.Builder deleteArtifactSettings; - private final PagedCallSettings.Builder< - ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> - listLocationsSettings; - private final UnaryCallSettings.Builder getLocationSettings; - private final UnaryCallSettings.Builder setIamPolicySettings; - private final UnaryCallSettings.Builder getIamPolicySettings; - private final UnaryCallSettings.Builder - testIamPermissionsSettings; - 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.ABORTED, - StatusCode.Code.CANCELLED, - StatusCode.Code.DEADLINE_EXCEEDED, - 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() - .setInitialRetryDelay(Duration.ofMillis(200L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(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(ClientContext clientContext) { - super(clientContext); - - listApisSettings = PagedCallSettings.newBuilder(LIST_APIS_PAGE_STR_FACT); - getApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listApiVersionsSettings = PagedCallSettings.newBuilder(LIST_API_VERSIONS_PAGE_STR_FACT); - getApiVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createApiVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateApiVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteApiVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listApiSpecsSettings = PagedCallSettings.newBuilder(LIST_API_SPECS_PAGE_STR_FACT); - getApiSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getApiSpecContentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createApiSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateApiSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteApiSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - tagApiSpecRevisionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listApiSpecRevisionsSettings = - PagedCallSettings.newBuilder(LIST_API_SPEC_REVISIONS_PAGE_STR_FACT); - rollbackApiSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteApiSpecRevisionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listApiDeploymentsSettings = PagedCallSettings.newBuilder(LIST_API_DEPLOYMENTS_PAGE_STR_FACT); - getApiDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createApiDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateApiDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteApiDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - tagApiDeploymentRevisionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listApiDeploymentRevisionsSettings = - PagedCallSettings.newBuilder(LIST_API_DEPLOYMENT_REVISIONS_PAGE_STR_FACT); - rollbackApiDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteApiDeploymentRevisionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listArtifactsSettings = PagedCallSettings.newBuilder(LIST_ARTIFACTS_PAGE_STR_FACT); - getArtifactSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getArtifactContentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createArtifactSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - replaceArtifactSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteArtifactSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); - getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listApisSettings, - getApiSettings, - createApiSettings, - updateApiSettings, - deleteApiSettings, - listApiVersionsSettings, - getApiVersionSettings, - createApiVersionSettings, - updateApiVersionSettings, - deleteApiVersionSettings, - listApiSpecsSettings, - getApiSpecSettings, - getApiSpecContentsSettings, - createApiSpecSettings, - updateApiSpecSettings, - deleteApiSpecSettings, - tagApiSpecRevisionSettings, - listApiSpecRevisionsSettings, - rollbackApiSpecSettings, - deleteApiSpecRevisionSettings, - listApiDeploymentsSettings, - getApiDeploymentSettings, - createApiDeploymentSettings, - updateApiDeploymentSettings, - deleteApiDeploymentSettings, - tagApiDeploymentRevisionSettings, - listApiDeploymentRevisionsSettings, - rollbackApiDeploymentSettings, - deleteApiDeploymentRevisionSettings, - listArtifactsSettings, - getArtifactSettings, - getArtifactContentsSettings, - createArtifactSettings, - replaceArtifactSettings, - deleteArtifactSettings, - listLocationsSettings, - getLocationSettings, - setIamPolicySettings, - getIamPolicySettings, - testIamPermissionsSettings); - initDefaults(this); - } - - protected Builder(RegistryStubSettings settings) { - super(settings); - - listApisSettings = settings.listApisSettings.toBuilder(); - getApiSettings = settings.getApiSettings.toBuilder(); - createApiSettings = settings.createApiSettings.toBuilder(); - updateApiSettings = settings.updateApiSettings.toBuilder(); - deleteApiSettings = settings.deleteApiSettings.toBuilder(); - listApiVersionsSettings = settings.listApiVersionsSettings.toBuilder(); - getApiVersionSettings = settings.getApiVersionSettings.toBuilder(); - createApiVersionSettings = settings.createApiVersionSettings.toBuilder(); - updateApiVersionSettings = settings.updateApiVersionSettings.toBuilder(); - deleteApiVersionSettings = settings.deleteApiVersionSettings.toBuilder(); - listApiSpecsSettings = settings.listApiSpecsSettings.toBuilder(); - getApiSpecSettings = settings.getApiSpecSettings.toBuilder(); - getApiSpecContentsSettings = settings.getApiSpecContentsSettings.toBuilder(); - createApiSpecSettings = settings.createApiSpecSettings.toBuilder(); - updateApiSpecSettings = settings.updateApiSpecSettings.toBuilder(); - deleteApiSpecSettings = settings.deleteApiSpecSettings.toBuilder(); - tagApiSpecRevisionSettings = settings.tagApiSpecRevisionSettings.toBuilder(); - listApiSpecRevisionsSettings = settings.listApiSpecRevisionsSettings.toBuilder(); - rollbackApiSpecSettings = settings.rollbackApiSpecSettings.toBuilder(); - deleteApiSpecRevisionSettings = settings.deleteApiSpecRevisionSettings.toBuilder(); - listApiDeploymentsSettings = settings.listApiDeploymentsSettings.toBuilder(); - getApiDeploymentSettings = settings.getApiDeploymentSettings.toBuilder(); - createApiDeploymentSettings = settings.createApiDeploymentSettings.toBuilder(); - updateApiDeploymentSettings = settings.updateApiDeploymentSettings.toBuilder(); - deleteApiDeploymentSettings = settings.deleteApiDeploymentSettings.toBuilder(); - tagApiDeploymentRevisionSettings = settings.tagApiDeploymentRevisionSettings.toBuilder(); - listApiDeploymentRevisionsSettings = settings.listApiDeploymentRevisionsSettings.toBuilder(); - rollbackApiDeploymentSettings = settings.rollbackApiDeploymentSettings.toBuilder(); - deleteApiDeploymentRevisionSettings = - settings.deleteApiDeploymentRevisionSettings.toBuilder(); - listArtifactsSettings = settings.listArtifactsSettings.toBuilder(); - getArtifactSettings = settings.getArtifactSettings.toBuilder(); - getArtifactContentsSettings = settings.getArtifactContentsSettings.toBuilder(); - createArtifactSettings = settings.createArtifactSettings.toBuilder(); - replaceArtifactSettings = settings.replaceArtifactSettings.toBuilder(); - deleteArtifactSettings = settings.deleteArtifactSettings.toBuilder(); - listLocationsSettings = settings.listLocationsSettings.toBuilder(); - getLocationSettings = settings.getLocationSettings.toBuilder(); - setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); - getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); - testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listApisSettings, - getApiSettings, - createApiSettings, - updateApiSettings, - deleteApiSettings, - listApiVersionsSettings, - getApiVersionSettings, - createApiVersionSettings, - updateApiVersionSettings, - deleteApiVersionSettings, - listApiSpecsSettings, - getApiSpecSettings, - getApiSpecContentsSettings, - createApiSpecSettings, - updateApiSpecSettings, - deleteApiSpecSettings, - tagApiSpecRevisionSettings, - listApiSpecRevisionsSettings, - rollbackApiSpecSettings, - deleteApiSpecRevisionSettings, - listApiDeploymentsSettings, - getApiDeploymentSettings, - createApiDeploymentSettings, - updateApiDeploymentSettings, - deleteApiDeploymentSettings, - tagApiDeploymentRevisionSettings, - listApiDeploymentRevisionsSettings, - rollbackApiDeploymentSettings, - deleteApiDeploymentRevisionSettings, - listArtifactsSettings, - getArtifactSettings, - getArtifactContentsSettings, - createArtifactSettings, - replaceArtifactSettings, - deleteArtifactSettings, - listLocationsSettings, - getLocationSettings, - setIamPolicySettings, - getIamPolicySettings, - testIamPermissionsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - 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.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listApisSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getApiSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createApiSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateApiSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteApiSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listApiVersionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getApiVersionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createApiVersionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateApiVersionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteApiVersionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listApiSpecsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getApiSpecSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getApiSpecContentsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createApiSpecSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateApiSpecSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteApiSpecSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .tagApiSpecRevisionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listApiSpecRevisionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .rollbackApiSpecSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteApiSpecRevisionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listApiDeploymentsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getApiDeploymentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createApiDeploymentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateApiDeploymentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteApiDeploymentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .tagApiDeploymentRevisionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listApiDeploymentRevisionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .rollbackApiDeploymentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteApiDeploymentRevisionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listArtifactsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getArtifactSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getArtifactContentsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createArtifactSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .replaceArtifactSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteArtifactSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_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 - .setIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .testIamPermissionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - 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 listApis. */ - public PagedCallSettings.Builder - listApisSettings() { - return listApisSettings; - } - - /** Returns the builder for the settings used for calls to getApi. */ - public UnaryCallSettings.Builder getApiSettings() { - return getApiSettings; - } - - /** Returns the builder for the settings used for calls to createApi. */ - public UnaryCallSettings.Builder createApiSettings() { - return createApiSettings; - } - - /** Returns the builder for the settings used for calls to updateApi. */ - public UnaryCallSettings.Builder updateApiSettings() { - return updateApiSettings; - } - - /** Returns the builder for the settings used for calls to deleteApi. */ - public UnaryCallSettings.Builder deleteApiSettings() { - return deleteApiSettings; - } - - /** Returns the builder for the settings used for calls to listApiVersions. */ - public PagedCallSettings.Builder< - ListApiVersionsRequest, ListApiVersionsResponse, ListApiVersionsPagedResponse> - listApiVersionsSettings() { - return listApiVersionsSettings; - } - - /** Returns the builder for the settings used for calls to getApiVersion. */ - public UnaryCallSettings.Builder getApiVersionSettings() { - return getApiVersionSettings; - } - - /** Returns the builder for the settings used for calls to createApiVersion. */ - public UnaryCallSettings.Builder - createApiVersionSettings() { - return createApiVersionSettings; - } - - /** Returns the builder for the settings used for calls to updateApiVersion. */ - public UnaryCallSettings.Builder - updateApiVersionSettings() { - return updateApiVersionSettings; - } - - /** Returns the builder for the settings used for calls to deleteApiVersion. */ - public UnaryCallSettings.Builder deleteApiVersionSettings() { - return deleteApiVersionSettings; - } - - /** Returns the builder for the settings used for calls to listApiSpecs. */ - public PagedCallSettings.Builder< - ListApiSpecsRequest, ListApiSpecsResponse, ListApiSpecsPagedResponse> - listApiSpecsSettings() { - return listApiSpecsSettings; - } - - /** Returns the builder for the settings used for calls to getApiSpec. */ - public UnaryCallSettings.Builder getApiSpecSettings() { - return getApiSpecSettings; - } - - /** Returns the builder for the settings used for calls to getApiSpecContents. */ - public UnaryCallSettings.Builder - getApiSpecContentsSettings() { - return getApiSpecContentsSettings; - } - - /** Returns the builder for the settings used for calls to createApiSpec. */ - public UnaryCallSettings.Builder createApiSpecSettings() { - return createApiSpecSettings; - } - - /** Returns the builder for the settings used for calls to updateApiSpec. */ - public UnaryCallSettings.Builder updateApiSpecSettings() { - return updateApiSpecSettings; - } - - /** Returns the builder for the settings used for calls to deleteApiSpec. */ - public UnaryCallSettings.Builder deleteApiSpecSettings() { - return deleteApiSpecSettings; - } - - /** Returns the builder for the settings used for calls to tagApiSpecRevision. */ - public UnaryCallSettings.Builder - tagApiSpecRevisionSettings() { - return tagApiSpecRevisionSettings; - } - - /** Returns the builder for the settings used for calls to listApiSpecRevisions. */ - public PagedCallSettings.Builder< - ListApiSpecRevisionsRequest, ListApiSpecRevisionsResponse, - ListApiSpecRevisionsPagedResponse> - listApiSpecRevisionsSettings() { - return listApiSpecRevisionsSettings; - } - - /** Returns the builder for the settings used for calls to rollbackApiSpec. */ - public UnaryCallSettings.Builder rollbackApiSpecSettings() { - return rollbackApiSpecSettings; - } - - /** Returns the builder for the settings used for calls to deleteApiSpecRevision. */ - public UnaryCallSettings.Builder - deleteApiSpecRevisionSettings() { - return deleteApiSpecRevisionSettings; - } - - /** Returns the builder for the settings used for calls to listApiDeployments. */ - public PagedCallSettings.Builder< - ListApiDeploymentsRequest, ListApiDeploymentsResponse, ListApiDeploymentsPagedResponse> - listApiDeploymentsSettings() { - return listApiDeploymentsSettings; - } - - /** Returns the builder for the settings used for calls to getApiDeployment. */ - public UnaryCallSettings.Builder - getApiDeploymentSettings() { - return getApiDeploymentSettings; - } - - /** Returns the builder for the settings used for calls to createApiDeployment. */ - public UnaryCallSettings.Builder - createApiDeploymentSettings() { - return createApiDeploymentSettings; - } - - /** Returns the builder for the settings used for calls to updateApiDeployment. */ - public UnaryCallSettings.Builder - updateApiDeploymentSettings() { - return updateApiDeploymentSettings; - } - - /** Returns the builder for the settings used for calls to deleteApiDeployment. */ - public UnaryCallSettings.Builder - deleteApiDeploymentSettings() { - return deleteApiDeploymentSettings; - } - - /** Returns the builder for the settings used for calls to tagApiDeploymentRevision. */ - public UnaryCallSettings.Builder - tagApiDeploymentRevisionSettings() { - return tagApiDeploymentRevisionSettings; - } - - /** Returns the builder for the settings used for calls to listApiDeploymentRevisions. */ - public PagedCallSettings.Builder< - ListApiDeploymentRevisionsRequest, ListApiDeploymentRevisionsResponse, - ListApiDeploymentRevisionsPagedResponse> - listApiDeploymentRevisionsSettings() { - return listApiDeploymentRevisionsSettings; - } - - /** Returns the builder for the settings used for calls to rollbackApiDeployment. */ - public UnaryCallSettings.Builder - rollbackApiDeploymentSettings() { - return rollbackApiDeploymentSettings; - } - - /** Returns the builder for the settings used for calls to deleteApiDeploymentRevision. */ - public UnaryCallSettings.Builder - deleteApiDeploymentRevisionSettings() { - return deleteApiDeploymentRevisionSettings; - } - - /** Returns the builder for the settings used for calls to listArtifacts. */ - public PagedCallSettings.Builder< - ListArtifactsRequest, ListArtifactsResponse, ListArtifactsPagedResponse> - listArtifactsSettings() { - return listArtifactsSettings; - } - - /** Returns the builder for the settings used for calls to getArtifact. */ - public UnaryCallSettings.Builder getArtifactSettings() { - return getArtifactSettings; - } - - /** Returns the builder for the settings used for calls to getArtifactContents. */ - public UnaryCallSettings.Builder - getArtifactContentsSettings() { - return getArtifactContentsSettings; - } - - /** Returns the builder for the settings used for calls to createArtifact. */ - public UnaryCallSettings.Builder createArtifactSettings() { - return createArtifactSettings; - } - - /** Returns the builder for the settings used for calls to replaceArtifact. */ - public UnaryCallSettings.Builder replaceArtifactSettings() { - return replaceArtifactSettings; - } - - /** Returns the builder for the settings used for calls to deleteArtifact. */ - public UnaryCallSettings.Builder deleteArtifactSettings() { - return deleteArtifactSettings; - } - - /** 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; - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to getIamPolicy. */ - public UnaryCallSettings.Builder getIamPolicySettings() { - return getIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - @Override - public RegistryStubSettings build() throws IOException { - return new RegistryStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicy.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicy.java deleted file mode 100644 index d595f2852bc2..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicy.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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 MockIAMPolicy implements MockGrpcService { - private final MockIAMPolicyImpl serviceImpl; - - public MockIAMPolicy() { - serviceImpl = new MockIAMPolicyImpl(); - } - - @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicyImpl.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicyImpl.java deleted file mode 100644 index 0bde64f38778..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockIAMPolicyImpl.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1; - -import com.google.api.core.BetaApi; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 MockIAMPolicyImpl extends IAMPolicyImplBase { - private List requests; - private Queue responses; - - public MockIAMPolicyImpl() { - 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 testIamPermissions( - TestIamPermissionsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof TestIamPermissionsResponse) { - requests.add(request); - responseObserver.onNext(((TestIamPermissionsResponse) 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 TestIamPermissions, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - TestIamPermissionsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Policy) { - requests.add(request); - responseObserver.onNext(((Policy) 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 SetIamPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Policy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Policy) { - requests.add(request); - responseObserver.onNext(((Policy) 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 GetIamPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Policy.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocations.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocations.java deleted file mode 100644 index ab1c8bccba3c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocations.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocationsImpl.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocationsImpl.java deleted file mode 100644 index c1a4a118cf3c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockLocationsImpl.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioning.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioning.java deleted file mode 100644 index 1842a3b83bd1..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioning.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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 MockProvisioning implements MockGrpcService { - private final MockProvisioningImpl serviceImpl; - - public MockProvisioning() { - serviceImpl = new MockProvisioningImpl(); - } - - @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioningImpl.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioningImpl.java deleted file mode 100644 index 1e47e0e9f49b..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockProvisioningImpl.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.apigeeregistry.v1.ProvisioningGrpc.ProvisioningImplBase; -import com.google.longrunning.Operation; -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 MockProvisioningImpl extends ProvisioningImplBase { - private List requests; - private Queue responses; - - public MockProvisioningImpl() { - 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 createInstance( - CreateInstanceRequest 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 CreateInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteInstance( - DeleteInstanceRequest 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 DeleteInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Instance) { - requests.add(request); - responseObserver.onNext(((Instance) 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 GetInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Instance.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistry.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistry.java deleted file mode 100644 index a142c9c90b6d..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistry.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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 MockRegistry implements MockGrpcService { - private final MockRegistryImpl serviceImpl; - - public MockRegistry() { - serviceImpl = new MockRegistryImpl(); - } - - @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/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistryImpl.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistryImpl.java deleted file mode 100644 index 8aabf892bbe8..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/MockRegistryImpl.java +++ /dev/null @@ -1,792 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1; - -import com.google.api.HttpBody; -import com.google.api.core.BetaApi; -import com.google.cloud.apigeeregistry.v1.RegistryGrpc.RegistryImplBase; -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 MockRegistryImpl extends RegistryImplBase { - private List requests; - private Queue responses; - - public MockRegistryImpl() { - 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 listApis(ListApisRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListApisResponse) { - requests.add(request); - responseObserver.onNext(((ListApisResponse) 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 ListApis, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListApisResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getApi(GetApiRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Api) { - requests.add(request); - responseObserver.onNext(((Api) 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 GetApi, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Api.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createApi(CreateApiRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Api) { - requests.add(request); - responseObserver.onNext(((Api) 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 CreateApi, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Api.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateApi(UpdateApiRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Api) { - requests.add(request); - responseObserver.onNext(((Api) 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 UpdateApi, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Api.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteApi(DeleteApiRequest 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 DeleteApi, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listApiVersions( - ListApiVersionsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListApiVersionsResponse) { - requests.add(request); - responseObserver.onNext(((ListApiVersionsResponse) 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 ListApiVersions, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListApiVersionsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getApiVersion( - GetApiVersionRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiVersion) { - requests.add(request); - responseObserver.onNext(((ApiVersion) 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 GetApiVersion, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiVersion.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createApiVersion( - CreateApiVersionRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiVersion) { - requests.add(request); - responseObserver.onNext(((ApiVersion) 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 CreateApiVersion, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiVersion.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateApiVersion( - UpdateApiVersionRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiVersion) { - requests.add(request); - responseObserver.onNext(((ApiVersion) 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 UpdateApiVersion, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiVersion.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteApiVersion( - DeleteApiVersionRequest 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 DeleteApiVersion, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listApiSpecs( - ListApiSpecsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListApiSpecsResponse) { - requests.add(request); - responseObserver.onNext(((ListApiSpecsResponse) 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 ListApiSpecs, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListApiSpecsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getApiSpec(GetApiSpecRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiSpec) { - requests.add(request); - responseObserver.onNext(((ApiSpec) 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 GetApiSpec, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiSpec.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getApiSpecContents( - GetApiSpecContentsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof HttpBody) { - requests.add(request); - responseObserver.onNext(((HttpBody) 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 GetApiSpecContents, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - HttpBody.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createApiSpec( - CreateApiSpecRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiSpec) { - requests.add(request); - responseObserver.onNext(((ApiSpec) 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 CreateApiSpec, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiSpec.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateApiSpec( - UpdateApiSpecRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiSpec) { - requests.add(request); - responseObserver.onNext(((ApiSpec) 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 UpdateApiSpec, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiSpec.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteApiSpec(DeleteApiSpecRequest 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 DeleteApiSpec, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void tagApiSpecRevision( - TagApiSpecRevisionRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiSpec) { - requests.add(request); - responseObserver.onNext(((ApiSpec) 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 TagApiSpecRevision, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiSpec.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listApiSpecRevisions( - ListApiSpecRevisionsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListApiSpecRevisionsResponse) { - requests.add(request); - responseObserver.onNext(((ListApiSpecRevisionsResponse) 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 ListApiSpecRevisions, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListApiSpecRevisionsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void rollbackApiSpec( - RollbackApiSpecRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiSpec) { - requests.add(request); - responseObserver.onNext(((ApiSpec) 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 RollbackApiSpec, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiSpec.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteApiSpecRevision( - DeleteApiSpecRevisionRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiSpec) { - requests.add(request); - responseObserver.onNext(((ApiSpec) 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 DeleteApiSpecRevision, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiSpec.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listApiDeployments( - ListApiDeploymentsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListApiDeploymentsResponse) { - requests.add(request); - responseObserver.onNext(((ListApiDeploymentsResponse) 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 ListApiDeployments, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListApiDeploymentsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getApiDeployment( - GetApiDeploymentRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiDeployment) { - requests.add(request); - responseObserver.onNext(((ApiDeployment) 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 GetApiDeployment, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiDeployment.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createApiDeployment( - CreateApiDeploymentRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiDeployment) { - requests.add(request); - responseObserver.onNext(((ApiDeployment) 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 CreateApiDeployment, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiDeployment.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateApiDeployment( - UpdateApiDeploymentRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiDeployment) { - requests.add(request); - responseObserver.onNext(((ApiDeployment) 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 UpdateApiDeployment, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiDeployment.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteApiDeployment( - DeleteApiDeploymentRequest 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 DeleteApiDeployment, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void tagApiDeploymentRevision( - TagApiDeploymentRevisionRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiDeployment) { - requests.add(request); - responseObserver.onNext(((ApiDeployment) 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 TagApiDeploymentRevision, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiDeployment.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listApiDeploymentRevisions( - ListApiDeploymentRevisionsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListApiDeploymentRevisionsResponse) { - requests.add(request); - responseObserver.onNext(((ListApiDeploymentRevisionsResponse) 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 ListApiDeploymentRevisions, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListApiDeploymentRevisionsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void rollbackApiDeployment( - RollbackApiDeploymentRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiDeployment) { - requests.add(request); - responseObserver.onNext(((ApiDeployment) 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 RollbackApiDeployment, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiDeployment.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteApiDeploymentRevision( - DeleteApiDeploymentRevisionRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ApiDeployment) { - requests.add(request); - responseObserver.onNext(((ApiDeployment) 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 DeleteApiDeploymentRevision, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ApiDeployment.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listArtifacts( - ListArtifactsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListArtifactsResponse) { - requests.add(request); - responseObserver.onNext(((ListArtifactsResponse) 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 ListArtifacts, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListArtifactsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getArtifact(GetArtifactRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Artifact) { - requests.add(request); - responseObserver.onNext(((Artifact) 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 GetArtifact, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Artifact.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getArtifactContents( - GetArtifactContentsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof HttpBody) { - requests.add(request); - responseObserver.onNext(((HttpBody) 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 GetArtifactContents, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - HttpBody.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createArtifact( - CreateArtifactRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Artifact) { - requests.add(request); - responseObserver.onNext(((Artifact) 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 CreateArtifact, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Artifact.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void replaceArtifact( - ReplaceArtifactRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Artifact) { - requests.add(request); - responseObserver.onNext(((Artifact) 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 ReplaceArtifact, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Artifact.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteArtifact( - DeleteArtifactRequest 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 DeleteArtifact, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientHttpJsonTest.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientHttpJsonTest.java deleted file mode 100644 index 59069ef222ae..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientHttpJsonTest.java +++ /dev/null @@ -1,676 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1; - -import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; - -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.apigeeregistry.v1.stub.HttpJsonProvisioningStub; -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.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -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 ProvisioningClientHttpJsonTest { - private static MockHttpService mockService; - private static ProvisioningClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonProvisioningStub.getMethodDescriptors(), - ProvisioningSettings.getDefaultEndpoint()); - ProvisioningSettings settings = - ProvisioningSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - ProvisioningSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ProvisioningClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void createInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setConfig(Instance.Config.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).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 createInstanceExceptionTest() 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]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createInstanceTest2() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setConfig(Instance.Config.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).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 createInstanceExceptionTest2() 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"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteInstanceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - - client.deleteInstanceAsync(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 deleteInstanceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - client.deleteInstanceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteInstanceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; - - client.deleteInstanceAsync(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 deleteInstanceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; - client.deleteInstanceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void getInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setConfig(Instance.Config.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - - Instance actualResponse = client.getInstance(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 getInstanceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - client.getInstance(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getInstanceTest2() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setConfig(Instance.Config.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; - - Instance actualResponse = client.getInstance(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 getInstanceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; - client.getInstance(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @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. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(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 setIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(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 getIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(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 testIamPermissionsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientTest.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientTest.java deleted file mode 100644 index 72022cc687a3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/ProvisioningClientTest.java +++ /dev/null @@ -1,636 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1; - -import static com.google.cloud.apigeeregistry.v1.ProvisioningClient.ListLocationsPagedResponse; - -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.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -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 ProvisioningClientTest { - private static MockIAMPolicy mockIAMPolicy; - private static MockLocations mockLocations; - private static MockProvisioning mockProvisioning; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private ProvisioningClient client; - - @BeforeClass - public static void startStaticServer() { - mockProvisioning = new MockProvisioning(); - mockLocations = new MockLocations(); - mockIAMPolicy = new MockIAMPolicy(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockProvisioning, mockLocations, mockIAMPolicy)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ProvisioningSettings settings = - ProvisioningSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ProvisioningClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void createInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setConfig(Instance.Config.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProvisioning.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProvisioning.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(instance, actualRequest.getInstance()); - Assert.assertEquals(instanceId, actualRequest.getInstanceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProvisioning.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).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 createInstanceTest2() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setConfig(Instance.Config.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProvisioning.addResponse(resultOperation); - - String parent = "parent-995424086"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProvisioning.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(instance, actualRequest.getInstance()); - Assert.assertEquals(instanceId, actualRequest.getInstanceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createInstanceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProvisioning.addException(exception); - - try { - String parent = "parent-995424086"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).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 deleteInstanceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProvisioning.addResponse(resultOperation); - - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - - client.deleteInstanceAsync(name).get(); - - List actualRequests = mockProvisioning.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProvisioning.addException(exception); - - try { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - client.deleteInstanceAsync(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 deleteInstanceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProvisioning.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteInstanceAsync(name).get(); - - List actualRequests = mockProvisioning.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteInstanceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProvisioning.addException(exception); - - try { - String name = "name3373707"; - client.deleteInstanceAsync(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 getInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setConfig(Instance.Config.newBuilder().build()) - .build(); - mockProvisioning.addResponse(expectedResponse); - - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - - Instance actualResponse = client.getInstance(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProvisioning.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProvisioning.addException(exception); - - try { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - client.getInstance(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getInstanceTest2() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setConfig(Instance.Config.newBuilder().build()) - .build(); - mockProvisioning.addResponse(expectedResponse); - - String name = "name3373707"; - - Instance actualResponse = client.getInstance(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProvisioning.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getInstanceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProvisioning.addException(exception); - - try { - String name = "name3373707"; - client.getInstance(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @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. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockIAMPolicy.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); - Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockIAMPolicy.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockIAMPolicy.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void testIamPermissionsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientHttpJsonTest.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientHttpJsonTest.java deleted file mode 100644 index 1f0e27cf8004..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientHttpJsonTest.java +++ /dev/null @@ -1,4162 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1; - -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; - -import com.google.api.HttpBody; -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.apigeeregistry.v1.stub.HttpJsonRegistryStub; -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.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -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 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 RegistryClientHttpJsonTest { - private static MockHttpService mockService; - private static RegistryClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonRegistryStub.getMethodDescriptors(), RegistrySettings.getDefaultEndpoint()); - RegistrySettings settings = - RegistrySettings.newHttpJsonBuilder() - .setTransportChannelProvider( - RegistrySettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = RegistryClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void listApisTest() throws Exception { - Api responsesElement = Api.newBuilder().build(); - ListApisResponse expectedResponse = - ListApisResponse.newBuilder() - .setNextPageToken("") - .addAllApis(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListApisPagedResponse pagedListResponse = client.listApis(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApisList().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 listApisExceptionTest() 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.listApis(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApisTest2() throws Exception { - Api responsesElement = Api.newBuilder().build(); - ListApisResponse expectedResponse = - ListApisResponse.newBuilder() - .setNextPageToken("") - .addAllApis(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListApisPagedResponse pagedListResponse = client.listApis(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApisList().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 listApisExceptionTest2() 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.listApis(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiTest() throws Exception { - Api expectedResponse = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - - Api actualResponse = client.getApi(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 getApiExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - client.getApi(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiTest2() throws Exception { - Api expectedResponse = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-3607/locations/location-3607/apis/api-3607"; - - Api actualResponse = client.getApi(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 getApiExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-3607/locations/location-3607/apis/api-3607"; - client.getApi(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiTest() throws Exception { - Api expectedResponse = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Api api = Api.newBuilder().build(); - String apiId = "apiId93021397"; - - Api actualResponse = client.createApi(parent, api, apiId); - 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 createApiExceptionTest() 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]"); - Api api = Api.newBuilder().build(); - String apiId = "apiId93021397"; - client.createApi(parent, api, apiId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiTest2() throws Exception { - Api expectedResponse = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - Api api = Api.newBuilder().build(); - String apiId = "apiId93021397"; - - Api actualResponse = client.createApi(parent, api, apiId); - 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 createApiExceptionTest2() 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"; - Api api = Api.newBuilder().build(); - String apiId = "apiId93021397"; - client.createApi(parent, api, apiId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateApiTest() throws Exception { - Api expectedResponse = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - Api api = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Api actualResponse = client.updateApi(api, 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 updateApiExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Api api = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateApi(api, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - - client.deleteApi(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 deleteApiExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - client.deleteApi(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-3607/locations/location-3607/apis/api-3607"; - - client.deleteApi(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 deleteApiExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-3607/locations/location-3607/apis/api-3607"; - client.deleteApi(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiVersionsTest() throws Exception { - ApiVersion responsesElement = ApiVersion.newBuilder().build(); - ListApiVersionsResponse expectedResponse = - ListApiVersionsResponse.newBuilder() - .setNextPageToken("") - .addAllApiVersions(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - - ListApiVersionsPagedResponse pagedListResponse = client.listApiVersions(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiVersionsList().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 listApiVersionsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - client.listApiVersions(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiVersionsTest2() throws Exception { - ApiVersion responsesElement = ApiVersion.newBuilder().build(); - ListApiVersionsResponse expectedResponse = - ListApiVersionsResponse.newBuilder() - .setNextPageToken("") - .addAllApiVersions(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; - - ListApiVersionsPagedResponse pagedListResponse = client.listApiVersions(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiVersionsList().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 listApiVersionsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; - client.listApiVersions(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiVersionTest() throws Exception { - ApiVersion expectedResponse = - ApiVersion.newBuilder() - .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - - ApiVersion actualResponse = client.getApiVersion(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 getApiVersionExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - client.getApiVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiVersionTest2() throws Exception { - ApiVersion expectedResponse = - ApiVersion.newBuilder() - .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-6412/locations/location-6412/apis/api-6412/versions/version-6412"; - - ApiVersion actualResponse = client.getApiVersion(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 getApiVersionExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-6412/locations/location-6412/apis/api-6412/versions/version-6412"; - client.getApiVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiVersionTest() throws Exception { - ApiVersion expectedResponse = - ApiVersion.newBuilder() - .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - String apiVersionId = "apiVersionId1678816025"; - - ApiVersion actualResponse = client.createApiVersion(parent, apiVersion, apiVersionId); - 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 createApiVersionExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - String apiVersionId = "apiVersionId1678816025"; - client.createApiVersion(parent, apiVersion, apiVersionId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiVersionTest2() throws Exception { - ApiVersion expectedResponse = - ApiVersion.newBuilder() - .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - String apiVersionId = "apiVersionId1678816025"; - - ApiVersion actualResponse = client.createApiVersion(parent, apiVersion, apiVersionId); - 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 createApiVersionExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - String apiVersionId = "apiVersionId1678816025"; - client.createApiVersion(parent, apiVersion, apiVersionId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateApiVersionTest() throws Exception { - ApiVersion expectedResponse = - ApiVersion.newBuilder() - .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiVersion apiVersion = - ApiVersion.newBuilder() - .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ApiVersion actualResponse = client.updateApiVersion(apiVersion, 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 updateApiVersionExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiVersion apiVersion = - ApiVersion.newBuilder() - .setName( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateApiVersion(apiVersion, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiVersionTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - - client.deleteApiVersion(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 deleteApiVersionExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - client.deleteApiVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiVersionTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-6412/locations/location-6412/apis/api-6412/versions/version-6412"; - - client.deleteApiVersion(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 deleteApiVersionExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-6412/locations/location-6412/apis/api-6412/versions/version-6412"; - client.deleteApiVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiSpecsTest() throws Exception { - ApiSpec responsesElement = ApiSpec.newBuilder().build(); - ListApiSpecsResponse expectedResponse = - ListApiSpecsResponse.newBuilder() - .setNextPageToken("") - .addAllApiSpecs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - - ListApiSpecsPagedResponse pagedListResponse = client.listApiSpecs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiSpecsList().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 listApiSpecsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - client.listApiSpecs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiSpecsTest2() throws Exception { - ApiSpec responsesElement = ApiSpec.newBuilder().build(); - ListApiSpecsResponse expectedResponse = - ListApiSpecsResponse.newBuilder() - .setNextPageToken("") - .addAllApiSpecs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = - "projects/project-1179/locations/location-1179/apis/api-1179/versions/version-1179"; - - ListApiSpecsPagedResponse pagedListResponse = client.listApiSpecs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiSpecsList().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 listApiSpecsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = - "projects/project-1179/locations/location-1179/apis/api-1179/versions/version-1179"; - client.listApiSpecs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiSpecTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - - ApiSpec actualResponse = client.getApiSpec(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 getApiSpecExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - client.getApiSpec(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiSpecTest2() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; - - ApiSpec actualResponse = client.getApiSpec(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 getApiSpecExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; - client.getApiSpec(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiSpecContentsTest() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - - HttpBody actualResponse = client.getApiSpecContents(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 getApiSpecContentsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - client.getApiSpecContents(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiSpecContentsTest2() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; - - HttpBody actualResponse = client.getApiSpecContents(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 getApiSpecContentsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; - client.getApiSpecContents(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiSpecTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - String apiSpecId = "apiSpecId-421795600"; - - ApiSpec actualResponse = client.createApiSpec(parent, apiSpec, apiSpecId); - 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 createApiSpecExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - String apiSpecId = "apiSpecId-421795600"; - client.createApiSpec(parent, apiSpec, apiSpecId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiSpecTest2() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = - "projects/project-1179/locations/location-1179/apis/api-1179/versions/version-1179"; - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - String apiSpecId = "apiSpecId-421795600"; - - ApiSpec actualResponse = client.createApiSpec(parent, apiSpec, apiSpecId); - 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 createApiSpecExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = - "projects/project-1179/locations/location-1179/apis/api-1179/versions/version-1179"; - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - String apiSpecId = "apiSpecId-421795600"; - client.createApiSpec(parent, apiSpec, apiSpecId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateApiSpecTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiSpec apiSpec = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ApiSpec actualResponse = client.updateApiSpec(apiSpec, 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 updateApiSpecExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiSpec apiSpec = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateApiSpec(apiSpec, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiSpecTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - - client.deleteApiSpec(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 deleteApiSpecExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - client.deleteApiSpec(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiSpecTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; - - client.deleteApiSpec(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 deleteApiSpecExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; - client.deleteApiSpec(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void tagApiSpecRevisionTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - TagApiSpecRevisionRequest request = - TagApiSpecRevisionRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setTag("tag114586") - .build(); - - ApiSpec actualResponse = client.tagApiSpecRevision(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 tagApiSpecRevisionExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - TagApiSpecRevisionRequest request = - TagApiSpecRevisionRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setTag("tag114586") - .build(); - client.tagApiSpecRevision(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiSpecRevisionsTest() throws Exception { - ApiSpec responsesElement = ApiSpec.newBuilder().build(); - ListApiSpecRevisionsResponse expectedResponse = - ListApiSpecRevisionsResponse.newBuilder() - .setNextPageToken("") - .addAllApiSpecs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ListApiSpecRevisionsRequest request = - ListApiSpecRevisionsRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - - ListApiSpecRevisionsPagedResponse pagedListResponse = client.listApiSpecRevisions(request); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiSpecsList().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 listApiSpecRevisionsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ListApiSpecRevisionsRequest request = - ListApiSpecRevisionsRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - client.listApiSpecRevisions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void rollbackApiSpecTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - RollbackApiSpecRequest request = - RollbackApiSpecRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setRevisionId("revisionId-1507445162") - .build(); - - ApiSpec actualResponse = client.rollbackApiSpec(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 rollbackApiSpecExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - RollbackApiSpecRequest request = - RollbackApiSpecRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setRevisionId("revisionId-1507445162") - .build(); - client.rollbackApiSpec(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiSpecRevisionTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - - ApiSpec actualResponse = client.deleteApiSpecRevision(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 deleteApiSpecRevisionExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - client.deleteApiSpecRevision(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiSpecRevisionTest2() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; - - ApiSpec actualResponse = client.deleteApiSpecRevision(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 deleteApiSpecRevisionExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-1520/locations/location-1520/apis/api-1520/versions/version-1520/specs/spec-1520"; - client.deleteApiSpecRevision(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiDeploymentsTest() throws Exception { - ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); - ListApiDeploymentsResponse expectedResponse = - ListApiDeploymentsResponse.newBuilder() - .setNextPageToken("") - .addAllApiDeployments(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - - ListApiDeploymentsPagedResponse pagedListResponse = client.listApiDeployments(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiDeploymentsList().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 listApiDeploymentsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - client.listApiDeployments(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiDeploymentsTest2() throws Exception { - ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); - ListApiDeploymentsResponse expectedResponse = - ListApiDeploymentsResponse.newBuilder() - .setNextPageToken("") - .addAllApiDeployments(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; - - ListApiDeploymentsPagedResponse pagedListResponse = client.listApiDeployments(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiDeploymentsList().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 listApiDeploymentsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; - client.listApiDeployments(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiDeploymentTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - - ApiDeployment actualResponse = client.getApiDeployment(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 getApiDeploymentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - client.getApiDeployment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiDeploymentTest2() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; - - ApiDeployment actualResponse = client.getApiDeployment(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 getApiDeploymentExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; - client.getApiDeployment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiDeploymentTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - String apiDeploymentId = "apiDeploymentId-1299472902"; - - ApiDeployment actualResponse = - client.createApiDeployment(parent, apiDeployment, apiDeploymentId); - 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 createApiDeploymentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - String apiDeploymentId = "apiDeploymentId-1299472902"; - client.createApiDeployment(parent, apiDeployment, apiDeploymentId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiDeploymentTest2() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - String apiDeploymentId = "apiDeploymentId-1299472902"; - - ApiDeployment actualResponse = - client.createApiDeployment(parent, apiDeployment, apiDeploymentId); - 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 createApiDeploymentExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-7414/locations/location-7414/apis/api-7414"; - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - String apiDeploymentId = "apiDeploymentId-1299472902"; - client.createApiDeployment(parent, apiDeployment, apiDeploymentId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateApiDeploymentTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiDeployment apiDeployment = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ApiDeployment actualResponse = client.updateApiDeployment(apiDeployment, 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 updateApiDeploymentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiDeployment apiDeployment = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateApiDeployment(apiDeployment, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiDeploymentTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - - client.deleteApiDeployment(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 deleteApiDeploymentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - client.deleteApiDeployment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiDeploymentTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; - - client.deleteApiDeployment(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 deleteApiDeploymentExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; - client.deleteApiDeployment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void tagApiDeploymentRevisionTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - TagApiDeploymentRevisionRequest request = - TagApiDeploymentRevisionRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setTag("tag114586") - .build(); - - ApiDeployment actualResponse = client.tagApiDeploymentRevision(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 tagApiDeploymentRevisionExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - TagApiDeploymentRevisionRequest request = - TagApiDeploymentRevisionRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setTag("tag114586") - .build(); - client.tagApiDeploymentRevision(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiDeploymentRevisionsTest() throws Exception { - ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); - ListApiDeploymentRevisionsResponse expectedResponse = - ListApiDeploymentRevisionsResponse.newBuilder() - .setNextPageToken("") - .addAllApiDeployments(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ListApiDeploymentRevisionsRequest request = - ListApiDeploymentRevisionsRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - - ListApiDeploymentRevisionsPagedResponse pagedListResponse = - client.listApiDeploymentRevisions(request); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiDeploymentsList().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 listApiDeploymentRevisionsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ListApiDeploymentRevisionsRequest request = - ListApiDeploymentRevisionsRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - client.listApiDeploymentRevisions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void rollbackApiDeploymentTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - RollbackApiDeploymentRequest request = - RollbackApiDeploymentRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setRevisionId("revisionId-1507445162") - .build(); - - ApiDeployment actualResponse = client.rollbackApiDeployment(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 rollbackApiDeploymentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - RollbackApiDeploymentRequest request = - RollbackApiDeploymentRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setRevisionId("revisionId-1507445162") - .build(); - client.rollbackApiDeployment(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiDeploymentRevisionTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - - ApiDeployment actualResponse = client.deleteApiDeploymentRevision(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 deleteApiDeploymentRevisionExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - client.deleteApiDeploymentRevision(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiDeploymentRevisionTest2() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; - - ApiDeployment actualResponse = client.deleteApiDeploymentRevision(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 deleteApiDeploymentRevisionExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-6163/locations/location-6163/apis/api-6163/deployments/deployment-6163"; - client.deleteApiDeploymentRevision(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ApiDeploymentName parent = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiDeploymentName parent = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - client.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest2() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - client.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest3() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ApiSpecName parent = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiSpecName parent = - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - client.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest4() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - client.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest5() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest5() 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.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest6() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().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 listArtifactsExceptionTest6() 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.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getArtifactTest() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - - Artifact actualResponse = client.getArtifact(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 getArtifactExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - client.getArtifact(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getArtifactTest2() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; - - Artifact actualResponse = client.getArtifact(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 getArtifactExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; - client.getArtifact(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getArtifactContentsTest() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - - HttpBody actualResponse = client.getArtifactContents(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 getArtifactContentsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - client.getArtifactContents(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getArtifactContentsTest2() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; - - HttpBody actualResponse = client.getArtifactContents(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 getArtifactContentsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; - client.getArtifactContents(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - ApiDeploymentName parent = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - 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 createArtifactExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiDeploymentName parent = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest2() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - 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 createArtifactExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest3() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - ApiSpecName parent = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - 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 createArtifactExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiSpecName parent = - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest4() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - 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 createArtifactExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest5() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - 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 createArtifactExceptionTest5() 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]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest6() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - 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 createArtifactExceptionTest6() 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"; - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void replaceArtifactTest() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - Artifact artifact = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - - Artifact actualResponse = client.replaceArtifact(artifact); - 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 replaceArtifactExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Artifact artifact = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName( - "[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - client.replaceArtifact(artifact); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteArtifactTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - - client.deleteArtifact(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 deleteArtifactExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - client.deleteArtifact(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteArtifactTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; - - client.deleteArtifact(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 deleteArtifactExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-1719/locations/location-1719/artifacts/artifact-1719"; - client.deleteArtifact(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @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. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(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 setIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(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 getIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(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 testIamPermissionsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientTest.java b/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientTest.java deleted file mode 100644 index f03663ff94b9..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/google-cloud-apigee-registry/src/test/java/com/google/cloud/apigeeregistry/v1/RegistryClientTest.java +++ /dev/null @@ -1,3618 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1; - -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiDeploymentsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecRevisionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiSpecsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApiVersionsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListApisPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListArtifactsPagedResponse; -import static com.google.cloud.apigeeregistry.v1.RegistryClient.ListLocationsPagedResponse; - -import com.google.api.HttpBody; -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.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.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -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 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 RegistryClientTest { - private static MockIAMPolicy mockIAMPolicy; - private static MockLocations mockLocations; - private static MockRegistry mockRegistry; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private RegistryClient client; - - @BeforeClass - public static void startStaticServer() { - mockRegistry = new MockRegistry(); - mockLocations = new MockLocations(); - mockIAMPolicy = new MockIAMPolicy(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockRegistry, mockLocations, mockIAMPolicy)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - RegistrySettings settings = - RegistrySettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = RegistryClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listApisTest() throws Exception { - Api responsesElement = Api.newBuilder().build(); - ListApisResponse expectedResponse = - ListApisResponse.newBuilder() - .setNextPageToken("") - .addAllApis(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListApisPagedResponse pagedListResponse = client.listApis(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApisList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListApisRequest actualRequest = ((ListApisRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listApisExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listApis(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApisTest2() throws Exception { - Api responsesElement = Api.newBuilder().build(); - ListApisResponse expectedResponse = - ListApisResponse.newBuilder() - .setNextPageToken("") - .addAllApis(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListApisPagedResponse pagedListResponse = client.listApis(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApisList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListApisRequest actualRequest = ((ListApisRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listApisExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String parent = "parent-995424086"; - client.listApis(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiTest() throws Exception { - Api expectedResponse = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - - Api actualResponse = client.getApi(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetApiRequest actualRequest = ((GetApiRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getApiExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - client.getApi(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiTest2() throws Exception { - Api expectedResponse = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - Api actualResponse = client.getApi(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetApiRequest actualRequest = ((GetApiRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getApiExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.getApi(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiTest() throws Exception { - Api expectedResponse = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Api api = Api.newBuilder().build(); - String apiId = "apiId93021397"; - - Api actualResponse = client.createApi(parent, api, apiId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateApiRequest actualRequest = ((CreateApiRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(api, actualRequest.getApi()); - Assert.assertEquals(apiId, actualRequest.getApiId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createApiExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Api api = Api.newBuilder().build(); - String apiId = "apiId93021397"; - client.createApi(parent, api, apiId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiTest2() throws Exception { - Api expectedResponse = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Api api = Api.newBuilder().build(); - String apiId = "apiId93021397"; - - Api actualResponse = client.createApi(parent, api, apiId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateApiRequest actualRequest = ((CreateApiRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(api, actualRequest.getApi()); - Assert.assertEquals(apiId, actualRequest.getApiId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createApiExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String parent = "parent-995424086"; - Api api = Api.newBuilder().build(); - String apiId = "apiId93021397"; - client.createApi(parent, api, apiId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateApiTest() throws Exception { - Api expectedResponse = - Api.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setAvailability("availability1997542747") - .setRecommendedVersion( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setRecommendedDeployment( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - Api api = Api.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Api actualResponse = client.updateApi(api, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateApiRequest actualRequest = ((UpdateApiRequest) actualRequests.get(0)); - - Assert.assertEquals(api, actualRequest.getApi()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateApiExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - Api api = Api.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateApi(api, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockRegistry.addResponse(expectedResponse); - - ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - - client.deleteApi(name); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiRequest actualRequest = ((DeleteApiRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - client.deleteApi(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteApi(name); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiRequest actualRequest = ((DeleteApiRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.deleteApi(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiVersionsTest() throws Exception { - ApiVersion responsesElement = ApiVersion.newBuilder().build(); - ListApiVersionsResponse expectedResponse = - ListApiVersionsResponse.newBuilder() - .setNextPageToken("") - .addAllApiVersions(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - - ListApiVersionsPagedResponse pagedListResponse = client.listApiVersions(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiVersionsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListApiVersionsRequest actualRequest = ((ListApiVersionsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listApiVersionsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - client.listApiVersions(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiVersionsTest2() throws Exception { - ApiVersion responsesElement = ApiVersion.newBuilder().build(); - ListApiVersionsResponse expectedResponse = - ListApiVersionsResponse.newBuilder() - .setNextPageToken("") - .addAllApiVersions(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListApiVersionsPagedResponse pagedListResponse = client.listApiVersions(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiVersionsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListApiVersionsRequest actualRequest = ((ListApiVersionsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listApiVersionsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String parent = "parent-995424086"; - client.listApiVersions(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiVersionTest() throws Exception { - ApiVersion expectedResponse = - ApiVersion.newBuilder() - .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - - ApiVersion actualResponse = client.getApiVersion(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetApiVersionRequest actualRequest = ((GetApiVersionRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getApiVersionExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - client.getApiVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiVersionTest2() throws Exception { - ApiVersion expectedResponse = - ApiVersion.newBuilder() - .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - ApiVersion actualResponse = client.getApiVersion(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetApiVersionRequest actualRequest = ((GetApiVersionRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getApiVersionExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.getApiVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiVersionTest() throws Exception { - ApiVersion expectedResponse = - ApiVersion.newBuilder() - .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - String apiVersionId = "apiVersionId1678816025"; - - ApiVersion actualResponse = client.createApiVersion(parent, apiVersion, apiVersionId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateApiVersionRequest actualRequest = ((CreateApiVersionRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(apiVersion, actualRequest.getApiVersion()); - Assert.assertEquals(apiVersionId, actualRequest.getApiVersionId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createApiVersionExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - String apiVersionId = "apiVersionId1678816025"; - client.createApiVersion(parent, apiVersion, apiVersionId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiVersionTest2() throws Exception { - ApiVersion expectedResponse = - ApiVersion.newBuilder() - .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String parent = "parent-995424086"; - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - String apiVersionId = "apiVersionId1678816025"; - - ApiVersion actualResponse = client.createApiVersion(parent, apiVersion, apiVersionId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateApiVersionRequest actualRequest = ((CreateApiVersionRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(apiVersion, actualRequest.getApiVersion()); - Assert.assertEquals(apiVersionId, actualRequest.getApiVersionId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createApiVersionExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String parent = "parent-995424086"; - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - String apiVersionId = "apiVersionId1678816025"; - client.createApiVersion(parent, apiVersion, apiVersionId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateApiVersionTest() throws Exception { - ApiVersion expectedResponse = - ApiVersion.newBuilder() - .setName(ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setState("state109757585") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ApiVersion actualResponse = client.updateApiVersion(apiVersion, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateApiVersionRequest actualRequest = ((UpdateApiVersionRequest) actualRequests.get(0)); - - Assert.assertEquals(apiVersion, actualRequest.getApiVersion()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateApiVersionExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateApiVersion(apiVersion, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiVersionTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockRegistry.addResponse(expectedResponse); - - ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - - client.deleteApiVersion(name); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiVersionRequest actualRequest = ((DeleteApiVersionRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiVersionExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - client.deleteApiVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiVersionTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteApiVersion(name); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiVersionRequest actualRequest = ((DeleteApiVersionRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiVersionExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.deleteApiVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiSpecsTest() throws Exception { - ApiSpec responsesElement = ApiSpec.newBuilder().build(); - ListApiSpecsResponse expectedResponse = - ListApiSpecsResponse.newBuilder() - .setNextPageToken("") - .addAllApiSpecs(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - - ListApiSpecsPagedResponse pagedListResponse = client.listApiSpecs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiSpecsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListApiSpecsRequest actualRequest = ((ListApiSpecsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listApiSpecsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - client.listApiSpecs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiSpecsTest2() throws Exception { - ApiSpec responsesElement = ApiSpec.newBuilder().build(); - ListApiSpecsResponse expectedResponse = - ListApiSpecsResponse.newBuilder() - .setNextPageToken("") - .addAllApiSpecs(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListApiSpecsPagedResponse pagedListResponse = client.listApiSpecs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiSpecsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListApiSpecsRequest actualRequest = ((ListApiSpecsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listApiSpecsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String parent = "parent-995424086"; - client.listApiSpecs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiSpecTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - - ApiSpec actualResponse = client.getApiSpec(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetApiSpecRequest actualRequest = ((GetApiSpecRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getApiSpecExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - client.getApiSpec(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiSpecTest2() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - ApiSpec actualResponse = client.getApiSpec(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetApiSpecRequest actualRequest = ((GetApiSpecRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getApiSpecExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.getApiSpec(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiSpecContentsTest() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - - HttpBody actualResponse = client.getApiSpecContents(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetApiSpecContentsRequest actualRequest = ((GetApiSpecContentsRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getApiSpecContentsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - client.getApiSpecContents(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiSpecContentsTest2() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - HttpBody actualResponse = client.getApiSpecContents(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetApiSpecContentsRequest actualRequest = ((GetApiSpecContentsRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getApiSpecContentsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.getApiSpecContents(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiSpecTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - String apiSpecId = "apiSpecId-421795600"; - - ApiSpec actualResponse = client.createApiSpec(parent, apiSpec, apiSpecId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateApiSpecRequest actualRequest = ((CreateApiSpecRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(apiSpec, actualRequest.getApiSpec()); - Assert.assertEquals(apiSpecId, actualRequest.getApiSpecId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createApiSpecExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - String apiSpecId = "apiSpecId-421795600"; - client.createApiSpec(parent, apiSpec, apiSpecId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiSpecTest2() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String parent = "parent-995424086"; - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - String apiSpecId = "apiSpecId-421795600"; - - ApiSpec actualResponse = client.createApiSpec(parent, apiSpec, apiSpecId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateApiSpecRequest actualRequest = ((CreateApiSpecRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(apiSpec, actualRequest.getApiSpec()); - Assert.assertEquals(apiSpecId, actualRequest.getApiSpecId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createApiSpecExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String parent = "parent-995424086"; - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - String apiSpecId = "apiSpecId-421795600"; - client.createApiSpec(parent, apiSpec, apiSpecId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateApiSpecTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ApiSpec actualResponse = client.updateApiSpec(apiSpec, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateApiSpecRequest actualRequest = ((UpdateApiSpecRequest) actualRequests.get(0)); - - Assert.assertEquals(apiSpec, actualRequest.getApiSpec()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateApiSpecExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateApiSpec(apiSpec, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiSpecTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockRegistry.addResponse(expectedResponse); - - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - - client.deleteApiSpec(name); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiSpecRequest actualRequest = ((DeleteApiSpecRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiSpecExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - client.deleteApiSpec(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiSpecTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteApiSpec(name); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiSpecRequest actualRequest = ((DeleteApiSpecRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiSpecExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.deleteApiSpec(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void tagApiSpecRevisionTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - TagApiSpecRevisionRequest request = - TagApiSpecRevisionRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setTag("tag114586") - .build(); - - ApiSpec actualResponse = client.tagApiSpecRevision(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - TagApiSpecRevisionRequest actualRequest = ((TagApiSpecRevisionRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getTag(), actualRequest.getTag()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void tagApiSpecRevisionExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - TagApiSpecRevisionRequest request = - TagApiSpecRevisionRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setTag("tag114586") - .build(); - client.tagApiSpecRevision(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiSpecRevisionsTest() throws Exception { - ApiSpec responsesElement = ApiSpec.newBuilder().build(); - ListApiSpecRevisionsResponse expectedResponse = - ListApiSpecRevisionsResponse.newBuilder() - .setNextPageToken("") - .addAllApiSpecs(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - ListApiSpecRevisionsRequest request = - ListApiSpecRevisionsRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - - ListApiSpecRevisionsPagedResponse pagedListResponse = client.listApiSpecRevisions(request); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiSpecsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListApiSpecRevisionsRequest actualRequest = - ((ListApiSpecRevisionsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); - Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listApiSpecRevisionsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ListApiSpecRevisionsRequest request = - ListApiSpecRevisionsRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - client.listApiSpecRevisions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void rollbackApiSpecTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - RollbackApiSpecRequest request = - RollbackApiSpecRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setRevisionId("revisionId-1507445162") - .build(); - - ApiSpec actualResponse = client.rollbackApiSpec(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RollbackApiSpecRequest actualRequest = ((RollbackApiSpecRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getRevisionId(), actualRequest.getRevisionId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void rollbackApiSpecExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - RollbackApiSpecRequest request = - RollbackApiSpecRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setRevisionId("revisionId-1507445162") - .build(); - client.rollbackApiSpec(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiSpecRevisionTest() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - - ApiSpec actualResponse = client.deleteApiSpecRevision(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiSpecRevisionRequest actualRequest = - ((DeleteApiSpecRevisionRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiSpecRevisionExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - client.deleteApiSpecRevision(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiSpecRevisionTest2() throws Exception { - ApiSpec expectedResponse = - ApiSpec.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setFilename("filename-734768633") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setSourceUri("sourceUri-1698419887") - .setContents(ByteString.EMPTY) - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - ApiSpec actualResponse = client.deleteApiSpecRevision(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiSpecRevisionRequest actualRequest = - ((DeleteApiSpecRevisionRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiSpecRevisionExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.deleteApiSpecRevision(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiDeploymentsTest() throws Exception { - ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); - ListApiDeploymentsResponse expectedResponse = - ListApiDeploymentsResponse.newBuilder() - .setNextPageToken("") - .addAllApiDeployments(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - - ListApiDeploymentsPagedResponse pagedListResponse = client.listApiDeployments(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiDeploymentsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListApiDeploymentsRequest actualRequest = ((ListApiDeploymentsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listApiDeploymentsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - client.listApiDeployments(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiDeploymentsTest2() throws Exception { - ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); - ListApiDeploymentsResponse expectedResponse = - ListApiDeploymentsResponse.newBuilder() - .setNextPageToken("") - .addAllApiDeployments(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListApiDeploymentsPagedResponse pagedListResponse = client.listApiDeployments(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiDeploymentsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListApiDeploymentsRequest actualRequest = ((ListApiDeploymentsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listApiDeploymentsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String parent = "parent-995424086"; - client.listApiDeployments(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiDeploymentTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - - ApiDeployment actualResponse = client.getApiDeployment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetApiDeploymentRequest actualRequest = ((GetApiDeploymentRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getApiDeploymentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - client.getApiDeployment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getApiDeploymentTest2() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - ApiDeployment actualResponse = client.getApiDeployment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetApiDeploymentRequest actualRequest = ((GetApiDeploymentRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getApiDeploymentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.getApiDeployment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiDeploymentTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - String apiDeploymentId = "apiDeploymentId-1299472902"; - - ApiDeployment actualResponse = - client.createApiDeployment(parent, apiDeployment, apiDeploymentId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateApiDeploymentRequest actualRequest = ((CreateApiDeploymentRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(apiDeployment, actualRequest.getApiDeployment()); - Assert.assertEquals(apiDeploymentId, actualRequest.getApiDeploymentId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createApiDeploymentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - String apiDeploymentId = "apiDeploymentId-1299472902"; - client.createApiDeployment(parent, apiDeployment, apiDeploymentId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createApiDeploymentTest2() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String parent = "parent-995424086"; - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - String apiDeploymentId = "apiDeploymentId-1299472902"; - - ApiDeployment actualResponse = - client.createApiDeployment(parent, apiDeployment, apiDeploymentId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateApiDeploymentRequest actualRequest = ((CreateApiDeploymentRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(apiDeployment, actualRequest.getApiDeployment()); - Assert.assertEquals(apiDeploymentId, actualRequest.getApiDeploymentId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createApiDeploymentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String parent = "parent-995424086"; - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - String apiDeploymentId = "apiDeploymentId-1299472902"; - client.createApiDeployment(parent, apiDeployment, apiDeploymentId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateApiDeploymentTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ApiDeployment actualResponse = client.updateApiDeployment(apiDeployment, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateApiDeploymentRequest actualRequest = ((UpdateApiDeploymentRequest) actualRequests.get(0)); - - Assert.assertEquals(apiDeployment, actualRequest.getApiDeployment()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateApiDeploymentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateApiDeployment(apiDeployment, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiDeploymentTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockRegistry.addResponse(expectedResponse); - - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - - client.deleteApiDeployment(name); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiDeploymentRequest actualRequest = ((DeleteApiDeploymentRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiDeploymentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - client.deleteApiDeployment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiDeploymentTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteApiDeployment(name); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiDeploymentRequest actualRequest = ((DeleteApiDeploymentRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiDeploymentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.deleteApiDeployment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void tagApiDeploymentRevisionTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - TagApiDeploymentRevisionRequest request = - TagApiDeploymentRevisionRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setTag("tag114586") - .build(); - - ApiDeployment actualResponse = client.tagApiDeploymentRevision(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - TagApiDeploymentRevisionRequest actualRequest = - ((TagApiDeploymentRevisionRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getTag(), actualRequest.getTag()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void tagApiDeploymentRevisionExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - TagApiDeploymentRevisionRequest request = - TagApiDeploymentRevisionRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setTag("tag114586") - .build(); - client.tagApiDeploymentRevision(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listApiDeploymentRevisionsTest() throws Exception { - ApiDeployment responsesElement = ApiDeployment.newBuilder().build(); - ListApiDeploymentRevisionsResponse expectedResponse = - ListApiDeploymentRevisionsResponse.newBuilder() - .setNextPageToken("") - .addAllApiDeployments(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - ListApiDeploymentRevisionsRequest request = - ListApiDeploymentRevisionsRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - - ListApiDeploymentRevisionsPagedResponse pagedListResponse = - client.listApiDeploymentRevisions(request); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getApiDeploymentsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListApiDeploymentRevisionsRequest actualRequest = - ((ListApiDeploymentRevisionsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); - Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listApiDeploymentRevisionsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ListApiDeploymentRevisionsRequest request = - ListApiDeploymentRevisionsRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - client.listApiDeploymentRevisions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void rollbackApiDeploymentTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - RollbackApiDeploymentRequest request = - RollbackApiDeploymentRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setRevisionId("revisionId-1507445162") - .build(); - - ApiDeployment actualResponse = client.rollbackApiDeployment(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RollbackApiDeploymentRequest actualRequest = - ((RollbackApiDeploymentRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getRevisionId(), actualRequest.getRevisionId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void rollbackApiDeploymentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - RollbackApiDeploymentRequest request = - RollbackApiDeploymentRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setRevisionId("revisionId-1507445162") - .build(); - client.rollbackApiDeployment(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiDeploymentRevisionTest() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - - ApiDeployment actualResponse = client.deleteApiDeploymentRevision(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiDeploymentRevisionRequest actualRequest = - ((DeleteApiDeploymentRevisionRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiDeploymentRevisionExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - client.deleteApiDeploymentRevision(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteApiDeploymentRevisionTest2() throws Exception { - ApiDeployment expectedResponse = - ApiDeployment.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .setRevisionUpdateTime(Timestamp.newBuilder().build()) - .setApiSpecRevision( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setEndpointUri("endpointUri-1135817833") - .setExternalChannelUri("externalChannelUri-697349228") - .setIntendedAudience("intendedAudience-1800551601") - .setAccessGuidance("accessGuidance-1763286820") - .putAllLabels(new HashMap()) - .putAllAnnotations(new HashMap()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - ApiDeployment actualResponse = client.deleteApiDeploymentRevision(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApiDeploymentRevisionRequest actualRequest = - ((DeleteApiDeploymentRevisionRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteApiDeploymentRevisionExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.deleteApiDeploymentRevision(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiDeploymentName parent = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listArtifactsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiDeploymentName parent = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - client.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest2() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listArtifactsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - client.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest3() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiSpecName parent = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listArtifactsExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiSpecName parent = - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - client.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest4() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listArtifactsExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - client.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest5() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listArtifactsExceptionTest5() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listArtifactsTest6() throws Exception { - Artifact responsesElement = Artifact.newBuilder().build(); - ListArtifactsResponse expectedResponse = - ListArtifactsResponse.newBuilder() - .setNextPageToken("") - .addAllArtifacts(Arrays.asList(responsesElement)) - .build(); - mockRegistry.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListArtifactsPagedResponse pagedListResponse = client.listArtifacts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getArtifactsList().get(0), resources.get(0)); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListArtifactsRequest actualRequest = ((ListArtifactsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listArtifactsExceptionTest6() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String parent = "parent-995424086"; - client.listArtifacts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getArtifactTest() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockRegistry.addResponse(expectedResponse); - - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - - Artifact actualResponse = client.getArtifact(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetArtifactRequest actualRequest = ((GetArtifactRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getArtifactExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - client.getArtifact(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getArtifactTest2() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - Artifact actualResponse = client.getArtifact(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetArtifactRequest actualRequest = ((GetArtifactRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getArtifactExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.getArtifact(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getArtifactContentsTest() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockRegistry.addResponse(expectedResponse); - - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - - HttpBody actualResponse = client.getArtifactContents(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetArtifactContentsRequest actualRequest = ((GetArtifactContentsRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getArtifactContentsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - client.getArtifactContents(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getArtifactContentsTest2() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - HttpBody actualResponse = client.getArtifactContents(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetArtifactContentsRequest actualRequest = ((GetArtifactContentsRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getArtifactContentsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.getArtifactContents(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiDeploymentName parent = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(artifact, actualRequest.getArtifact()); - Assert.assertEquals(artifactId, actualRequest.getArtifactId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createArtifactExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiDeploymentName parent = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest2() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(artifact, actualRequest.getArtifact()); - Assert.assertEquals(artifactId, actualRequest.getArtifactId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createArtifactExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest3() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiSpecName parent = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(artifact, actualRequest.getArtifact()); - Assert.assertEquals(artifactId, actualRequest.getArtifactId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createArtifactExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiSpecName parent = - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest4() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockRegistry.addResponse(expectedResponse); - - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(artifact, actualRequest.getArtifact()); - Assert.assertEquals(artifactId, actualRequest.getArtifactId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createArtifactExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest5() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockRegistry.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(artifact, actualRequest.getArtifact()); - Assert.assertEquals(artifactId, actualRequest.getArtifactId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createArtifactExceptionTest5() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createArtifactTest6() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockRegistry.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - - Artifact actualResponse = client.createArtifact(parent, artifact, artifactId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateArtifactRequest actualRequest = ((CreateArtifactRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(artifact, actualRequest.getArtifact()); - Assert.assertEquals(artifactId, actualRequest.getArtifactId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createArtifactExceptionTest6() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String parent = "parent-995424086"; - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - client.createArtifact(parent, artifact, artifactId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void replaceArtifactTest() throws Exception { - Artifact expectedResponse = - Artifact.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMimeType("mimeType-1392120434") - .setSizeBytes(-1796325715) - .setHash("hash3195150") - .setContents(ByteString.EMPTY) - .build(); - mockRegistry.addResponse(expectedResponse); - - Artifact artifact = Artifact.newBuilder().build(); - - Artifact actualResponse = client.replaceArtifact(artifact); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ReplaceArtifactRequest actualRequest = ((ReplaceArtifactRequest) actualRequests.get(0)); - - Assert.assertEquals(artifact, actualRequest.getArtifact()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void replaceArtifactExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - Artifact artifact = Artifact.newBuilder().build(); - client.replaceArtifact(artifact); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteArtifactTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockRegistry.addResponse(expectedResponse); - - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - - client.deleteArtifact(name); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteArtifactRequest actualRequest = ((DeleteArtifactRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteArtifactExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - client.deleteArtifact(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteArtifactTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockRegistry.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteArtifact(name); - - List actualRequests = mockRegistry.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteArtifactRequest actualRequest = ((DeleteArtifactRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteArtifactExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockRegistry.addException(exception); - - try { - String name = "name3373707"; - client.deleteArtifact(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @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. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockIAMPolicy.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); - Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockIAMPolicy.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockIAMPolicy.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void testIamPermissionsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningGrpc.java b/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningGrpc.java deleted file mode 100644 index ba2124b2235a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningGrpc.java +++ /dev/null @@ -1,480 +0,0 @@ -package com.google.cloud.apigeeregistry.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * The service that is used for managing the data plane provisioning of the
- * Registry.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/apigeeregistry/v1/provisioning_service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ProvisioningGrpc { - - private ProvisioningGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.apigeeregistry.v1.Provisioning"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getCreateInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateInstance", - requestType = com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateInstanceMethod() { - io.grpc.MethodDescriptor getCreateInstanceMethod; - if ((getCreateInstanceMethod = ProvisioningGrpc.getCreateInstanceMethod) == null) { - synchronized (ProvisioningGrpc.class) { - if ((getCreateInstanceMethod = ProvisioningGrpc.getCreateInstanceMethod) == null) { - ProvisioningGrpc.getCreateInstanceMethod = getCreateInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ProvisioningMethodDescriptorSupplier("CreateInstance")) - .build(); - } - } - } - return getCreateInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteInstance", - requestType = com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteInstanceMethod() { - io.grpc.MethodDescriptor getDeleteInstanceMethod; - if ((getDeleteInstanceMethod = ProvisioningGrpc.getDeleteInstanceMethod) == null) { - synchronized (ProvisioningGrpc.class) { - if ((getDeleteInstanceMethod = ProvisioningGrpc.getDeleteInstanceMethod) == null) { - ProvisioningGrpc.getDeleteInstanceMethod = getDeleteInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ProvisioningMethodDescriptorSupplier("DeleteInstance")) - .build(); - } - } - } - return getDeleteInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetInstance", - requestType = com.google.cloud.apigeeregistry.v1.GetInstanceRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.Instance.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetInstanceMethod() { - io.grpc.MethodDescriptor getGetInstanceMethod; - if ((getGetInstanceMethod = ProvisioningGrpc.getGetInstanceMethod) == null) { - synchronized (ProvisioningGrpc.class) { - if ((getGetInstanceMethod = ProvisioningGrpc.getGetInstanceMethod) == null) { - ProvisioningGrpc.getGetInstanceMethod = getGetInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.GetInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance())) - .setSchemaDescriptor(new ProvisioningMethodDescriptorSupplier("GetInstance")) - .build(); - } - } - } - return getGetInstanceMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ProvisioningStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProvisioningStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProvisioningStub(channel, callOptions); - } - }; - return ProvisioningStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ProvisioningBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProvisioningBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProvisioningBlockingStub(channel, callOptions); - } - }; - return ProvisioningBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ProvisioningFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProvisioningFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProvisioningFutureStub(channel, callOptions); - } - }; - return ProvisioningFutureStub.newStub(factory, channel); - } - - /** - *
-   * The service that is used for managing the data plane provisioning of the
-   * Registry.
-   * 
- */ - public static abstract class ProvisioningImplBase implements io.grpc.BindableService { - - /** - *
-     * Provisions instance resources for the Registry.
-     * 
- */ - public void createInstance(com.google.cloud.apigeeregistry.v1.CreateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateInstanceMethod(), responseObserver); - } - - /** - *
-     * Deletes the Registry instance.
-     * 
- */ - public void deleteInstance(com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteInstanceMethod(), responseObserver); - } - - /** - *
-     * Gets details of a single Instance.
-     * 
- */ - public void getInstance(com.google.cloud.apigeeregistry.v1.GetInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstanceMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.CreateInstanceRequest, - com.google.longrunning.Operation>( - this, METHODID_CREATE_INSTANCE))) - .addMethod( - getDeleteInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest, - com.google.longrunning.Operation>( - this, METHODID_DELETE_INSTANCE))) - .addMethod( - getGetInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.GetInstanceRequest, - com.google.cloud.apigeeregistry.v1.Instance>( - this, METHODID_GET_INSTANCE))) - .build(); - } - } - - /** - *
-   * The service that is used for managing the data plane provisioning of the
-   * Registry.
-   * 
- */ - public static final class ProvisioningStub extends io.grpc.stub.AbstractAsyncStub { - private ProvisioningStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProvisioningStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProvisioningStub(channel, callOptions); - } - - /** - *
-     * Provisions instance resources for the Registry.
-     * 
- */ - public void createInstance(com.google.cloud.apigeeregistry.v1.CreateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes the Registry instance.
-     * 
- */ - public void deleteInstance(com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets details of a single Instance.
-     * 
- */ - public void getInstance(com.google.cloud.apigeeregistry.v1.GetInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * The service that is used for managing the data plane provisioning of the
-   * Registry.
-   * 
- */ - public static final class ProvisioningBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ProvisioningBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProvisioningBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProvisioningBlockingStub(channel, callOptions); - } - - /** - *
-     * Provisions instance resources for the Registry.
-     * 
- */ - public com.google.longrunning.Operation createInstance(com.google.cloud.apigeeregistry.v1.CreateInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes the Registry instance.
-     * 
- */ - public com.google.longrunning.Operation deleteInstance(com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets details of a single Instance.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.Instance getInstance(com.google.cloud.apigeeregistry.v1.GetInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetInstanceMethod(), getCallOptions(), request); - } - } - - /** - *
-   * The service that is used for managing the data plane provisioning of the
-   * Registry.
-   * 
- */ - public static final class ProvisioningFutureStub extends io.grpc.stub.AbstractFutureStub { - private ProvisioningFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProvisioningFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProvisioningFutureStub(channel, callOptions); - } - - /** - *
-     * Provisions instance resources for the Registry.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createInstance( - com.google.cloud.apigeeregistry.v1.CreateInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes the Registry instance.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteInstance( - com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets details of a single Instance.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getInstance( - com.google.cloud.apigeeregistry.v1.GetInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_INSTANCE = 0; - private static final int METHODID_DELETE_INSTANCE = 1; - private static final int METHODID_GET_INSTANCE = 2; - - 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 ProvisioningImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ProvisioningImplBase 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_CREATE_INSTANCE: - serviceImpl.createInstance((com.google.cloud.apigeeregistry.v1.CreateInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_INSTANCE: - serviceImpl.deleteInstance((com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_INSTANCE: - serviceImpl.getInstance((com.google.cloud.apigeeregistry.v1.GetInstanceRequest) 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(); - } - } - } - - private static abstract class ProvisioningBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ProvisioningBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Provisioning"); - } - } - - private static final class ProvisioningFileDescriptorSupplier - extends ProvisioningBaseDescriptorSupplier { - ProvisioningFileDescriptorSupplier() {} - } - - private static final class ProvisioningMethodDescriptorSupplier - extends ProvisioningBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ProvisioningMethodDescriptorSupplier(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 (ProvisioningGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ProvisioningFileDescriptorSupplier()) - .addMethod(getCreateInstanceMethod()) - .addMethod(getDeleteInstanceMethod()) - .addMethod(getGetInstanceMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryGrpc.java b/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryGrpc.java deleted file mode 100644 index c8ce679258f8..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/grpc-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RegistryGrpc.java +++ /dev/null @@ -1,3287 +0,0 @@ -package com.google.cloud.apigeeregistry.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * The Registry service allows teams to manage descriptions of APIs.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/apigeeregistry/v1/registry_service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class RegistryGrpc { - - private RegistryGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.apigeeregistry.v1.Registry"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getListApisMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListApis", - requestType = com.google.cloud.apigeeregistry.v1.ListApisRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ListApisResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListApisMethod() { - io.grpc.MethodDescriptor getListApisMethod; - if ((getListApisMethod = RegistryGrpc.getListApisMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getListApisMethod = RegistryGrpc.getListApisMethod) == null) { - RegistryGrpc.getListApisMethod = getListApisMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApis")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApisRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApisResponse.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApis")) - .build(); - } - } - } - return getListApisMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetApiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetApi", - requestType = com.google.cloud.apigeeregistry.v1.GetApiRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.Api.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetApiMethod() { - io.grpc.MethodDescriptor getGetApiMethod; - if ((getGetApiMethod = RegistryGrpc.getGetApiMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getGetApiMethod = RegistryGrpc.getGetApiMethod) == null) { - RegistryGrpc.getGetApiMethod = getGetApiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.GetApiRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetApi")) - .build(); - } - } - } - return getGetApiMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateApiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateApi", - requestType = com.google.cloud.apigeeregistry.v1.CreateApiRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.Api.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateApiMethod() { - io.grpc.MethodDescriptor getCreateApiMethod; - if ((getCreateApiMethod = RegistryGrpc.getCreateApiMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getCreateApiMethod = RegistryGrpc.getCreateApiMethod) == null) { - RegistryGrpc.getCreateApiMethod = getCreateApiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.CreateApiRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("CreateApi")) - .build(); - } - } - } - return getCreateApiMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateApiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateApi", - requestType = com.google.cloud.apigeeregistry.v1.UpdateApiRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.Api.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateApiMethod() { - io.grpc.MethodDescriptor getUpdateApiMethod; - if ((getUpdateApiMethod = RegistryGrpc.getUpdateApiMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getUpdateApiMethod = RegistryGrpc.getUpdateApiMethod) == null) { - RegistryGrpc.getUpdateApiMethod = getUpdateApiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateApi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.UpdateApiRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("UpdateApi")) - .build(); - } - } - } - return getUpdateApiMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteApiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteApi", - requestType = com.google.cloud.apigeeregistry.v1.DeleteApiRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteApiMethod() { - io.grpc.MethodDescriptor getDeleteApiMethod; - if ((getDeleteApiMethod = RegistryGrpc.getDeleteApiMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getDeleteApiMethod = RegistryGrpc.getDeleteApiMethod) == null) { - RegistryGrpc.getDeleteApiMethod = getDeleteApiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.DeleteApiRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApi")) - .build(); - } - } - } - return getDeleteApiMethod; - } - - private static volatile io.grpc.MethodDescriptor getListApiVersionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListApiVersions", - requestType = com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListApiVersionsMethod() { - io.grpc.MethodDescriptor getListApiVersionsMethod; - if ((getListApiVersionsMethod = RegistryGrpc.getListApiVersionsMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getListApiVersionsMethod = RegistryGrpc.getListApiVersionsMethod) == null) { - RegistryGrpc.getListApiVersionsMethod = getListApiVersionsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApiVersions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApiVersions")) - .build(); - } - } - } - return getListApiVersionsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetApiVersionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetApiVersion", - requestType = com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiVersion.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetApiVersionMethod() { - io.grpc.MethodDescriptor getGetApiVersionMethod; - if ((getGetApiVersionMethod = RegistryGrpc.getGetApiVersionMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getGetApiVersionMethod = RegistryGrpc.getGetApiVersionMethod) == null) { - RegistryGrpc.getGetApiVersionMethod = getGetApiVersionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApiVersion")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetApiVersion")) - .build(); - } - } - } - return getGetApiVersionMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateApiVersionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateApiVersion", - requestType = com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiVersion.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateApiVersionMethod() { - io.grpc.MethodDescriptor getCreateApiVersionMethod; - if ((getCreateApiVersionMethod = RegistryGrpc.getCreateApiVersionMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getCreateApiVersionMethod = RegistryGrpc.getCreateApiVersionMethod) == null) { - RegistryGrpc.getCreateApiVersionMethod = getCreateApiVersionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApiVersion")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("CreateApiVersion")) - .build(); - } - } - } - return getCreateApiVersionMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateApiVersionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateApiVersion", - requestType = com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiVersion.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateApiVersionMethod() { - io.grpc.MethodDescriptor getUpdateApiVersionMethod; - if ((getUpdateApiVersionMethod = RegistryGrpc.getUpdateApiVersionMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getUpdateApiVersionMethod = RegistryGrpc.getUpdateApiVersionMethod) == null) { - RegistryGrpc.getUpdateApiVersionMethod = getUpdateApiVersionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateApiVersion")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("UpdateApiVersion")) - .build(); - } - } - } - return getUpdateApiVersionMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteApiVersionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteApiVersion", - requestType = com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteApiVersionMethod() { - io.grpc.MethodDescriptor getDeleteApiVersionMethod; - if ((getDeleteApiVersionMethod = RegistryGrpc.getDeleteApiVersionMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getDeleteApiVersionMethod = RegistryGrpc.getDeleteApiVersionMethod) == null) { - RegistryGrpc.getDeleteApiVersionMethod = getDeleteApiVersionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApiVersion")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApiVersion")) - .build(); - } - } - } - return getDeleteApiVersionMethod; - } - - private static volatile io.grpc.MethodDescriptor getListApiSpecsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListApiSpecs", - requestType = com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListApiSpecsMethod() { - io.grpc.MethodDescriptor getListApiSpecsMethod; - if ((getListApiSpecsMethod = RegistryGrpc.getListApiSpecsMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getListApiSpecsMethod = RegistryGrpc.getListApiSpecsMethod) == null) { - RegistryGrpc.getListApiSpecsMethod = getListApiSpecsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApiSpecs")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApiSpecs")) - .build(); - } - } - } - return getListApiSpecsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetApiSpecMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetApiSpec", - requestType = com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetApiSpecMethod() { - io.grpc.MethodDescriptor getGetApiSpecMethod; - if ((getGetApiSpecMethod = RegistryGrpc.getGetApiSpecMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getGetApiSpecMethod = RegistryGrpc.getGetApiSpecMethod) == null) { - RegistryGrpc.getGetApiSpecMethod = getGetApiSpecMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApiSpec")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetApiSpec")) - .build(); - } - } - } - return getGetApiSpecMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetApiSpecContentsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetApiSpecContents", - requestType = com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.class, - responseType = com.google.api.HttpBody.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetApiSpecContentsMethod() { - io.grpc.MethodDescriptor getGetApiSpecContentsMethod; - if ((getGetApiSpecContentsMethod = RegistryGrpc.getGetApiSpecContentsMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getGetApiSpecContentsMethod = RegistryGrpc.getGetApiSpecContentsMethod) == null) { - RegistryGrpc.getGetApiSpecContentsMethod = getGetApiSpecContentsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApiSpecContents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.api.HttpBody.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetApiSpecContents")) - .build(); - } - } - } - return getGetApiSpecContentsMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateApiSpecMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateApiSpec", - requestType = com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateApiSpecMethod() { - io.grpc.MethodDescriptor getCreateApiSpecMethod; - if ((getCreateApiSpecMethod = RegistryGrpc.getCreateApiSpecMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getCreateApiSpecMethod = RegistryGrpc.getCreateApiSpecMethod) == null) { - RegistryGrpc.getCreateApiSpecMethod = getCreateApiSpecMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApiSpec")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("CreateApiSpec")) - .build(); - } - } - } - return getCreateApiSpecMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateApiSpecMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateApiSpec", - requestType = com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateApiSpecMethod() { - io.grpc.MethodDescriptor getUpdateApiSpecMethod; - if ((getUpdateApiSpecMethod = RegistryGrpc.getUpdateApiSpecMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getUpdateApiSpecMethod = RegistryGrpc.getUpdateApiSpecMethod) == null) { - RegistryGrpc.getUpdateApiSpecMethod = getUpdateApiSpecMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateApiSpec")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("UpdateApiSpec")) - .build(); - } - } - } - return getUpdateApiSpecMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteApiSpecMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteApiSpec", - requestType = com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteApiSpecMethod() { - io.grpc.MethodDescriptor getDeleteApiSpecMethod; - if ((getDeleteApiSpecMethod = RegistryGrpc.getDeleteApiSpecMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getDeleteApiSpecMethod = RegistryGrpc.getDeleteApiSpecMethod) == null) { - RegistryGrpc.getDeleteApiSpecMethod = getDeleteApiSpecMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApiSpec")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApiSpec")) - .build(); - } - } - } - return getDeleteApiSpecMethod; - } - - private static volatile io.grpc.MethodDescriptor getTagApiSpecRevisionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "TagApiSpecRevision", - requestType = com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getTagApiSpecRevisionMethod() { - io.grpc.MethodDescriptor getTagApiSpecRevisionMethod; - if ((getTagApiSpecRevisionMethod = RegistryGrpc.getTagApiSpecRevisionMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getTagApiSpecRevisionMethod = RegistryGrpc.getTagApiSpecRevisionMethod) == null) { - RegistryGrpc.getTagApiSpecRevisionMethod = getTagApiSpecRevisionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TagApiSpecRevision")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("TagApiSpecRevision")) - .build(); - } - } - } - return getTagApiSpecRevisionMethod; - } - - private static volatile io.grpc.MethodDescriptor getListApiSpecRevisionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListApiSpecRevisions", - requestType = com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListApiSpecRevisionsMethod() { - io.grpc.MethodDescriptor getListApiSpecRevisionsMethod; - if ((getListApiSpecRevisionsMethod = RegistryGrpc.getListApiSpecRevisionsMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getListApiSpecRevisionsMethod = RegistryGrpc.getListApiSpecRevisionsMethod) == null) { - RegistryGrpc.getListApiSpecRevisionsMethod = getListApiSpecRevisionsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApiSpecRevisions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApiSpecRevisions")) - .build(); - } - } - } - return getListApiSpecRevisionsMethod; - } - - private static volatile io.grpc.MethodDescriptor getRollbackApiSpecMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RollbackApiSpec", - requestType = com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRollbackApiSpecMethod() { - io.grpc.MethodDescriptor getRollbackApiSpecMethod; - if ((getRollbackApiSpecMethod = RegistryGrpc.getRollbackApiSpecMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getRollbackApiSpecMethod = RegistryGrpc.getRollbackApiSpecMethod) == null) { - RegistryGrpc.getRollbackApiSpecMethod = getRollbackApiSpecMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RollbackApiSpec")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("RollbackApiSpec")) - .build(); - } - } - } - return getRollbackApiSpecMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteApiSpecRevisionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteApiSpecRevision", - requestType = com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiSpec.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteApiSpecRevisionMethod() { - io.grpc.MethodDescriptor getDeleteApiSpecRevisionMethod; - if ((getDeleteApiSpecRevisionMethod = RegistryGrpc.getDeleteApiSpecRevisionMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getDeleteApiSpecRevisionMethod = RegistryGrpc.getDeleteApiSpecRevisionMethod) == null) { - RegistryGrpc.getDeleteApiSpecRevisionMethod = getDeleteApiSpecRevisionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApiSpecRevision")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApiSpecRevision")) - .build(); - } - } - } - return getDeleteApiSpecRevisionMethod; - } - - private static volatile io.grpc.MethodDescriptor getListApiDeploymentsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListApiDeployments", - requestType = com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListApiDeploymentsMethod() { - io.grpc.MethodDescriptor getListApiDeploymentsMethod; - if ((getListApiDeploymentsMethod = RegistryGrpc.getListApiDeploymentsMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getListApiDeploymentsMethod = RegistryGrpc.getListApiDeploymentsMethod) == null) { - RegistryGrpc.getListApiDeploymentsMethod = getListApiDeploymentsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApiDeployments")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApiDeployments")) - .build(); - } - } - } - return getListApiDeploymentsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetApiDeploymentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetApiDeployment", - requestType = com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetApiDeploymentMethod() { - io.grpc.MethodDescriptor getGetApiDeploymentMethod; - if ((getGetApiDeploymentMethod = RegistryGrpc.getGetApiDeploymentMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getGetApiDeploymentMethod = RegistryGrpc.getGetApiDeploymentMethod) == null) { - RegistryGrpc.getGetApiDeploymentMethod = getGetApiDeploymentMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApiDeployment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetApiDeployment")) - .build(); - } - } - } - return getGetApiDeploymentMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateApiDeploymentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateApiDeployment", - requestType = com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateApiDeploymentMethod() { - io.grpc.MethodDescriptor getCreateApiDeploymentMethod; - if ((getCreateApiDeploymentMethod = RegistryGrpc.getCreateApiDeploymentMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getCreateApiDeploymentMethod = RegistryGrpc.getCreateApiDeploymentMethod) == null) { - RegistryGrpc.getCreateApiDeploymentMethod = getCreateApiDeploymentMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApiDeployment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("CreateApiDeployment")) - .build(); - } - } - } - return getCreateApiDeploymentMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateApiDeploymentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateApiDeployment", - requestType = com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateApiDeploymentMethod() { - io.grpc.MethodDescriptor getUpdateApiDeploymentMethod; - if ((getUpdateApiDeploymentMethod = RegistryGrpc.getUpdateApiDeploymentMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getUpdateApiDeploymentMethod = RegistryGrpc.getUpdateApiDeploymentMethod) == null) { - RegistryGrpc.getUpdateApiDeploymentMethod = getUpdateApiDeploymentMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateApiDeployment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("UpdateApiDeployment")) - .build(); - } - } - } - return getUpdateApiDeploymentMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteApiDeploymentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteApiDeployment", - requestType = com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteApiDeploymentMethod() { - io.grpc.MethodDescriptor getDeleteApiDeploymentMethod; - if ((getDeleteApiDeploymentMethod = RegistryGrpc.getDeleteApiDeploymentMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getDeleteApiDeploymentMethod = RegistryGrpc.getDeleteApiDeploymentMethod) == null) { - RegistryGrpc.getDeleteApiDeploymentMethod = getDeleteApiDeploymentMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApiDeployment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApiDeployment")) - .build(); - } - } - } - return getDeleteApiDeploymentMethod; - } - - private static volatile io.grpc.MethodDescriptor getTagApiDeploymentRevisionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "TagApiDeploymentRevision", - requestType = com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getTagApiDeploymentRevisionMethod() { - io.grpc.MethodDescriptor getTagApiDeploymentRevisionMethod; - if ((getTagApiDeploymentRevisionMethod = RegistryGrpc.getTagApiDeploymentRevisionMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getTagApiDeploymentRevisionMethod = RegistryGrpc.getTagApiDeploymentRevisionMethod) == null) { - RegistryGrpc.getTagApiDeploymentRevisionMethod = getTagApiDeploymentRevisionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TagApiDeploymentRevision")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("TagApiDeploymentRevision")) - .build(); - } - } - } - return getTagApiDeploymentRevisionMethod; - } - - private static volatile io.grpc.MethodDescriptor getListApiDeploymentRevisionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListApiDeploymentRevisions", - requestType = com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListApiDeploymentRevisionsMethod() { - io.grpc.MethodDescriptor getListApiDeploymentRevisionsMethod; - if ((getListApiDeploymentRevisionsMethod = RegistryGrpc.getListApiDeploymentRevisionsMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getListApiDeploymentRevisionsMethod = RegistryGrpc.getListApiDeploymentRevisionsMethod) == null) { - RegistryGrpc.getListApiDeploymentRevisionsMethod = getListApiDeploymentRevisionsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApiDeploymentRevisions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListApiDeploymentRevisions")) - .build(); - } - } - } - return getListApiDeploymentRevisionsMethod; - } - - private static volatile io.grpc.MethodDescriptor getRollbackApiDeploymentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RollbackApiDeployment", - requestType = com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRollbackApiDeploymentMethod() { - io.grpc.MethodDescriptor getRollbackApiDeploymentMethod; - if ((getRollbackApiDeploymentMethod = RegistryGrpc.getRollbackApiDeploymentMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getRollbackApiDeploymentMethod = RegistryGrpc.getRollbackApiDeploymentMethod) == null) { - RegistryGrpc.getRollbackApiDeploymentMethod = getRollbackApiDeploymentMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RollbackApiDeployment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("RollbackApiDeployment")) - .build(); - } - } - } - return getRollbackApiDeploymentMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteApiDeploymentRevisionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteApiDeploymentRevision", - requestType = com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ApiDeployment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteApiDeploymentRevisionMethod() { - io.grpc.MethodDescriptor getDeleteApiDeploymentRevisionMethod; - if ((getDeleteApiDeploymentRevisionMethod = RegistryGrpc.getDeleteApiDeploymentRevisionMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getDeleteApiDeploymentRevisionMethod = RegistryGrpc.getDeleteApiDeploymentRevisionMethod) == null) { - RegistryGrpc.getDeleteApiDeploymentRevisionMethod = getDeleteApiDeploymentRevisionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApiDeploymentRevision")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteApiDeploymentRevision")) - .build(); - } - } - } - return getDeleteApiDeploymentRevisionMethod; - } - - private static volatile io.grpc.MethodDescriptor getListArtifactsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListArtifacts", - requestType = com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListArtifactsMethod() { - io.grpc.MethodDescriptor getListArtifactsMethod; - if ((getListArtifactsMethod = RegistryGrpc.getListArtifactsMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getListArtifactsMethod = RegistryGrpc.getListArtifactsMethod) == null) { - RegistryGrpc.getListArtifactsMethod = getListArtifactsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListArtifacts")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ListArtifacts")) - .build(); - } - } - } - return getListArtifactsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetArtifactMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetArtifact", - requestType = com.google.cloud.apigeeregistry.v1.GetArtifactRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.Artifact.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetArtifactMethod() { - io.grpc.MethodDescriptor getGetArtifactMethod; - if ((getGetArtifactMethod = RegistryGrpc.getGetArtifactMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getGetArtifactMethod = RegistryGrpc.getGetArtifactMethod) == null) { - RegistryGrpc.getGetArtifactMethod = getGetArtifactMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetArtifact")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.GetArtifactRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetArtifact")) - .build(); - } - } - } - return getGetArtifactMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetArtifactContentsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetArtifactContents", - requestType = com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.class, - responseType = com.google.api.HttpBody.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetArtifactContentsMethod() { - io.grpc.MethodDescriptor getGetArtifactContentsMethod; - if ((getGetArtifactContentsMethod = RegistryGrpc.getGetArtifactContentsMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getGetArtifactContentsMethod = RegistryGrpc.getGetArtifactContentsMethod) == null) { - RegistryGrpc.getGetArtifactContentsMethod = getGetArtifactContentsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetArtifactContents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.api.HttpBody.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("GetArtifactContents")) - .build(); - } - } - } - return getGetArtifactContentsMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateArtifactMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateArtifact", - requestType = com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.Artifact.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateArtifactMethod() { - io.grpc.MethodDescriptor getCreateArtifactMethod; - if ((getCreateArtifactMethod = RegistryGrpc.getCreateArtifactMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getCreateArtifactMethod = RegistryGrpc.getCreateArtifactMethod) == null) { - RegistryGrpc.getCreateArtifactMethod = getCreateArtifactMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateArtifact")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("CreateArtifact")) - .build(); - } - } - } - return getCreateArtifactMethod; - } - - private static volatile io.grpc.MethodDescriptor getReplaceArtifactMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ReplaceArtifact", - requestType = com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.class, - responseType = com.google.cloud.apigeeregistry.v1.Artifact.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getReplaceArtifactMethod() { - io.grpc.MethodDescriptor getReplaceArtifactMethod; - if ((getReplaceArtifactMethod = RegistryGrpc.getReplaceArtifactMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getReplaceArtifactMethod = RegistryGrpc.getReplaceArtifactMethod) == null) { - RegistryGrpc.getReplaceArtifactMethod = getReplaceArtifactMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReplaceArtifact")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("ReplaceArtifact")) - .build(); - } - } - } - return getReplaceArtifactMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteArtifactMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteArtifact", - requestType = com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteArtifactMethod() { - io.grpc.MethodDescriptor getDeleteArtifactMethod; - if ((getDeleteArtifactMethod = RegistryGrpc.getDeleteArtifactMethod) == null) { - synchronized (RegistryGrpc.class) { - if ((getDeleteArtifactMethod = RegistryGrpc.getDeleteArtifactMethod) == null) { - RegistryGrpc.getDeleteArtifactMethod = getDeleteArtifactMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteArtifact")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new RegistryMethodDescriptorSupplier("DeleteArtifact")) - .build(); - } - } - } - return getDeleteArtifactMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static RegistryStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public RegistryStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new RegistryStub(channel, callOptions); - } - }; - return RegistryStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static RegistryBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public RegistryBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new RegistryBlockingStub(channel, callOptions); - } - }; - return RegistryBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static RegistryFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public RegistryFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new RegistryFutureStub(channel, callOptions); - } - }; - return RegistryFutureStub.newStub(factory, channel); - } - - /** - *
-   * The Registry service allows teams to manage descriptions of APIs.
-   * 
- */ - public static abstract class RegistryImplBase implements io.grpc.BindableService { - - /** - *
-     * Returns matching APIs.
-     * 
- */ - public void listApis(com.google.cloud.apigeeregistry.v1.ListApisRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApisMethod(), responseObserver); - } - - /** - *
-     * Returns a specified API.
-     * 
- */ - public void getApi(com.google.cloud.apigeeregistry.v1.GetApiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetApiMethod(), responseObserver); - } - - /** - *
-     * Creates a specified API.
-     * 
- */ - public void createApi(com.google.cloud.apigeeregistry.v1.CreateApiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateApiMethod(), responseObserver); - } - - /** - *
-     * Used to modify a specified API.
-     * 
- */ - public void updateApi(com.google.cloud.apigeeregistry.v1.UpdateApiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateApiMethod(), responseObserver); - } - - /** - *
-     * Removes a specified API and all of the resources that it
-     * owns.
-     * 
- */ - public void deleteApi(com.google.cloud.apigeeregistry.v1.DeleteApiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiMethod(), responseObserver); - } - - /** - *
-     * Returns matching versions.
-     * 
- */ - public void listApiVersions(com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApiVersionsMethod(), responseObserver); - } - - /** - *
-     * Returns a specified version.
-     * 
- */ - public void getApiVersion(com.google.cloud.apigeeregistry.v1.GetApiVersionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetApiVersionMethod(), responseObserver); - } - - /** - *
-     * Creates a specified version.
-     * 
- */ - public void createApiVersion(com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateApiVersionMethod(), responseObserver); - } - - /** - *
-     * Used to modify a specified version.
-     * 
- */ - public void updateApiVersion(com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateApiVersionMethod(), responseObserver); - } - - /** - *
-     * Removes a specified version and all of the resources that
-     * it owns.
-     * 
- */ - public void deleteApiVersion(com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiVersionMethod(), responseObserver); - } - - /** - *
-     * Returns matching specs.
-     * 
- */ - public void listApiSpecs(com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApiSpecsMethod(), responseObserver); - } - - /** - *
-     * Returns a specified spec.
-     * 
- */ - public void getApiSpec(com.google.cloud.apigeeregistry.v1.GetApiSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetApiSpecMethod(), responseObserver); - } - - /** - *
-     * Returns the contents of a specified spec.
-     * If specs are stored with GZip compression, the default behavior
-     * is to return the spec uncompressed (the mime_type response field
-     * indicates the exact format returned).
-     * 
- */ - public void getApiSpecContents(com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetApiSpecContentsMethod(), responseObserver); - } - - /** - *
-     * Creates a specified spec.
-     * 
- */ - public void createApiSpec(com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateApiSpecMethod(), responseObserver); - } - - /** - *
-     * Used to modify a specified spec.
-     * 
- */ - public void updateApiSpec(com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateApiSpecMethod(), responseObserver); - } - - /** - *
-     * Removes a specified spec, all revisions, and all child
-     * resources (e.g., artifacts).
-     * 
- */ - public void deleteApiSpec(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiSpecMethod(), responseObserver); - } - - /** - *
-     * Adds a tag to a specified revision of a spec.
-     * 
- */ - public void tagApiSpecRevision(com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTagApiSpecRevisionMethod(), responseObserver); - } - - /** - *
-     * Lists all revisions of a spec.
-     * Revisions are returned in descending order of revision creation time.
-     * 
- */ - public void listApiSpecRevisions(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApiSpecRevisionsMethod(), responseObserver); - } - - /** - *
-     * Sets the current revision to a specified prior revision.
-     * Note that this creates a new revision with a new revision ID.
-     * 
- */ - public void rollbackApiSpec(com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRollbackApiSpecMethod(), responseObserver); - } - - /** - *
-     * Deletes a revision of a spec.
-     * 
- */ - public void deleteApiSpecRevision(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiSpecRevisionMethod(), responseObserver); - } - - /** - *
-     * Returns matching deployments.
-     * 
- */ - public void listApiDeployments(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApiDeploymentsMethod(), responseObserver); - } - - /** - *
-     * Returns a specified deployment.
-     * 
- */ - public void getApiDeployment(com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetApiDeploymentMethod(), responseObserver); - } - - /** - *
-     * Creates a specified deployment.
-     * 
- */ - public void createApiDeployment(com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateApiDeploymentMethod(), responseObserver); - } - - /** - *
-     * Used to modify a specified deployment.
-     * 
- */ - public void updateApiDeployment(com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateApiDeploymentMethod(), responseObserver); - } - - /** - *
-     * Removes a specified deployment, all revisions, and all
-     * child resources (e.g., artifacts).
-     * 
- */ - public void deleteApiDeployment(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiDeploymentMethod(), responseObserver); - } - - /** - *
-     * Adds a tag to a specified revision of a
-     * deployment.
-     * 
- */ - public void tagApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTagApiDeploymentRevisionMethod(), responseObserver); - } - - /** - *
-     * Lists all revisions of a deployment.
-     * Revisions are returned in descending order of revision creation time.
-     * 
- */ - public void listApiDeploymentRevisions(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApiDeploymentRevisionsMethod(), responseObserver); - } - - /** - *
-     * Sets the current revision to a specified prior
-     * revision. Note that this creates a new revision with a new revision ID.
-     * 
- */ - public void rollbackApiDeployment(com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRollbackApiDeploymentMethod(), responseObserver); - } - - /** - *
-     * Deletes a revision of a deployment.
-     * 
- */ - public void deleteApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteApiDeploymentRevisionMethod(), responseObserver); - } - - /** - *
-     * Returns matching artifacts.
-     * 
- */ - public void listArtifacts(com.google.cloud.apigeeregistry.v1.ListArtifactsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListArtifactsMethod(), responseObserver); - } - - /** - *
-     * Returns a specified artifact.
-     * 
- */ - public void getArtifact(com.google.cloud.apigeeregistry.v1.GetArtifactRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetArtifactMethod(), responseObserver); - } - - /** - *
-     * Returns the contents of a specified artifact.
-     * If artifacts are stored with GZip compression, the default behavior
-     * is to return the artifact uncompressed (the mime_type response field
-     * indicates the exact format returned).
-     * 
- */ - public void getArtifactContents(com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetArtifactContentsMethod(), responseObserver); - } - - /** - *
-     * Creates a specified artifact.
-     * 
- */ - public void createArtifact(com.google.cloud.apigeeregistry.v1.CreateArtifactRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateArtifactMethod(), responseObserver); - } - - /** - *
-     * Used to replace a specified artifact.
-     * 
- */ - public void replaceArtifact(com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReplaceArtifactMethod(), responseObserver); - } - - /** - *
-     * Removes a specified artifact.
-     * 
- */ - public void deleteArtifact(com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteArtifactMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListApisMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.ListApisRequest, - com.google.cloud.apigeeregistry.v1.ListApisResponse>( - this, METHODID_LIST_APIS))) - .addMethod( - getGetApiMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.GetApiRequest, - com.google.cloud.apigeeregistry.v1.Api>( - this, METHODID_GET_API))) - .addMethod( - getCreateApiMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.CreateApiRequest, - com.google.cloud.apigeeregistry.v1.Api>( - this, METHODID_CREATE_API))) - .addMethod( - getUpdateApiMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.UpdateApiRequest, - com.google.cloud.apigeeregistry.v1.Api>( - this, METHODID_UPDATE_API))) - .addMethod( - getDeleteApiMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.DeleteApiRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_API))) - .addMethod( - getListApiVersionsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest, - com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse>( - this, METHODID_LIST_API_VERSIONS))) - .addMethod( - getGetApiVersionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.GetApiVersionRequest, - com.google.cloud.apigeeregistry.v1.ApiVersion>( - this, METHODID_GET_API_VERSION))) - .addMethod( - getCreateApiVersionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest, - com.google.cloud.apigeeregistry.v1.ApiVersion>( - this, METHODID_CREATE_API_VERSION))) - .addMethod( - getUpdateApiVersionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest, - com.google.cloud.apigeeregistry.v1.ApiVersion>( - this, METHODID_UPDATE_API_VERSION))) - .addMethod( - getDeleteApiVersionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_API_VERSION))) - .addMethod( - getListApiSpecsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest, - com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse>( - this, METHODID_LIST_API_SPECS))) - .addMethod( - getGetApiSpecMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.GetApiSpecRequest, - com.google.cloud.apigeeregistry.v1.ApiSpec>( - this, METHODID_GET_API_SPEC))) - .addMethod( - getGetApiSpecContentsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest, - com.google.api.HttpBody>( - this, METHODID_GET_API_SPEC_CONTENTS))) - .addMethod( - getCreateApiSpecMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest, - com.google.cloud.apigeeregistry.v1.ApiSpec>( - this, METHODID_CREATE_API_SPEC))) - .addMethod( - getUpdateApiSpecMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest, - com.google.cloud.apigeeregistry.v1.ApiSpec>( - this, METHODID_UPDATE_API_SPEC))) - .addMethod( - getDeleteApiSpecMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_API_SPEC))) - .addMethod( - getTagApiSpecRevisionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest, - com.google.cloud.apigeeregistry.v1.ApiSpec>( - this, METHODID_TAG_API_SPEC_REVISION))) - .addMethod( - getListApiSpecRevisionsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest, - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse>( - this, METHODID_LIST_API_SPEC_REVISIONS))) - .addMethod( - getRollbackApiSpecMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest, - com.google.cloud.apigeeregistry.v1.ApiSpec>( - this, METHODID_ROLLBACK_API_SPEC))) - .addMethod( - getDeleteApiSpecRevisionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest, - com.google.cloud.apigeeregistry.v1.ApiSpec>( - this, METHODID_DELETE_API_SPEC_REVISION))) - .addMethod( - getListApiDeploymentsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest, - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse>( - this, METHODID_LIST_API_DEPLOYMENTS))) - .addMethod( - getGetApiDeploymentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest, - com.google.cloud.apigeeregistry.v1.ApiDeployment>( - this, METHODID_GET_API_DEPLOYMENT))) - .addMethod( - getCreateApiDeploymentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest, - com.google.cloud.apigeeregistry.v1.ApiDeployment>( - this, METHODID_CREATE_API_DEPLOYMENT))) - .addMethod( - getUpdateApiDeploymentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest, - com.google.cloud.apigeeregistry.v1.ApiDeployment>( - this, METHODID_UPDATE_API_DEPLOYMENT))) - .addMethod( - getDeleteApiDeploymentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_API_DEPLOYMENT))) - .addMethod( - getTagApiDeploymentRevisionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest, - com.google.cloud.apigeeregistry.v1.ApiDeployment>( - this, METHODID_TAG_API_DEPLOYMENT_REVISION))) - .addMethod( - getListApiDeploymentRevisionsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest, - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse>( - this, METHODID_LIST_API_DEPLOYMENT_REVISIONS))) - .addMethod( - getRollbackApiDeploymentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest, - com.google.cloud.apigeeregistry.v1.ApiDeployment>( - this, METHODID_ROLLBACK_API_DEPLOYMENT))) - .addMethod( - getDeleteApiDeploymentRevisionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest, - com.google.cloud.apigeeregistry.v1.ApiDeployment>( - this, METHODID_DELETE_API_DEPLOYMENT_REVISION))) - .addMethod( - getListArtifactsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.ListArtifactsRequest, - com.google.cloud.apigeeregistry.v1.ListArtifactsResponse>( - this, METHODID_LIST_ARTIFACTS))) - .addMethod( - getGetArtifactMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.GetArtifactRequest, - com.google.cloud.apigeeregistry.v1.Artifact>( - this, METHODID_GET_ARTIFACT))) - .addMethod( - getGetArtifactContentsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest, - com.google.api.HttpBody>( - this, METHODID_GET_ARTIFACT_CONTENTS))) - .addMethod( - getCreateArtifactMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.CreateArtifactRequest, - com.google.cloud.apigeeregistry.v1.Artifact>( - this, METHODID_CREATE_ARTIFACT))) - .addMethod( - getReplaceArtifactMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest, - com.google.cloud.apigeeregistry.v1.Artifact>( - this, METHODID_REPLACE_ARTIFACT))) - .addMethod( - getDeleteArtifactMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_ARTIFACT))) - .build(); - } - } - - /** - *
-   * The Registry service allows teams to manage descriptions of APIs.
-   * 
- */ - public static final class RegistryStub extends io.grpc.stub.AbstractAsyncStub { - private RegistryStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected RegistryStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new RegistryStub(channel, callOptions); - } - - /** - *
-     * Returns matching APIs.
-     * 
- */ - public void listApis(com.google.cloud.apigeeregistry.v1.ListApisRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListApisMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns a specified API.
-     * 
- */ - public void getApi(com.google.cloud.apigeeregistry.v1.GetApiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetApiMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a specified API.
-     * 
- */ - public void createApi(com.google.cloud.apigeeregistry.v1.CreateApiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateApiMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Used to modify a specified API.
-     * 
- */ - public void updateApi(com.google.cloud.apigeeregistry.v1.UpdateApiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateApiMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Removes a specified API and all of the resources that it
-     * owns.
-     * 
- */ - public void deleteApi(com.google.cloud.apigeeregistry.v1.DeleteApiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteApiMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns matching versions.
-     * 
- */ - public void listApiVersions(com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListApiVersionsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns a specified version.
-     * 
- */ - public void getApiVersion(com.google.cloud.apigeeregistry.v1.GetApiVersionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetApiVersionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a specified version.
-     * 
- */ - public void createApiVersion(com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateApiVersionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Used to modify a specified version.
-     * 
- */ - public void updateApiVersion(com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateApiVersionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Removes a specified version and all of the resources that
-     * it owns.
-     * 
- */ - public void deleteApiVersion(com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteApiVersionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns matching specs.
-     * 
- */ - public void listApiSpecs(com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListApiSpecsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns a specified spec.
-     * 
- */ - public void getApiSpec(com.google.cloud.apigeeregistry.v1.GetApiSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetApiSpecMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns the contents of a specified spec.
-     * If specs are stored with GZip compression, the default behavior
-     * is to return the spec uncompressed (the mime_type response field
-     * indicates the exact format returned).
-     * 
- */ - public void getApiSpecContents(com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetApiSpecContentsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a specified spec.
-     * 
- */ - public void createApiSpec(com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateApiSpecMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Used to modify a specified spec.
-     * 
- */ - public void updateApiSpec(com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateApiSpecMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Removes a specified spec, all revisions, and all child
-     * resources (e.g., artifacts).
-     * 
- */ - public void deleteApiSpec(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteApiSpecMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Adds a tag to a specified revision of a spec.
-     * 
- */ - public void tagApiSpecRevision(com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getTagApiSpecRevisionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists all revisions of a spec.
-     * Revisions are returned in descending order of revision creation time.
-     * 
- */ - public void listApiSpecRevisions(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListApiSpecRevisionsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Sets the current revision to a specified prior revision.
-     * Note that this creates a new revision with a new revision ID.
-     * 
- */ - public void rollbackApiSpec(com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRollbackApiSpecMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes a revision of a spec.
-     * 
- */ - public void deleteApiSpecRevision(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteApiSpecRevisionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns matching deployments.
-     * 
- */ - public void listApiDeployments(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListApiDeploymentsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns a specified deployment.
-     * 
- */ - public void getApiDeployment(com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetApiDeploymentMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a specified deployment.
-     * 
- */ - public void createApiDeployment(com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateApiDeploymentMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Used to modify a specified deployment.
-     * 
- */ - public void updateApiDeployment(com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateApiDeploymentMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Removes a specified deployment, all revisions, and all
-     * child resources (e.g., artifacts).
-     * 
- */ - public void deleteApiDeployment(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteApiDeploymentMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Adds a tag to a specified revision of a
-     * deployment.
-     * 
- */ - public void tagApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getTagApiDeploymentRevisionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists all revisions of a deployment.
-     * Revisions are returned in descending order of revision creation time.
-     * 
- */ - public void listApiDeploymentRevisions(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListApiDeploymentRevisionsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Sets the current revision to a specified prior
-     * revision. Note that this creates a new revision with a new revision ID.
-     * 
- */ - public void rollbackApiDeployment(com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRollbackApiDeploymentMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes a revision of a deployment.
-     * 
- */ - public void deleteApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteApiDeploymentRevisionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns matching artifacts.
-     * 
- */ - public void listArtifacts(com.google.cloud.apigeeregistry.v1.ListArtifactsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListArtifactsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns a specified artifact.
-     * 
- */ - public void getArtifact(com.google.cloud.apigeeregistry.v1.GetArtifactRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetArtifactMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns the contents of a specified artifact.
-     * If artifacts are stored with GZip compression, the default behavior
-     * is to return the artifact uncompressed (the mime_type response field
-     * indicates the exact format returned).
-     * 
- */ - public void getArtifactContents(com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetArtifactContentsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a specified artifact.
-     * 
- */ - public void createArtifact(com.google.cloud.apigeeregistry.v1.CreateArtifactRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateArtifactMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Used to replace a specified artifact.
-     * 
- */ - public void replaceArtifact(com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getReplaceArtifactMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Removes a specified artifact.
-     * 
- */ - public void deleteArtifact(com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteArtifactMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * The Registry service allows teams to manage descriptions of APIs.
-   * 
- */ - public static final class RegistryBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private RegistryBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected RegistryBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new RegistryBlockingStub(channel, callOptions); - } - - /** - *
-     * Returns matching APIs.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ListApisResponse listApis(com.google.cloud.apigeeregistry.v1.ListApisRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListApisMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns a specified API.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.Api getApi(com.google.cloud.apigeeregistry.v1.GetApiRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetApiMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a specified API.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.Api createApi(com.google.cloud.apigeeregistry.v1.CreateApiRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateApiMethod(), getCallOptions(), request); - } - - /** - *
-     * Used to modify a specified API.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.Api updateApi(com.google.cloud.apigeeregistry.v1.UpdateApiRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateApiMethod(), getCallOptions(), request); - } - - /** - *
-     * Removes a specified API and all of the resources that it
-     * owns.
-     * 
- */ - public com.google.protobuf.Empty deleteApi(com.google.cloud.apigeeregistry.v1.DeleteApiRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteApiMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns matching versions.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse listApiVersions(com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListApiVersionsMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns a specified version.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion(com.google.cloud.apigeeregistry.v1.GetApiVersionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetApiVersionMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a specified version.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiVersion createApiVersion(com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateApiVersionMethod(), getCallOptions(), request); - } - - /** - *
-     * Used to modify a specified version.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiVersion updateApiVersion(com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateApiVersionMethod(), getCallOptions(), request); - } - - /** - *
-     * Removes a specified version and all of the resources that
-     * it owns.
-     * 
- */ - public com.google.protobuf.Empty deleteApiVersion(com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteApiVersionMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns matching specs.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse listApiSpecs(com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListApiSpecsMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns a specified spec.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec(com.google.cloud.apigeeregistry.v1.GetApiSpecRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetApiSpecMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns the contents of a specified spec.
-     * If specs are stored with GZip compression, the default behavior
-     * is to return the spec uncompressed (the mime_type response field
-     * indicates the exact format returned).
-     * 
- */ - public com.google.api.HttpBody getApiSpecContents(com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetApiSpecContentsMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a specified spec.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiSpec createApiSpec(com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateApiSpecMethod(), getCallOptions(), request); - } - - /** - *
-     * Used to modify a specified spec.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiSpec updateApiSpec(com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateApiSpecMethod(), getCallOptions(), request); - } - - /** - *
-     * Removes a specified spec, all revisions, and all child
-     * resources (e.g., artifacts).
-     * 
- */ - public com.google.protobuf.Empty deleteApiSpec(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteApiSpecMethod(), getCallOptions(), request); - } - - /** - *
-     * Adds a tag to a specified revision of a spec.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiSpec tagApiSpecRevision(com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getTagApiSpecRevisionMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists all revisions of a spec.
-     * Revisions are returned in descending order of revision creation time.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse listApiSpecRevisions(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListApiSpecRevisionsMethod(), getCallOptions(), request); - } - - /** - *
-     * Sets the current revision to a specified prior revision.
-     * Note that this creates a new revision with a new revision ID.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiSpec rollbackApiSpec(com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRollbackApiSpecMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes a revision of a spec.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiSpec deleteApiSpecRevision(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteApiSpecRevisionMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns matching deployments.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse listApiDeployments(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListApiDeploymentsMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns a specified deployment.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment(com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetApiDeploymentMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a specified deployment.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment createApiDeployment(com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateApiDeploymentMethod(), getCallOptions(), request); - } - - /** - *
-     * Used to modify a specified deployment.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment updateApiDeployment(com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateApiDeploymentMethod(), getCallOptions(), request); - } - - /** - *
-     * Removes a specified deployment, all revisions, and all
-     * child resources (e.g., artifacts).
-     * 
- */ - public com.google.protobuf.Empty deleteApiDeployment(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteApiDeploymentMethod(), getCallOptions(), request); - } - - /** - *
-     * Adds a tag to a specified revision of a
-     * deployment.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment tagApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getTagApiDeploymentRevisionMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists all revisions of a deployment.
-     * Revisions are returned in descending order of revision creation time.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse listApiDeploymentRevisions(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListApiDeploymentRevisionsMethod(), getCallOptions(), request); - } - - /** - *
-     * Sets the current revision to a specified prior
-     * revision. Note that this creates a new revision with a new revision ID.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment rollbackApiDeployment(com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRollbackApiDeploymentMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes a revision of a deployment.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment deleteApiDeploymentRevision(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteApiDeploymentRevisionMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns matching artifacts.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.ListArtifactsResponse listArtifacts(com.google.cloud.apigeeregistry.v1.ListArtifactsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListArtifactsMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns a specified artifact.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.Artifact getArtifact(com.google.cloud.apigeeregistry.v1.GetArtifactRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetArtifactMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns the contents of a specified artifact.
-     * If artifacts are stored with GZip compression, the default behavior
-     * is to return the artifact uncompressed (the mime_type response field
-     * indicates the exact format returned).
-     * 
- */ - public com.google.api.HttpBody getArtifactContents(com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetArtifactContentsMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a specified artifact.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.Artifact createArtifact(com.google.cloud.apigeeregistry.v1.CreateArtifactRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateArtifactMethod(), getCallOptions(), request); - } - - /** - *
-     * Used to replace a specified artifact.
-     * 
- */ - public com.google.cloud.apigeeregistry.v1.Artifact replaceArtifact(com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getReplaceArtifactMethod(), getCallOptions(), request); - } - - /** - *
-     * Removes a specified artifact.
-     * 
- */ - public com.google.protobuf.Empty deleteArtifact(com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteArtifactMethod(), getCallOptions(), request); - } - } - - /** - *
-   * The Registry service allows teams to manage descriptions of APIs.
-   * 
- */ - public static final class RegistryFutureStub extends io.grpc.stub.AbstractFutureStub { - private RegistryFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected RegistryFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new RegistryFutureStub(channel, callOptions); - } - - /** - *
-     * Returns matching APIs.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listApis( - com.google.cloud.apigeeregistry.v1.ListApisRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListApisMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns a specified API.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getApi( - com.google.cloud.apigeeregistry.v1.GetApiRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetApiMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a specified API.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createApi( - com.google.cloud.apigeeregistry.v1.CreateApiRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateApiMethod(), getCallOptions()), request); - } - - /** - *
-     * Used to modify a specified API.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateApi( - com.google.cloud.apigeeregistry.v1.UpdateApiRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateApiMethod(), getCallOptions()), request); - } - - /** - *
-     * Removes a specified API and all of the resources that it
-     * owns.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteApi( - com.google.cloud.apigeeregistry.v1.DeleteApiRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteApiMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns matching versions.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listApiVersions( - com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListApiVersionsMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns a specified version.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getApiVersion( - com.google.cloud.apigeeregistry.v1.GetApiVersionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetApiVersionMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a specified version.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createApiVersion( - com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateApiVersionMethod(), getCallOptions()), request); - } - - /** - *
-     * Used to modify a specified version.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateApiVersion( - com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateApiVersionMethod(), getCallOptions()), request); - } - - /** - *
-     * Removes a specified version and all of the resources that
-     * it owns.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteApiVersion( - com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteApiVersionMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns matching specs.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listApiSpecs( - com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListApiSpecsMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns a specified spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getApiSpec( - com.google.cloud.apigeeregistry.v1.GetApiSpecRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetApiSpecMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns the contents of a specified spec.
-     * If specs are stored with GZip compression, the default behavior
-     * is to return the spec uncompressed (the mime_type response field
-     * indicates the exact format returned).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getApiSpecContents( - com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetApiSpecContentsMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a specified spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createApiSpec( - com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateApiSpecMethod(), getCallOptions()), request); - } - - /** - *
-     * Used to modify a specified spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateApiSpec( - com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateApiSpecMethod(), getCallOptions()), request); - } - - /** - *
-     * Removes a specified spec, all revisions, and all child
-     * resources (e.g., artifacts).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteApiSpec( - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteApiSpecMethod(), getCallOptions()), request); - } - - /** - *
-     * Adds a tag to a specified revision of a spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture tagApiSpecRevision( - com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getTagApiSpecRevisionMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists all revisions of a spec.
-     * Revisions are returned in descending order of revision creation time.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listApiSpecRevisions( - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListApiSpecRevisionsMethod(), getCallOptions()), request); - } - - /** - *
-     * Sets the current revision to a specified prior revision.
-     * Note that this creates a new revision with a new revision ID.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture rollbackApiSpec( - com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRollbackApiSpecMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes a revision of a spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteApiSpecRevision( - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteApiSpecRevisionMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns matching deployments.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listApiDeployments( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListApiDeploymentsMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns a specified deployment.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getApiDeployment( - com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetApiDeploymentMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a specified deployment.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createApiDeployment( - com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateApiDeploymentMethod(), getCallOptions()), request); - } - - /** - *
-     * Used to modify a specified deployment.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateApiDeployment( - com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateApiDeploymentMethod(), getCallOptions()), request); - } - - /** - *
-     * Removes a specified deployment, all revisions, and all
-     * child resources (e.g., artifacts).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteApiDeployment( - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteApiDeploymentMethod(), getCallOptions()), request); - } - - /** - *
-     * Adds a tag to a specified revision of a
-     * deployment.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture tagApiDeploymentRevision( - com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getTagApiDeploymentRevisionMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists all revisions of a deployment.
-     * Revisions are returned in descending order of revision creation time.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listApiDeploymentRevisions( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListApiDeploymentRevisionsMethod(), getCallOptions()), request); - } - - /** - *
-     * Sets the current revision to a specified prior
-     * revision. Note that this creates a new revision with a new revision ID.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture rollbackApiDeployment( - com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRollbackApiDeploymentMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes a revision of a deployment.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteApiDeploymentRevision( - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteApiDeploymentRevisionMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns matching artifacts.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listArtifacts( - com.google.cloud.apigeeregistry.v1.ListArtifactsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListArtifactsMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns a specified artifact.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getArtifact( - com.google.cloud.apigeeregistry.v1.GetArtifactRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetArtifactMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns the contents of a specified artifact.
-     * If artifacts are stored with GZip compression, the default behavior
-     * is to return the artifact uncompressed (the mime_type response field
-     * indicates the exact format returned).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getArtifactContents( - com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetArtifactContentsMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a specified artifact.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createArtifact( - com.google.cloud.apigeeregistry.v1.CreateArtifactRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateArtifactMethod(), getCallOptions()), request); - } - - /** - *
-     * Used to replace a specified artifact.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture replaceArtifact( - com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getReplaceArtifactMethod(), getCallOptions()), request); - } - - /** - *
-     * Removes a specified artifact.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteArtifact( - com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteArtifactMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_APIS = 0; - private static final int METHODID_GET_API = 1; - private static final int METHODID_CREATE_API = 2; - private static final int METHODID_UPDATE_API = 3; - private static final int METHODID_DELETE_API = 4; - private static final int METHODID_LIST_API_VERSIONS = 5; - private static final int METHODID_GET_API_VERSION = 6; - private static final int METHODID_CREATE_API_VERSION = 7; - private static final int METHODID_UPDATE_API_VERSION = 8; - private static final int METHODID_DELETE_API_VERSION = 9; - private static final int METHODID_LIST_API_SPECS = 10; - private static final int METHODID_GET_API_SPEC = 11; - private static final int METHODID_GET_API_SPEC_CONTENTS = 12; - private static final int METHODID_CREATE_API_SPEC = 13; - private static final int METHODID_UPDATE_API_SPEC = 14; - private static final int METHODID_DELETE_API_SPEC = 15; - private static final int METHODID_TAG_API_SPEC_REVISION = 16; - private static final int METHODID_LIST_API_SPEC_REVISIONS = 17; - private static final int METHODID_ROLLBACK_API_SPEC = 18; - private static final int METHODID_DELETE_API_SPEC_REVISION = 19; - private static final int METHODID_LIST_API_DEPLOYMENTS = 20; - private static final int METHODID_GET_API_DEPLOYMENT = 21; - private static final int METHODID_CREATE_API_DEPLOYMENT = 22; - private static final int METHODID_UPDATE_API_DEPLOYMENT = 23; - private static final int METHODID_DELETE_API_DEPLOYMENT = 24; - private static final int METHODID_TAG_API_DEPLOYMENT_REVISION = 25; - private static final int METHODID_LIST_API_DEPLOYMENT_REVISIONS = 26; - private static final int METHODID_ROLLBACK_API_DEPLOYMENT = 27; - private static final int METHODID_DELETE_API_DEPLOYMENT_REVISION = 28; - private static final int METHODID_LIST_ARTIFACTS = 29; - private static final int METHODID_GET_ARTIFACT = 30; - private static final int METHODID_GET_ARTIFACT_CONTENTS = 31; - private static final int METHODID_CREATE_ARTIFACT = 32; - private static final int METHODID_REPLACE_ARTIFACT = 33; - private static final int METHODID_DELETE_ARTIFACT = 34; - - 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 RegistryImplBase serviceImpl; - private final int methodId; - - MethodHandlers(RegistryImplBase 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_LIST_APIS: - serviceImpl.listApis((com.google.cloud.apigeeregistry.v1.ListApisRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_API: - serviceImpl.getApi((com.google.cloud.apigeeregistry.v1.GetApiRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_API: - serviceImpl.createApi((com.google.cloud.apigeeregistry.v1.CreateApiRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_API: - serviceImpl.updateApi((com.google.cloud.apigeeregistry.v1.UpdateApiRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_API: - serviceImpl.deleteApi((com.google.cloud.apigeeregistry.v1.DeleteApiRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_API_VERSIONS: - serviceImpl.listApiVersions((com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_API_VERSION: - serviceImpl.getApiVersion((com.google.cloud.apigeeregistry.v1.GetApiVersionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_API_VERSION: - serviceImpl.createApiVersion((com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_API_VERSION: - serviceImpl.updateApiVersion((com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_API_VERSION: - serviceImpl.deleteApiVersion((com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_API_SPECS: - serviceImpl.listApiSpecs((com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_API_SPEC: - serviceImpl.getApiSpec((com.google.cloud.apigeeregistry.v1.GetApiSpecRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_API_SPEC_CONTENTS: - serviceImpl.getApiSpecContents((com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_API_SPEC: - serviceImpl.createApiSpec((com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_API_SPEC: - serviceImpl.updateApiSpec((com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_API_SPEC: - serviceImpl.deleteApiSpec((com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_TAG_API_SPEC_REVISION: - serviceImpl.tagApiSpecRevision((com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_API_SPEC_REVISIONS: - serviceImpl.listApiSpecRevisions((com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ROLLBACK_API_SPEC: - serviceImpl.rollbackApiSpec((com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_API_SPEC_REVISION: - serviceImpl.deleteApiSpecRevision((com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_API_DEPLOYMENTS: - serviceImpl.listApiDeployments((com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_API_DEPLOYMENT: - serviceImpl.getApiDeployment((com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_API_DEPLOYMENT: - serviceImpl.createApiDeployment((com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_API_DEPLOYMENT: - serviceImpl.updateApiDeployment((com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_API_DEPLOYMENT: - serviceImpl.deleteApiDeployment((com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_TAG_API_DEPLOYMENT_REVISION: - serviceImpl.tagApiDeploymentRevision((com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_API_DEPLOYMENT_REVISIONS: - serviceImpl.listApiDeploymentRevisions((com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ROLLBACK_API_DEPLOYMENT: - serviceImpl.rollbackApiDeployment((com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_API_DEPLOYMENT_REVISION: - serviceImpl.deleteApiDeploymentRevision((com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_ARTIFACTS: - serviceImpl.listArtifacts((com.google.cloud.apigeeregistry.v1.ListArtifactsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ARTIFACT: - serviceImpl.getArtifact((com.google.cloud.apigeeregistry.v1.GetArtifactRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ARTIFACT_CONTENTS: - serviceImpl.getArtifactContents((com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_ARTIFACT: - serviceImpl.createArtifact((com.google.cloud.apigeeregistry.v1.CreateArtifactRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REPLACE_ARTIFACT: - serviceImpl.replaceArtifact((com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_ARTIFACT: - serviceImpl.deleteArtifact((com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest) 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(); - } - } - } - - private static abstract class RegistryBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - RegistryBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Registry"); - } - } - - private static final class RegistryFileDescriptorSupplier - extends RegistryBaseDescriptorSupplier { - RegistryFileDescriptorSupplier() {} - } - - private static final class RegistryMethodDescriptorSupplier - extends RegistryBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - RegistryMethodDescriptorSupplier(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 (RegistryGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new RegistryFileDescriptorSupplier()) - .addMethod(getListApisMethod()) - .addMethod(getGetApiMethod()) - .addMethod(getCreateApiMethod()) - .addMethod(getUpdateApiMethod()) - .addMethod(getDeleteApiMethod()) - .addMethod(getListApiVersionsMethod()) - .addMethod(getGetApiVersionMethod()) - .addMethod(getCreateApiVersionMethod()) - .addMethod(getUpdateApiVersionMethod()) - .addMethod(getDeleteApiVersionMethod()) - .addMethod(getListApiSpecsMethod()) - .addMethod(getGetApiSpecMethod()) - .addMethod(getGetApiSpecContentsMethod()) - .addMethod(getCreateApiSpecMethod()) - .addMethod(getUpdateApiSpecMethod()) - .addMethod(getDeleteApiSpecMethod()) - .addMethod(getTagApiSpecRevisionMethod()) - .addMethod(getListApiSpecRevisionsMethod()) - .addMethod(getRollbackApiSpecMethod()) - .addMethod(getDeleteApiSpecRevisionMethod()) - .addMethod(getListApiDeploymentsMethod()) - .addMethod(getGetApiDeploymentMethod()) - .addMethod(getCreateApiDeploymentMethod()) - .addMethod(getUpdateApiDeploymentMethod()) - .addMethod(getDeleteApiDeploymentMethod()) - .addMethod(getTagApiDeploymentRevisionMethod()) - .addMethod(getListApiDeploymentRevisionsMethod()) - .addMethod(getRollbackApiDeploymentMethod()) - .addMethod(getDeleteApiDeploymentRevisionMethod()) - .addMethod(getListArtifactsMethod()) - .addMethod(getGetArtifactMethod()) - .addMethod(getGetArtifactContentsMethod()) - .addMethod(getCreateArtifactMethod()) - .addMethod(getReplaceArtifactMethod()) - .addMethod(getDeleteArtifactMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Api.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Api.java deleted file mode 100644 index d69491740f27..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Api.java +++ /dev/null @@ -1,2694 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_models.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * A top-level description of an API.
- * Produced by producers and are commitments to provide services.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.Api} - */ -public final class Api extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.Api) - ApiOrBuilder { -private static final long serialVersionUID = 0L; - // Use Api.newBuilder() to construct. - private Api(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Api() { - name_ = ""; - displayName_ = ""; - description_ = ""; - availability_ = ""; - recommendedVersion_ = ""; - recommendedDeployment_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Api(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Api( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - availability_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - recommendedVersion_ = s; - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - recommendedDeployment_ = s; - break; - } - case 74: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put( - labels__.getKey(), labels__.getValue()); - break; - } - case 82: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - annotations_ = com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - annotations__ = input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - annotations_.getMutableMap().put( - annotations__.getKey(), annotations__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 9: - return internalGetLabels(); - case 10: - return internalGetAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.Api.class, com.google.cloud.apigeeregistry.v1.Api.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @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; - } - } - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @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; - private volatile java.lang.Object description_; - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. Creation 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 createTime_ != null; - } - /** - *
-   * Output only. Creation 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. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. Last 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 updateTime_ != null; - } - /** - *
-   * Output only. Last 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. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int AVAILABILITY_FIELD_NUMBER = 6; - private volatile java.lang.Object availability_; - /** - *
-   * A user-definable description of the availability of this service.
-   * Format: free-form, but we expect single words that describe availability,
-   * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
-   * 
- * - * string availability = 6; - * @return The availability. - */ - @java.lang.Override - public java.lang.String getAvailability() { - java.lang.Object ref = availability_; - 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(); - availability_ = s; - return s; - } - } - /** - *
-   * A user-definable description of the availability of this service.
-   * Format: free-form, but we expect single words that describe availability,
-   * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
-   * 
- * - * string availability = 6; - * @return The bytes for availability. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAvailabilityBytes() { - java.lang.Object ref = availability_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - availability_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RECOMMENDED_VERSION_FIELD_NUMBER = 7; - private volatile java.lang.Object recommendedVersion_; - /** - *
-   * The recommended version of the API.
-   * Format: `apis/{api}/versions/{version}`
-   * 
- * - * string recommended_version = 7 [(.google.api.resource_reference) = { ... } - * @return The recommendedVersion. - */ - @java.lang.Override - public java.lang.String getRecommendedVersion() { - java.lang.Object ref = recommendedVersion_; - 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(); - recommendedVersion_ = s; - return s; - } - } - /** - *
-   * The recommended version of the API.
-   * Format: `apis/{api}/versions/{version}`
-   * 
- * - * string recommended_version = 7 [(.google.api.resource_reference) = { ... } - * @return The bytes for recommendedVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRecommendedVersionBytes() { - java.lang.Object ref = recommendedVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - recommendedVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RECOMMENDED_DEPLOYMENT_FIELD_NUMBER = 8; - private volatile java.lang.Object recommendedDeployment_; - /** - *
-   * The recommended deployment of the API.
-   * Format: `apis/{api}/deployments/{deployment}`
-   * 
- * - * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } - * @return The recommendedDeployment. - */ - @java.lang.Override - public java.lang.String getRecommendedDeployment() { - java.lang.Object ref = recommendedDeployment_; - 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(); - recommendedDeployment_ = s; - return s; - } - } - /** - *
-   * The recommended deployment of the API.
-   * Format: `apis/{api}/deployments/{deployment}`
-   * 
- * - * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for recommendedDeployment. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRecommendedDeploymentBytes() { - java.lang.Object ref = recommendedDeployment_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - recommendedDeployment_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 9; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 9; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 9; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 9; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 9; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ANNOTATIONS_FIELD_NUMBER = 10; - private static final class AnnotationsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_AnnotationsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> annotations_; - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 10; - */ - - @java.lang.Override - public boolean containsAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetAnnotations().getMap().containsKey(key); - } - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 10; - */ - @java.lang.Override - - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 10; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 10; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (createTime_ != null) { - output.writeMessage(4, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(5, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(availability_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, availability_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recommendedVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, recommendedVersion_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recommendedDeployment_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, recommendedDeployment_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 9); - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetAnnotations(), - AnnotationsDefaultEntryHolder.defaultEntry, - 10); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(availability_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, availability_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recommendedVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, recommendedVersion_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recommendedDeployment_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, recommendedDeployment_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, labels__); - } - for (java.util.Map.Entry entry - : internalGetAnnotations().getMap().entrySet()) { - com.google.protobuf.MapEntry - annotations__ = AnnotationsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, annotations__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.Api)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.Api other = (com.google.cloud.apigeeregistry.v1.Api) 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 (!getAvailability() - .equals(other.getAvailability())) return false; - if (!getRecommendedVersion() - .equals(other.getRecommendedVersion())) return false; - if (!getRecommendedDeployment() - .equals(other.getRecommendedDeployment())) return false; - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!internalGetAnnotations().equals( - other.internalGetAnnotations())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + 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 = (37 * hash) + AVAILABILITY_FIELD_NUMBER; - hash = (53 * hash) + getAvailability().hashCode(); - hash = (37 * hash) + RECOMMENDED_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getRecommendedVersion().hashCode(); - hash = (37 * hash) + RECOMMENDED_DEPLOYMENT_FIELD_NUMBER; - hash = (53 * hash) + getRecommendedDeployment().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (!internalGetAnnotations().getMap().isEmpty()) { - hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetAnnotations().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.Api parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Api 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.apigeeregistry.v1.Api parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Api parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Api parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Api parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Api parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Api parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Api parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Api parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Api parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Api parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.Api prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A top-level description of an API.
-   * Produced by producers and are commitments to provide services.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.Api} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.Api) - com.google.cloud.apigeeregistry.v1.ApiOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 9: - return internalGetLabels(); - case 10: - return internalGetAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 9: - return internalGetMutableLabels(); - case 10: - return internalGetMutableAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.Api.class, com.google.cloud.apigeeregistry.v1.Api.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.Api.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - availability_ = ""; - - recommendedVersion_ = ""; - - recommendedDeployment_ = ""; - - internalGetMutableLabels().clear(); - internalGetMutableAnnotations().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Api_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Api getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Api build() { - com.google.cloud.apigeeregistry.v1.Api result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Api buildPartial() { - com.google.cloud.apigeeregistry.v1.Api result = new com.google.cloud.apigeeregistry.v1.Api(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.availability_ = availability_; - result.recommendedVersion_ = recommendedVersion_; - result.recommendedDeployment_ = recommendedDeployment_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.annotations_ = internalGetAnnotations(); - result.annotations_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.Api) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.Api)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.Api other) { - if (other == com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.getAvailability().isEmpty()) { - availability_ = other.availability_; - onChanged(); - } - if (!other.getRecommendedVersion().isEmpty()) { - recommendedVersion_ = other.recommendedVersion_; - onChanged(); - } - if (!other.getRecommendedDeployment().isEmpty()) { - recommendedDeployment_ = other.recommendedDeployment_; - onChanged(); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - internalGetMutableAnnotations().mergeFrom( - other.internalGetAnnotations()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.Api parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.Api) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - } - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - } - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - onChanged(); - return this; - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. Creation 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. Creation 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; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Creation 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(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Creation 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 (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Creation 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. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. Last 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 updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * Output only. Last 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. Last 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; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Last 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(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Last 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 (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Last 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. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private java.lang.Object availability_ = ""; - /** - *
-     * A user-definable description of the availability of this service.
-     * Format: free-form, but we expect single words that describe availability,
-     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
-     * 
- * - * string availability = 6; - * @return The availability. - */ - public java.lang.String getAvailability() { - java.lang.Object ref = availability_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - availability_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A user-definable description of the availability of this service.
-     * Format: free-form, but we expect single words that describe availability,
-     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
-     * 
- * - * string availability = 6; - * @return The bytes for availability. - */ - public com.google.protobuf.ByteString - getAvailabilityBytes() { - java.lang.Object ref = availability_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - availability_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A user-definable description of the availability of this service.
-     * Format: free-form, but we expect single words that describe availability,
-     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
-     * 
- * - * string availability = 6; - * @param value The availability to set. - * @return This builder for chaining. - */ - public Builder setAvailability( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - availability_ = value; - onChanged(); - return this; - } - /** - *
-     * A user-definable description of the availability of this service.
-     * Format: free-form, but we expect single words that describe availability,
-     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
-     * 
- * - * string availability = 6; - * @return This builder for chaining. - */ - public Builder clearAvailability() { - - availability_ = getDefaultInstance().getAvailability(); - onChanged(); - return this; - } - /** - *
-     * A user-definable description of the availability of this service.
-     * Format: free-form, but we expect single words that describe availability,
-     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
-     * 
- * - * string availability = 6; - * @param value The bytes for availability to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - availability_ = value; - onChanged(); - return this; - } - - private java.lang.Object recommendedVersion_ = ""; - /** - *
-     * The recommended version of the API.
-     * Format: `apis/{api}/versions/{version}`
-     * 
- * - * string recommended_version = 7 [(.google.api.resource_reference) = { ... } - * @return The recommendedVersion. - */ - public java.lang.String getRecommendedVersion() { - java.lang.Object ref = recommendedVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - recommendedVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The recommended version of the API.
-     * Format: `apis/{api}/versions/{version}`
-     * 
- * - * string recommended_version = 7 [(.google.api.resource_reference) = { ... } - * @return The bytes for recommendedVersion. - */ - public com.google.protobuf.ByteString - getRecommendedVersionBytes() { - java.lang.Object ref = recommendedVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - recommendedVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The recommended version of the API.
-     * Format: `apis/{api}/versions/{version}`
-     * 
- * - * string recommended_version = 7 [(.google.api.resource_reference) = { ... } - * @param value The recommendedVersion to set. - * @return This builder for chaining. - */ - public Builder setRecommendedVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - recommendedVersion_ = value; - onChanged(); - return this; - } - /** - *
-     * The recommended version of the API.
-     * Format: `apis/{api}/versions/{version}`
-     * 
- * - * string recommended_version = 7 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearRecommendedVersion() { - - recommendedVersion_ = getDefaultInstance().getRecommendedVersion(); - onChanged(); - return this; - } - /** - *
-     * The recommended version of the API.
-     * Format: `apis/{api}/versions/{version}`
-     * 
- * - * string recommended_version = 7 [(.google.api.resource_reference) = { ... } - * @param value The bytes for recommendedVersion to set. - * @return This builder for chaining. - */ - public Builder setRecommendedVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - recommendedVersion_ = value; - onChanged(); - return this; - } - - private java.lang.Object recommendedDeployment_ = ""; - /** - *
-     * The recommended deployment of the API.
-     * Format: `apis/{api}/deployments/{deployment}`
-     * 
- * - * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } - * @return The recommendedDeployment. - */ - public java.lang.String getRecommendedDeployment() { - java.lang.Object ref = recommendedDeployment_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - recommendedDeployment_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The recommended deployment of the API.
-     * Format: `apis/{api}/deployments/{deployment}`
-     * 
- * - * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for recommendedDeployment. - */ - public com.google.protobuf.ByteString - getRecommendedDeploymentBytes() { - java.lang.Object ref = recommendedDeployment_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - recommendedDeployment_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The recommended deployment of the API.
-     * Format: `apis/{api}/deployments/{deployment}`
-     * 
- * - * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } - * @param value The recommendedDeployment to set. - * @return This builder for chaining. - */ - public Builder setRecommendedDeployment( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - recommendedDeployment_ = value; - onChanged(); - return this; - } - /** - *
-     * The recommended deployment of the API.
-     * Format: `apis/{api}/deployments/{deployment}`
-     * 
- * - * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearRecommendedDeployment() { - - recommendedDeployment_ = getDefaultInstance().getRecommendedDeployment(); - onChanged(); - return this; - } - /** - *
-     * The recommended deployment of the API.
-     * Format: `apis/{api}/deployments/{deployment}`
-     * 
- * - * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } - * @param value The bytes for recommendedDeployment to set. - * @return This builder for chaining. - */ - public Builder setRecommendedDeploymentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - recommendedDeployment_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged();; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 9; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 9; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 9; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 9; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 9; - */ - - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 9; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableLabels().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 9; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> annotations_; - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - private com.google.protobuf.MapField - internalGetMutableAnnotations() { - onChanged();; - if (annotations_ == null) { - annotations_ = com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - if (!annotations_.isMutable()) { - annotations_ = annotations_.copy(); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 10; - */ - - @java.lang.Override - public boolean containsAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetAnnotations().getMap().containsKey(key); - } - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 10; - */ - @java.lang.Override - - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 10; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 10; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearAnnotations() { - internalGetMutableAnnotations().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 10; - */ - - public Builder removeAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableAnnotations().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableAnnotations() { - return internalGetMutableAnnotations().getMutableMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 10; - */ - public Builder putAnnotations( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableAnnotations().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 10; - */ - - public Builder putAllAnnotations( - java.util.Map values) { - internalGetMutableAnnotations().getMutableMap() - .putAll(values); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.Api) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.Api) - private static final com.google.cloud.apigeeregistry.v1.Api DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.Api(); - } - - public static com.google.cloud.apigeeregistry.v1.Api getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Api parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Api(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Api getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeployment.java deleted file mode 100644 index 6996e3f80b1c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeployment.java +++ /dev/null @@ -1,3462 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_models.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Describes a service running at particular address that
- * provides a particular version of an API. ApiDeployments have revisions which
- * correspond to different configurations of a single deployment in time.
- * Revision identifiers should be updated whenever the served API spec or
- * endpoint address changes.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiDeployment} - */ -public final class ApiDeployment extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ApiDeployment) - ApiDeploymentOrBuilder { -private static final long serialVersionUID = 0L; - // Use ApiDeployment.newBuilder() to construct. - private ApiDeployment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ApiDeployment() { - name_ = ""; - displayName_ = ""; - description_ = ""; - revisionId_ = ""; - apiSpecRevision_ = ""; - endpointUri_ = ""; - externalChannelUri_ = ""; - intendedAudience_ = ""; - accessGuidance_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ApiDeployment(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ApiDeployment( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - revisionId_ = s; - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (revisionCreateTime_ != null) { - subBuilder = revisionCreateTime_.toBuilder(); - } - revisionCreateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(revisionCreateTime_); - revisionCreateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (revisionUpdateTime_ != null) { - subBuilder = revisionUpdateTime_.toBuilder(); - } - revisionUpdateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(revisionUpdateTime_); - revisionUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - apiSpecRevision_ = s; - break; - } - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - - endpointUri_ = s; - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - - externalChannelUri_ = s; - break; - } - case 90: { - java.lang.String s = input.readStringRequireUtf8(); - - intendedAudience_ = s; - break; - } - case 98: { - java.lang.String s = input.readStringRequireUtf8(); - - accessGuidance_ = s; - break; - } - case 114: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put( - labels__.getKey(), labels__.getValue()); - break; - } - case 122: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - annotations_ = com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - annotations__ = input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - annotations_.getMutableMap().put( - annotations__.getKey(), annotations__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 14: - return internalGetLabels(); - case 15: - return internalGetAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ApiDeployment.class, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @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; - } - } - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @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; - private volatile java.lang.Object description_; - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object revisionId_; - /** - *
-   * Output only. Immutable. The revision ID of the deployment.
-   * A new revision is committed whenever the deployment contents are changed.
-   * The format is an 8-character hexadecimal string.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - 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(); - revisionId_ = s; - return s; - } - } - /** - *
-   * Output only. Immutable. The revision ID of the deployment.
-   * A new revision is committed whenever the deployment contents are changed.
-   * The format is an 8-character hexadecimal string.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. Creation timestamp; when the deployment resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. Creation timestamp; when the deployment resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. Creation timestamp; when the deployment resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int REVISION_CREATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp revisionCreateTime_; - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionCreateTime field is set. - */ - @java.lang.Override - public boolean hasRevisionCreateTime() { - return revisionCreateTime_ != null; - } - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionCreateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getRevisionCreateTime() { - return revisionCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; - } - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { - return getRevisionCreateTime(); - } - - public static final int REVISION_UPDATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp revisionUpdateTime_; - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionUpdateTime field is set. - */ - @java.lang.Override - public boolean hasRevisionUpdateTime() { - return revisionUpdateTime_ != null; - } - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getRevisionUpdateTime() { - return revisionUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; - } - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder() { - return getRevisionUpdateTime(); - } - - public static final int API_SPEC_REVISION_FIELD_NUMBER = 8; - private volatile java.lang.Object apiSpecRevision_; - /** - *
-   * The full resource name (including revision ID) of the spec of the API being
-   * served by the deployment. Changes to this value will update the revision.
-   * Format: `apis/{api}/deployments/{deployment}`
-   * 
- * - * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } - * @return The apiSpecRevision. - */ - @java.lang.Override - public java.lang.String getApiSpecRevision() { - java.lang.Object ref = apiSpecRevision_; - 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(); - apiSpecRevision_ = s; - return s; - } - } - /** - *
-   * The full resource name (including revision ID) of the spec of the API being
-   * served by the deployment. Changes to this value will update the revision.
-   * Format: `apis/{api}/deployments/{deployment}`
-   * 
- * - * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for apiSpecRevision. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getApiSpecRevisionBytes() { - java.lang.Object ref = apiSpecRevision_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiSpecRevision_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENDPOINT_URI_FIELD_NUMBER = 9; - private volatile java.lang.Object endpointUri_; - /** - *
-   * The address where the deployment is serving. Changes to this value will
-   * update the revision.
-   * 
- * - * string endpoint_uri = 9; - * @return The endpointUri. - */ - @java.lang.Override - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - 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(); - endpointUri_ = s; - return s; - } - } - /** - *
-   * The address where the deployment is serving. Changes to this value will
-   * update the revision.
-   * 
- * - * string endpoint_uri = 9; - * @return The bytes for endpointUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTERNAL_CHANNEL_URI_FIELD_NUMBER = 10; - private volatile java.lang.Object externalChannelUri_; - /** - *
-   * The address of the external channel of the API (e.g., the Developer
-   * Portal). Changes to this value will not affect the revision.
-   * 
- * - * string external_channel_uri = 10; - * @return The externalChannelUri. - */ - @java.lang.Override - public java.lang.String getExternalChannelUri() { - java.lang.Object ref = externalChannelUri_; - 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(); - externalChannelUri_ = s; - return s; - } - } - /** - *
-   * The address of the external channel of the API (e.g., the Developer
-   * Portal). Changes to this value will not affect the revision.
-   * 
- * - * string external_channel_uri = 10; - * @return The bytes for externalChannelUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExternalChannelUriBytes() { - java.lang.Object ref = externalChannelUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - externalChannelUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INTENDED_AUDIENCE_FIELD_NUMBER = 11; - private volatile java.lang.Object intendedAudience_; - /** - *
-   * Text briefly identifying the intended audience of the API. Changes to this
-   * value will not affect the revision.
-   * 
- * - * string intended_audience = 11; - * @return The intendedAudience. - */ - @java.lang.Override - public java.lang.String getIntendedAudience() { - java.lang.Object ref = intendedAudience_; - 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(); - intendedAudience_ = s; - return s; - } - } - /** - *
-   * Text briefly identifying the intended audience of the API. Changes to this
-   * value will not affect the revision.
-   * 
- * - * string intended_audience = 11; - * @return The bytes for intendedAudience. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIntendedAudienceBytes() { - java.lang.Object ref = intendedAudience_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - intendedAudience_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACCESS_GUIDANCE_FIELD_NUMBER = 12; - private volatile java.lang.Object accessGuidance_; - /** - *
-   * Text briefly describing how to access the endpoint. Changes to this value
-   * will not affect the revision.
-   * 
- * - * string access_guidance = 12; - * @return The accessGuidance. - */ - @java.lang.Override - public java.lang.String getAccessGuidance() { - java.lang.Object ref = accessGuidance_; - 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(); - accessGuidance_ = s; - return s; - } - } - /** - *
-   * Text briefly describing how to access the endpoint. Changes to this value
-   * will not affect the revision.
-   * 
- * - * string access_guidance = 12; - * @return The bytes for accessGuidance. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAccessGuidanceBytes() { - java.lang.Object ref = accessGuidance_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - accessGuidance_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 14; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ANNOTATIONS_FIELD_NUMBER = 15; - private static final class AnnotationsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_AnnotationsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> annotations_; - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - - @java.lang.Override - public boolean containsAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetAnnotations().getMap().containsKey(key); - } - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, revisionId_); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (revisionCreateTime_ != null) { - output.writeMessage(6, getRevisionCreateTime()); - } - if (revisionUpdateTime_ != null) { - output.writeMessage(7, getRevisionUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiSpecRevision_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, apiSpecRevision_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, endpointUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalChannelUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, externalChannelUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(intendedAudience_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, intendedAudience_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessGuidance_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, accessGuidance_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 14); - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetAnnotations(), - AnnotationsDefaultEntryHolder.defaultEntry, - 15); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, revisionId_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getCreateTime()); - } - if (revisionCreateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getRevisionCreateTime()); - } - if (revisionUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getRevisionUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiSpecRevision_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, apiSpecRevision_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, endpointUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalChannelUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, externalChannelUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(intendedAudience_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, intendedAudience_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessGuidance_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, accessGuidance_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, labels__); - } - for (java.util.Map.Entry entry - : internalGetAnnotations().getMap().entrySet()) { - com.google.protobuf.MapEntry - annotations__ = AnnotationsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, annotations__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ApiDeployment)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ApiDeployment other = (com.google.cloud.apigeeregistry.v1.ApiDeployment) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getRevisionId() - .equals(other.getRevisionId())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasRevisionCreateTime() != other.hasRevisionCreateTime()) return false; - if (hasRevisionCreateTime()) { - if (!getRevisionCreateTime() - .equals(other.getRevisionCreateTime())) return false; - } - if (hasRevisionUpdateTime() != other.hasRevisionUpdateTime()) return false; - if (hasRevisionUpdateTime()) { - if (!getRevisionUpdateTime() - .equals(other.getRevisionUpdateTime())) return false; - } - if (!getApiSpecRevision() - .equals(other.getApiSpecRevision())) return false; - if (!getEndpointUri() - .equals(other.getEndpointUri())) return false; - if (!getExternalChannelUri() - .equals(other.getExternalChannelUri())) return false; - if (!getIntendedAudience() - .equals(other.getIntendedAudience())) return false; - if (!getAccessGuidance() - .equals(other.getAccessGuidance())) return false; - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!internalGetAnnotations().equals( - other.internalGetAnnotations())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasRevisionCreateTime()) { - hash = (37 * hash) + REVISION_CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getRevisionCreateTime().hashCode(); - } - if (hasRevisionUpdateTime()) { - hash = (37 * hash) + REVISION_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getRevisionUpdateTime().hashCode(); - } - hash = (37 * hash) + API_SPEC_REVISION_FIELD_NUMBER; - hash = (53 * hash) + getApiSpecRevision().hashCode(); - hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUri().hashCode(); - hash = (37 * hash) + EXTERNAL_CHANNEL_URI_FIELD_NUMBER; - hash = (53 * hash) + getExternalChannelUri().hashCode(); - hash = (37 * hash) + INTENDED_AUDIENCE_FIELD_NUMBER; - hash = (53 * hash) + getIntendedAudience().hashCode(); - hash = (37 * hash) + ACCESS_GUIDANCE_FIELD_NUMBER; - hash = (53 * hash) + getAccessGuidance().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (!internalGetAnnotations().getMap().isEmpty()) { - hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetAnnotations().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ApiDeployment 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.apigeeregistry.v1.ApiDeployment parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ApiDeployment 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.apigeeregistry.v1.ApiDeployment parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ApiDeployment parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ApiDeployment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Describes a service running at particular address that
-   * provides a particular version of an API. ApiDeployments have revisions which
-   * correspond to different configurations of a single deployment in time.
-   * Revision identifiers should be updated whenever the served API spec or
-   * endpoint address changes.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiDeployment} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ApiDeployment) - com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 14: - return internalGetLabels(); - case 15: - return internalGetAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 14: - return internalGetMutableLabels(); - case 15: - return internalGetMutableAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ApiDeployment.class, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ApiDeployment.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - revisionId_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = null; - } else { - revisionCreateTime_ = null; - revisionCreateTimeBuilder_ = null; - } - if (revisionUpdateTimeBuilder_ == null) { - revisionUpdateTime_ = null; - } else { - revisionUpdateTime_ = null; - revisionUpdateTimeBuilder_ = null; - } - apiSpecRevision_ = ""; - - endpointUri_ = ""; - - externalChannelUri_ = ""; - - intendedAudience_ = ""; - - accessGuidance_ = ""; - - internalGetMutableLabels().clear(); - internalGetMutableAnnotations().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiDeployment_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeployment getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeployment build() { - com.google.cloud.apigeeregistry.v1.ApiDeployment result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeployment buildPartial() { - com.google.cloud.apigeeregistry.v1.ApiDeployment result = new com.google.cloud.apigeeregistry.v1.ApiDeployment(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - result.revisionId_ = revisionId_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (revisionCreateTimeBuilder_ == null) { - result.revisionCreateTime_ = revisionCreateTime_; - } else { - result.revisionCreateTime_ = revisionCreateTimeBuilder_.build(); - } - if (revisionUpdateTimeBuilder_ == null) { - result.revisionUpdateTime_ = revisionUpdateTime_; - } else { - result.revisionUpdateTime_ = revisionUpdateTimeBuilder_.build(); - } - result.apiSpecRevision_ = apiSpecRevision_; - result.endpointUri_ = endpointUri_; - result.externalChannelUri_ = externalChannelUri_; - result.intendedAudience_ = intendedAudience_; - result.accessGuidance_ = accessGuidance_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.annotations_ = internalGetAnnotations(); - result.annotations_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ApiDeployment) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ApiDeployment)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ApiDeployment other) { - if (other == com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getRevisionId().isEmpty()) { - revisionId_ = other.revisionId_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasRevisionCreateTime()) { - mergeRevisionCreateTime(other.getRevisionCreateTime()); - } - if (other.hasRevisionUpdateTime()) { - mergeRevisionUpdateTime(other.getRevisionUpdateTime()); - } - if (!other.getApiSpecRevision().isEmpty()) { - apiSpecRevision_ = other.apiSpecRevision_; - onChanged(); - } - if (!other.getEndpointUri().isEmpty()) { - endpointUri_ = other.endpointUri_; - onChanged(); - } - if (!other.getExternalChannelUri().isEmpty()) { - externalChannelUri_ = other.externalChannelUri_; - onChanged(); - } - if (!other.getIntendedAudience().isEmpty()) { - intendedAudience_ = other.intendedAudience_; - onChanged(); - } - if (!other.getAccessGuidance().isEmpty()) { - accessGuidance_ = other.accessGuidance_; - onChanged(); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - internalGetMutableAnnotations().mergeFrom( - other.internalGetAnnotations()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ApiDeployment parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ApiDeployment) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - } - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - } - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - onChanged(); - return this; - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.lang.Object revisionId_ = ""; - /** - *
-     * Output only. Immutable. The revision ID of the deployment.
-     * A new revision is committed whenever the deployment contents are changed.
-     * The format is an 8-character hexadecimal string.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Immutable. The revision ID of the deployment.
-     * A new revision is committed whenever the deployment contents are changed.
-     * The format is an 8-character hexadecimal string.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Immutable. The revision ID of the deployment.
-     * A new revision is committed whenever the deployment contents are changed.
-     * The format is an 8-character hexadecimal string.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - revisionId_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Immutable. The revision ID of the deployment.
-     * A new revision is committed whenever the deployment contents are changed.
-     * The format is an 8-character hexadecimal string.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - - revisionId_ = getDefaultInstance().getRevisionId(); - onChanged(); - return this; - } - /** - *
-     * Output only. Immutable. The revision ID of the deployment.
-     * A new revision is committed whenever the deployment contents are changed.
-     * The format is an 8-character hexadecimal string.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - revisionId_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. Creation timestamp; when the deployment resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. Creation timestamp; when the deployment resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.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. Creation timestamp; when the deployment resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp; when the deployment resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp; when the deployment resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp; when the deployment resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Creation timestamp; when the deployment resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Creation timestamp; when the deployment resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.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. Creation timestamp; when the deployment resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp revisionCreateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> revisionCreateTimeBuilder_; - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionCreateTime field is set. - */ - public boolean hasRevisionCreateTime() { - return revisionCreateTimeBuilder_ != null || revisionCreateTime_ != null; - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionCreateTime. - */ - public com.google.protobuf.Timestamp getRevisionCreateTime() { - if (revisionCreateTimeBuilder_ == null) { - return revisionCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; - } else { - return revisionCreateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setRevisionCreateTime(com.google.protobuf.Timestamp value) { - if (revisionCreateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - revisionCreateTime_ = value; - onChanged(); - } else { - revisionCreateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setRevisionCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = builderForValue.build(); - onChanged(); - } else { - revisionCreateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeRevisionCreateTime(com.google.protobuf.Timestamp value) { - if (revisionCreateTimeBuilder_ == null) { - if (revisionCreateTime_ != null) { - revisionCreateTime_ = - com.google.protobuf.Timestamp.newBuilder(revisionCreateTime_).mergeFrom(value).buildPartial(); - } else { - revisionCreateTime_ = value; - } - onChanged(); - } else { - revisionCreateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearRevisionCreateTime() { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = null; - onChanged(); - } else { - revisionCreateTime_ = null; - revisionCreateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getRevisionCreateTimeBuilder() { - - onChanged(); - return getRevisionCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { - if (revisionCreateTimeBuilder_ != null) { - return revisionCreateTimeBuilder_.getMessageOrBuilder(); - } else { - return revisionCreateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; - } - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getRevisionCreateTimeFieldBuilder() { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getRevisionCreateTime(), - getParentForChildren(), - isClean()); - revisionCreateTime_ = null; - } - return revisionCreateTimeBuilder_; - } - - private com.google.protobuf.Timestamp revisionUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> revisionUpdateTimeBuilder_; - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionUpdateTime field is set. - */ - public boolean hasRevisionUpdateTime() { - return revisionUpdateTimeBuilder_ != null || revisionUpdateTime_ != null; - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionUpdateTime. - */ - public com.google.protobuf.Timestamp getRevisionUpdateTime() { - if (revisionUpdateTimeBuilder_ == null) { - return revisionUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; - } else { - return revisionUpdateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setRevisionUpdateTime(com.google.protobuf.Timestamp value) { - if (revisionUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - revisionUpdateTime_ = value; - onChanged(); - } else { - revisionUpdateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setRevisionUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (revisionUpdateTimeBuilder_ == null) { - revisionUpdateTime_ = builderForValue.build(); - onChanged(); - } else { - revisionUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeRevisionUpdateTime(com.google.protobuf.Timestamp value) { - if (revisionUpdateTimeBuilder_ == null) { - if (revisionUpdateTime_ != null) { - revisionUpdateTime_ = - com.google.protobuf.Timestamp.newBuilder(revisionUpdateTime_).mergeFrom(value).buildPartial(); - } else { - revisionUpdateTime_ = value; - } - onChanged(); - } else { - revisionUpdateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearRevisionUpdateTime() { - if (revisionUpdateTimeBuilder_ == null) { - revisionUpdateTime_ = null; - onChanged(); - } else { - revisionUpdateTime_ = null; - revisionUpdateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getRevisionUpdateTimeBuilder() { - - onChanged(); - return getRevisionUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder() { - if (revisionUpdateTimeBuilder_ != null) { - return revisionUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return revisionUpdateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; - } - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getRevisionUpdateTimeFieldBuilder() { - if (revisionUpdateTimeBuilder_ == null) { - revisionUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getRevisionUpdateTime(), - getParentForChildren(), - isClean()); - revisionUpdateTime_ = null; - } - return revisionUpdateTimeBuilder_; - } - - private java.lang.Object apiSpecRevision_ = ""; - /** - *
-     * The full resource name (including revision ID) of the spec of the API being
-     * served by the deployment. Changes to this value will update the revision.
-     * Format: `apis/{api}/deployments/{deployment}`
-     * 
- * - * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } - * @return The apiSpecRevision. - */ - public java.lang.String getApiSpecRevision() { - java.lang.Object ref = apiSpecRevision_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiSpecRevision_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full resource name (including revision ID) of the spec of the API being
-     * served by the deployment. Changes to this value will update the revision.
-     * Format: `apis/{api}/deployments/{deployment}`
-     * 
- * - * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for apiSpecRevision. - */ - public com.google.protobuf.ByteString - getApiSpecRevisionBytes() { - java.lang.Object ref = apiSpecRevision_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiSpecRevision_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full resource name (including revision ID) of the spec of the API being
-     * served by the deployment. Changes to this value will update the revision.
-     * Format: `apis/{api}/deployments/{deployment}`
-     * 
- * - * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } - * @param value The apiSpecRevision to set. - * @return This builder for chaining. - */ - public Builder setApiSpecRevision( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - apiSpecRevision_ = value; - onChanged(); - return this; - } - /** - *
-     * The full resource name (including revision ID) of the spec of the API being
-     * served by the deployment. Changes to this value will update the revision.
-     * Format: `apis/{api}/deployments/{deployment}`
-     * 
- * - * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearApiSpecRevision() { - - apiSpecRevision_ = getDefaultInstance().getApiSpecRevision(); - onChanged(); - return this; - } - /** - *
-     * The full resource name (including revision ID) of the spec of the API being
-     * served by the deployment. Changes to this value will update the revision.
-     * Format: `apis/{api}/deployments/{deployment}`
-     * 
- * - * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } - * @param value The bytes for apiSpecRevision to set. - * @return This builder for chaining. - */ - public Builder setApiSpecRevisionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - apiSpecRevision_ = value; - onChanged(); - return this; - } - - private java.lang.Object endpointUri_ = ""; - /** - *
-     * The address where the deployment is serving. Changes to this value will
-     * update the revision.
-     * 
- * - * string endpoint_uri = 9; - * @return The endpointUri. - */ - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The address where the deployment is serving. Changes to this value will
-     * update the revision.
-     * 
- * - * string endpoint_uri = 9; - * @return The bytes for endpointUri. - */ - public com.google.protobuf.ByteString - getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The address where the deployment is serving. Changes to this value will
-     * update the revision.
-     * 
- * - * string endpoint_uri = 9; - * @param value The endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - endpointUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The address where the deployment is serving. Changes to this value will
-     * update the revision.
-     * 
- * - * string endpoint_uri = 9; - * @return This builder for chaining. - */ - public Builder clearEndpointUri() { - - endpointUri_ = getDefaultInstance().getEndpointUri(); - onChanged(); - return this; - } - /** - *
-     * The address where the deployment is serving. Changes to this value will
-     * update the revision.
-     * 
- * - * string endpoint_uri = 9; - * @param value The bytes for endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - endpointUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object externalChannelUri_ = ""; - /** - *
-     * The address of the external channel of the API (e.g., the Developer
-     * Portal). Changes to this value will not affect the revision.
-     * 
- * - * string external_channel_uri = 10; - * @return The externalChannelUri. - */ - public java.lang.String getExternalChannelUri() { - java.lang.Object ref = externalChannelUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - externalChannelUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The address of the external channel of the API (e.g., the Developer
-     * Portal). Changes to this value will not affect the revision.
-     * 
- * - * string external_channel_uri = 10; - * @return The bytes for externalChannelUri. - */ - public com.google.protobuf.ByteString - getExternalChannelUriBytes() { - java.lang.Object ref = externalChannelUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - externalChannelUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The address of the external channel of the API (e.g., the Developer
-     * Portal). Changes to this value will not affect the revision.
-     * 
- * - * string external_channel_uri = 10; - * @param value The externalChannelUri to set. - * @return This builder for chaining. - */ - public Builder setExternalChannelUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - externalChannelUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The address of the external channel of the API (e.g., the Developer
-     * Portal). Changes to this value will not affect the revision.
-     * 
- * - * string external_channel_uri = 10; - * @return This builder for chaining. - */ - public Builder clearExternalChannelUri() { - - externalChannelUri_ = getDefaultInstance().getExternalChannelUri(); - onChanged(); - return this; - } - /** - *
-     * The address of the external channel of the API (e.g., the Developer
-     * Portal). Changes to this value will not affect the revision.
-     * 
- * - * string external_channel_uri = 10; - * @param value The bytes for externalChannelUri to set. - * @return This builder for chaining. - */ - public Builder setExternalChannelUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - externalChannelUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object intendedAudience_ = ""; - /** - *
-     * Text briefly identifying the intended audience of the API. Changes to this
-     * value will not affect the revision.
-     * 
- * - * string intended_audience = 11; - * @return The intendedAudience. - */ - public java.lang.String getIntendedAudience() { - java.lang.Object ref = intendedAudience_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - intendedAudience_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Text briefly identifying the intended audience of the API. Changes to this
-     * value will not affect the revision.
-     * 
- * - * string intended_audience = 11; - * @return The bytes for intendedAudience. - */ - public com.google.protobuf.ByteString - getIntendedAudienceBytes() { - java.lang.Object ref = intendedAudience_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - intendedAudience_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Text briefly identifying the intended audience of the API. Changes to this
-     * value will not affect the revision.
-     * 
- * - * string intended_audience = 11; - * @param value The intendedAudience to set. - * @return This builder for chaining. - */ - public Builder setIntendedAudience( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - intendedAudience_ = value; - onChanged(); - return this; - } - /** - *
-     * Text briefly identifying the intended audience of the API. Changes to this
-     * value will not affect the revision.
-     * 
- * - * string intended_audience = 11; - * @return This builder for chaining. - */ - public Builder clearIntendedAudience() { - - intendedAudience_ = getDefaultInstance().getIntendedAudience(); - onChanged(); - return this; - } - /** - *
-     * Text briefly identifying the intended audience of the API. Changes to this
-     * value will not affect the revision.
-     * 
- * - * string intended_audience = 11; - * @param value The bytes for intendedAudience to set. - * @return This builder for chaining. - */ - public Builder setIntendedAudienceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - intendedAudience_ = value; - onChanged(); - return this; - } - - private java.lang.Object accessGuidance_ = ""; - /** - *
-     * Text briefly describing how to access the endpoint. Changes to this value
-     * will not affect the revision.
-     * 
- * - * string access_guidance = 12; - * @return The accessGuidance. - */ - public java.lang.String getAccessGuidance() { - java.lang.Object ref = accessGuidance_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accessGuidance_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Text briefly describing how to access the endpoint. Changes to this value
-     * will not affect the revision.
-     * 
- * - * string access_guidance = 12; - * @return The bytes for accessGuidance. - */ - public com.google.protobuf.ByteString - getAccessGuidanceBytes() { - java.lang.Object ref = accessGuidance_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - accessGuidance_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Text briefly describing how to access the endpoint. Changes to this value
-     * will not affect the revision.
-     * 
- * - * string access_guidance = 12; - * @param value The accessGuidance to set. - * @return This builder for chaining. - */ - public Builder setAccessGuidance( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - accessGuidance_ = value; - onChanged(); - return this; - } - /** - *
-     * Text briefly describing how to access the endpoint. Changes to this value
-     * will not affect the revision.
-     * 
- * - * string access_guidance = 12; - * @return This builder for chaining. - */ - public Builder clearAccessGuidance() { - - accessGuidance_ = getDefaultInstance().getAccessGuidance(); - onChanged(); - return this; - } - /** - *
-     * Text briefly describing how to access the endpoint. Changes to this value
-     * will not affect the revision.
-     * 
- * - * string access_guidance = 12; - * @param value The bytes for accessGuidance to set. - * @return This builder for chaining. - */ - public Builder setAccessGuidanceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - accessGuidance_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged();; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableLabels().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> annotations_; - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - private com.google.protobuf.MapField - internalGetMutableAnnotations() { - onChanged();; - if (annotations_ == null) { - annotations_ = com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - if (!annotations_.isMutable()) { - annotations_ = annotations_.copy(); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - - @java.lang.Override - public boolean containsAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetAnnotations().getMap().containsKey(key); - } - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearAnnotations() { - internalGetMutableAnnotations().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - - public Builder removeAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableAnnotations().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableAnnotations() { - return internalGetMutableAnnotations().getMutableMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - public Builder putAnnotations( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableAnnotations().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - - public Builder putAllAnnotations( - java.util.Map values) { - internalGetMutableAnnotations().getMutableMap() - .putAll(values); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ApiDeployment) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ApiDeployment) - private static final com.google.cloud.apigeeregistry.v1.ApiDeployment DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ApiDeployment(); - } - - public static com.google.cloud.apigeeregistry.v1.ApiDeployment getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ApiDeployment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ApiDeployment(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeployment getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentName.java deleted file mode 100644 index f5242091c949..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentName.java +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ApiDeploymentName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_API_DEPLOYMENT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String api; - private final String deployment; - - @Deprecated - protected ApiDeploymentName() { - project = null; - location = null; - api = null; - deployment = null; - } - - private ApiDeploymentName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - api = Preconditions.checkNotNull(builder.getApi()); - deployment = Preconditions.checkNotNull(builder.getDeployment()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public String getDeployment() { - return deployment; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ApiDeploymentName of( - String project, String location, String api, String deployment) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setDeployment(deployment) - .build(); - } - - public static String format(String project, String location, String api, String deployment) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setDeployment(deployment) - .build() - .toString(); - } - - public static ApiDeploymentName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_API_DEPLOYMENT.validatedMatch( - formattedString, "ApiDeploymentName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("api"), - matchMap.get("deployment")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ApiDeploymentName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_API_DEPLOYMENT.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 (api != null) { - fieldMapBuilder.put("api", api); - } - if (deployment != null) { - fieldMapBuilder.put("deployment", deployment); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_API_DEPLOYMENT.instantiate( - "project", project, "location", location, "api", api, "deployment", deployment); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ApiDeploymentName that = ((ApiDeploymentName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.api, that.api) - && Objects.equals(this.deployment, that.deployment); - } - 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(api); - h *= 1000003; - h ^= Objects.hashCode(deployment); - return h; - } - - /** Builder for projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}. */ - public static class Builder { - private String project; - private String location; - private String api; - private String deployment; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public String getDeployment() { - return deployment; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setApi(String api) { - this.api = api; - return this; - } - - public Builder setDeployment(String deployment) { - this.deployment = deployment; - return this; - } - - private Builder(ApiDeploymentName apiDeploymentName) { - this.project = apiDeploymentName.project; - this.location = apiDeploymentName.location; - this.api = apiDeploymentName.api; - this.deployment = apiDeploymentName.deployment; - } - - public ApiDeploymentName build() { - return new ApiDeploymentName(this); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentOrBuilder.java deleted file mode 100644 index 85d5012ce8db..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiDeploymentOrBuilder.java +++ /dev/null @@ -1,458 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_models.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ApiDeploymentOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ApiDeployment) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. Immutable. The revision ID of the deployment.
-   * A new revision is committed whenever the deployment contents are changed.
-   * The format is an 8-character hexadecimal string.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - *
-   * Output only. Immutable. The revision ID of the deployment.
-   * A new revision is committed whenever the deployment contents are changed.
-   * The format is an 8-character hexadecimal string.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString - getRevisionIdBytes(); - - /** - *
-   * Output only. Creation timestamp; when the deployment resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. Creation timestamp; when the deployment resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. Creation timestamp; when the deployment resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionCreateTime field is set. - */ - boolean hasRevisionCreateTime(); - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionCreateTime. - */ - com.google.protobuf.Timestamp getRevisionCreateTime(); - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder(); - - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionUpdateTime field is set. - */ - boolean hasRevisionUpdateTime(); - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionUpdateTime. - */ - com.google.protobuf.Timestamp getRevisionUpdateTime(); - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder(); - - /** - *
-   * The full resource name (including revision ID) of the spec of the API being
-   * served by the deployment. Changes to this value will update the revision.
-   * Format: `apis/{api}/deployments/{deployment}`
-   * 
- * - * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } - * @return The apiSpecRevision. - */ - java.lang.String getApiSpecRevision(); - /** - *
-   * The full resource name (including revision ID) of the spec of the API being
-   * served by the deployment. Changes to this value will update the revision.
-   * Format: `apis/{api}/deployments/{deployment}`
-   * 
- * - * string api_spec_revision = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for apiSpecRevision. - */ - com.google.protobuf.ByteString - getApiSpecRevisionBytes(); - - /** - *
-   * The address where the deployment is serving. Changes to this value will
-   * update the revision.
-   * 
- * - * string endpoint_uri = 9; - * @return The endpointUri. - */ - java.lang.String getEndpointUri(); - /** - *
-   * The address where the deployment is serving. Changes to this value will
-   * update the revision.
-   * 
- * - * string endpoint_uri = 9; - * @return The bytes for endpointUri. - */ - com.google.protobuf.ByteString - getEndpointUriBytes(); - - /** - *
-   * The address of the external channel of the API (e.g., the Developer
-   * Portal). Changes to this value will not affect the revision.
-   * 
- * - * string external_channel_uri = 10; - * @return The externalChannelUri. - */ - java.lang.String getExternalChannelUri(); - /** - *
-   * The address of the external channel of the API (e.g., the Developer
-   * Portal). Changes to this value will not affect the revision.
-   * 
- * - * string external_channel_uri = 10; - * @return The bytes for externalChannelUri. - */ - com.google.protobuf.ByteString - getExternalChannelUriBytes(); - - /** - *
-   * Text briefly identifying the intended audience of the API. Changes to this
-   * value will not affect the revision.
-   * 
- * - * string intended_audience = 11; - * @return The intendedAudience. - */ - java.lang.String getIntendedAudience(); - /** - *
-   * Text briefly identifying the intended audience of the API. Changes to this
-   * value will not affect the revision.
-   * 
- * - * string intended_audience = 11; - * @return The bytes for intendedAudience. - */ - com.google.protobuf.ByteString - getIntendedAudienceBytes(); - - /** - *
-   * Text briefly describing how to access the endpoint. Changes to this value
-   * will not affect the revision.
-   * 
- * - * string access_guidance = 12; - * @return The accessGuidance. - */ - java.lang.String getAccessGuidance(); - /** - *
-   * Text briefly describing how to access the endpoint. Changes to this value
-   * will not affect the revision.
-   * 
- * - * string access_guidance = 12; - * @return The bytes for accessGuidance. - */ - com.google.protobuf.ByteString - getAccessGuidanceBytes(); - - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - int getLabelsCount(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - int getAnnotationsCount(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - boolean containsAnnotations( - java.lang.String key); - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getAnnotations(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - java.util.Map - getAnnotationsMap(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - - /* nullable */ -java.lang.String getAnnotationsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - - java.lang.String getAnnotationsOrThrow( - java.lang.String key); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiName.java deleted file mode 100644 index 5b44cd304de4..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiName.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ApiName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_API = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/apis/{api}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String api; - - @Deprecated - protected ApiName() { - project = null; - location = null; - api = null; - } - - private ApiName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - api = Preconditions.checkNotNull(builder.getApi()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ApiName of(String project, String location, String api) { - return newBuilder().setProject(project).setLocation(location).setApi(api).build(); - } - - public static String format(String project, String location, String api) { - return newBuilder().setProject(project).setLocation(location).setApi(api).build().toString(); - } - - public static ApiName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_API.validatedMatch( - formattedString, "ApiName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("api")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ApiName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_API.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 (api != null) { - fieldMapBuilder.put("api", api); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_API.instantiate("project", project, "location", location, "api", api); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ApiName that = ((ApiName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.api, that.api); - } - 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(api); - return h; - } - - /** Builder for projects/{project}/locations/{location}/apis/{api}. */ - public static class Builder { - private String project; - private String location; - private String api; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setApi(String api) { - this.api = api; - return this; - } - - private Builder(ApiName apiName) { - this.project = apiName.project; - this.location = apiName.location; - this.api = apiName.api; - } - - public ApiName build() { - return new ApiName(this); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiOrBuilder.java deleted file mode 100644 index 45d4f1728182..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiOrBuilder.java +++ /dev/null @@ -1,363 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_models.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ApiOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.Api) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. Last 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. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * A user-definable description of the availability of this service.
-   * Format: free-form, but we expect single words that describe availability,
-   * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
-   * 
- * - * string availability = 6; - * @return The availability. - */ - java.lang.String getAvailability(); - /** - *
-   * A user-definable description of the availability of this service.
-   * Format: free-form, but we expect single words that describe availability,
-   * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
-   * 
- * - * string availability = 6; - * @return The bytes for availability. - */ - com.google.protobuf.ByteString - getAvailabilityBytes(); - - /** - *
-   * The recommended version of the API.
-   * Format: `apis/{api}/versions/{version}`
-   * 
- * - * string recommended_version = 7 [(.google.api.resource_reference) = { ... } - * @return The recommendedVersion. - */ - java.lang.String getRecommendedVersion(); - /** - *
-   * The recommended version of the API.
-   * Format: `apis/{api}/versions/{version}`
-   * 
- * - * string recommended_version = 7 [(.google.api.resource_reference) = { ... } - * @return The bytes for recommendedVersion. - */ - com.google.protobuf.ByteString - getRecommendedVersionBytes(); - - /** - *
-   * The recommended deployment of the API.
-   * Format: `apis/{api}/deployments/{deployment}`
-   * 
- * - * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } - * @return The recommendedDeployment. - */ - java.lang.String getRecommendedDeployment(); - /** - *
-   * The recommended deployment of the API.
-   * Format: `apis/{api}/deployments/{deployment}`
-   * 
- * - * string recommended_deployment = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for recommendedDeployment. - */ - com.google.protobuf.ByteString - getRecommendedDeploymentBytes(); - - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 9; - */ - int getLabelsCount(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 9; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 9; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 9; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 9; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 10; - */ - int getAnnotationsCount(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 10; - */ - boolean containsAnnotations( - java.lang.String key); - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getAnnotations(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 10; - */ - java.util.Map - getAnnotationsMap(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 10; - */ - - /* nullable */ -java.lang.String getAnnotationsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 10; - */ - - java.lang.String getAnnotationsOrThrow( - java.lang.String key); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpec.java deleted file mode 100644 index 83c75882f81a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpec.java +++ /dev/null @@ -1,3347 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_models.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Describes a version of an API in a structured way.
- * ApiSpecs provide formal descriptions that consumers can use to use a version.
- * ApiSpec resources are intended to be fully-resolved descriptions of an
- * ApiVersion. When specs consist of multiple files, these should be bundled
- * together (e.g., in a zip archive) and stored as a unit. Multiple specs can
- * exist to provide representations in different API description formats.
- * Synchronization of these representations would be provided by tooling and
- * background services.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiSpec} - */ -public final class ApiSpec extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ApiSpec) - ApiSpecOrBuilder { -private static final long serialVersionUID = 0L; - // Use ApiSpec.newBuilder() to construct. - private ApiSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ApiSpec() { - name_ = ""; - filename_ = ""; - description_ = ""; - revisionId_ = ""; - mimeType_ = ""; - hash_ = ""; - sourceUri_ = ""; - contents_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ApiSpec(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ApiSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - filename_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - revisionId_ = s; - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (revisionCreateTime_ != null) { - subBuilder = revisionCreateTime_.toBuilder(); - } - revisionCreateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(revisionCreateTime_); - revisionCreateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (revisionUpdateTime_ != null) { - subBuilder = revisionUpdateTime_.toBuilder(); - } - revisionUpdateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(revisionUpdateTime_); - revisionUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - mimeType_ = s; - break; - } - case 72: { - - sizeBytes_ = input.readInt32(); - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - - hash_ = s; - break; - } - case 90: { - java.lang.String s = input.readStringRequireUtf8(); - - sourceUri_ = s; - break; - } - case 98: { - - contents_ = input.readBytes(); - break; - } - case 114: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put( - labels__.getKey(), labels__.getValue()); - break; - } - case 122: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - annotations_ = com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - annotations__ = input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - annotations_.getMutableMap().put( - annotations__.getKey(), annotations__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 14: - return internalGetLabels(); - case 15: - return internalGetAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ApiSpec.class, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILENAME_FIELD_NUMBER = 2; - private volatile java.lang.Object filename_; - /** - *
-   * A possibly-hierarchical name used to refer to the spec from other specs.
-   * 
- * - * string filename = 2; - * @return The filename. - */ - @java.lang.Override - public java.lang.String getFilename() { - java.lang.Object ref = filename_; - 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(); - filename_ = s; - return s; - } - } - /** - *
-   * A possibly-hierarchical name used to refer to the spec from other specs.
-   * 
- * - * string filename = 2; - * @return The bytes for filename. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilenameBytes() { - java.lang.Object ref = filename_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filename_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object revisionId_; - /** - *
-   * Output only. Immutable. The revision ID of the spec.
-   * A new revision is committed whenever the spec contents are changed.
-   * The format is an 8-character hexadecimal string.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - 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(); - revisionId_ = s; - return s; - } - } - /** - *
-   * Output only. Immutable. The revision ID of the spec.
-   * A new revision is committed whenever the spec contents are changed.
-   * The format is an 8-character hexadecimal string.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. Creation timestamp; when the spec resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. Creation timestamp; when the spec resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. Creation timestamp; when the spec resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int REVISION_CREATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp revisionCreateTime_; - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionCreateTime field is set. - */ - @java.lang.Override - public boolean hasRevisionCreateTime() { - return revisionCreateTime_ != null; - } - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionCreateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getRevisionCreateTime() { - return revisionCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; - } - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { - return getRevisionCreateTime(); - } - - public static final int REVISION_UPDATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp revisionUpdateTime_; - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionUpdateTime field is set. - */ - @java.lang.Override - public boolean hasRevisionUpdateTime() { - return revisionUpdateTime_ != null; - } - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getRevisionUpdateTime() { - return revisionUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; - } - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder() { - return getRevisionUpdateTime(); - } - - public static final int MIME_TYPE_FIELD_NUMBER = 8; - private volatile java.lang.Object mimeType_; - /** - *
-   * A style (format) descriptor for this spec that is specified as a Media Type
-   * (https://en.wikipedia.org/wiki/Media_type). Possible values include
-   * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
-   * `application/vnd.apigee.graphql`, with possible suffixes representing
-   * compression types. These hypothetical names are defined in the vendor tree
-   * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
-   * Content types can specify compression. Currently only GZip compression is
-   * supported (indicated with "+gzip").
-   * 
- * - * string mime_type = 8; - * @return The mimeType. - */ - @java.lang.Override - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - 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(); - mimeType_ = s; - return s; - } - } - /** - *
-   * A style (format) descriptor for this spec that is specified as a Media Type
-   * (https://en.wikipedia.org/wiki/Media_type). Possible values include
-   * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
-   * `application/vnd.apigee.graphql`, with possible suffixes representing
-   * compression types. These hypothetical names are defined in the vendor tree
-   * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
-   * Content types can specify compression. Currently only GZip compression is
-   * supported (indicated with "+gzip").
-   * 
- * - * string mime_type = 8; - * @return The bytes for mimeType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIZE_BYTES_FIELD_NUMBER = 9; - private int sizeBytes_; - /** - *
-   * Output only. The size of the spec file in bytes. If the spec is gzipped, this is the
-   * size of the uncompressed spec.
-   * 
- * - * int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sizeBytes. - */ - @java.lang.Override - public int getSizeBytes() { - return sizeBytes_; - } - - public static final int HASH_FIELD_NUMBER = 10; - private volatile java.lang.Object hash_; - /** - *
-   * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
-   * the hash of the uncompressed spec.
-   * 
- * - * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The hash. - */ - @java.lang.Override - public java.lang.String getHash() { - java.lang.Object ref = hash_; - 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(); - hash_ = s; - return s; - } - } - /** - *
-   * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
-   * the hash of the uncompressed spec.
-   * 
- * - * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_URI_FIELD_NUMBER = 11; - private volatile java.lang.Object sourceUri_; - /** - *
-   * The original source URI of the spec (if one exists).
-   * This is an external location that can be used for reference purposes
-   * but which may not be authoritative since this external resource may
-   * change after the spec is retrieved.
-   * 
- * - * string source_uri = 11; - * @return The sourceUri. - */ - @java.lang.Override - public java.lang.String getSourceUri() { - java.lang.Object ref = sourceUri_; - 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(); - sourceUri_ = s; - return s; - } - } - /** - *
-   * The original source URI of the spec (if one exists).
-   * This is an external location that can be used for reference purposes
-   * but which may not be authoritative since this external resource may
-   * change after the spec is retrieved.
-   * 
- * - * string source_uri = 11; - * @return The bytes for sourceUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceUriBytes() { - java.lang.Object ref = sourceUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONTENTS_FIELD_NUMBER = 12; - private com.google.protobuf.ByteString contents_; - /** - *
-   * Input only. The contents of the spec.
-   * Provided by API callers when specs are created or updated.
-   * To access the contents of a spec, use GetApiSpecContents.
-   * 
- * - * bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return The contents. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContents() { - return contents_; - } - - public static final int LABELS_FIELD_NUMBER = 14; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ANNOTATIONS_FIELD_NUMBER = 15; - private static final class AnnotationsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_AnnotationsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> annotations_; - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - - @java.lang.Override - public boolean containsAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetAnnotations().getMap().containsKey(key); - } - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filename_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filename_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, revisionId_); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (revisionCreateTime_ != null) { - output.writeMessage(6, getRevisionCreateTime()); - } - if (revisionUpdateTime_ != null) { - output.writeMessage(7, getRevisionUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, mimeType_); - } - if (sizeBytes_ != 0) { - output.writeInt32(9, sizeBytes_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, hash_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, sourceUri_); - } - if (!contents_.isEmpty()) { - output.writeBytes(12, contents_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 14); - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetAnnotations(), - AnnotationsDefaultEntryHolder.defaultEntry, - 15); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filename_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filename_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, revisionId_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getCreateTime()); - } - if (revisionCreateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getRevisionCreateTime()); - } - if (revisionUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getRevisionUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, mimeType_); - } - if (sizeBytes_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(9, sizeBytes_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, hash_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, sourceUri_); - } - if (!contents_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(12, contents_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, labels__); - } - for (java.util.Map.Entry entry - : internalGetAnnotations().getMap().entrySet()) { - com.google.protobuf.MapEntry - annotations__ = AnnotationsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, annotations__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ApiSpec)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ApiSpec other = (com.google.cloud.apigeeregistry.v1.ApiSpec) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getFilename() - .equals(other.getFilename())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getRevisionId() - .equals(other.getRevisionId())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasRevisionCreateTime() != other.hasRevisionCreateTime()) return false; - if (hasRevisionCreateTime()) { - if (!getRevisionCreateTime() - .equals(other.getRevisionCreateTime())) return false; - } - if (hasRevisionUpdateTime() != other.hasRevisionUpdateTime()) return false; - if (hasRevisionUpdateTime()) { - if (!getRevisionUpdateTime() - .equals(other.getRevisionUpdateTime())) return false; - } - if (!getMimeType() - .equals(other.getMimeType())) return false; - if (getSizeBytes() - != other.getSizeBytes()) return false; - if (!getHash() - .equals(other.getHash())) return false; - if (!getSourceUri() - .equals(other.getSourceUri())) return false; - if (!getContents() - .equals(other.getContents())) return false; - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!internalGetAnnotations().equals( - other.internalGetAnnotations())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + FILENAME_FIELD_NUMBER; - hash = (53 * hash) + getFilename().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasRevisionCreateTime()) { - hash = (37 * hash) + REVISION_CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getRevisionCreateTime().hashCode(); - } - if (hasRevisionUpdateTime()) { - hash = (37 * hash) + REVISION_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getRevisionUpdateTime().hashCode(); - } - hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (37 * hash) + SIZE_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getSizeBytes(); - hash = (37 * hash) + HASH_FIELD_NUMBER; - hash = (53 * hash) + getHash().hashCode(); - hash = (37 * hash) + SOURCE_URI_FIELD_NUMBER; - hash = (53 * hash) + getSourceUri().hashCode(); - hash = (37 * hash) + CONTENTS_FIELD_NUMBER; - hash = (53 * hash) + getContents().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (!internalGetAnnotations().getMap().isEmpty()) { - hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetAnnotations().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ApiSpec 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.apigeeregistry.v1.ApiSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ApiSpec 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.apigeeregistry.v1.ApiSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ApiSpec parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ApiSpec parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ApiSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ApiSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Describes a version of an API in a structured way.
-   * ApiSpecs provide formal descriptions that consumers can use to use a version.
-   * ApiSpec resources are intended to be fully-resolved descriptions of an
-   * ApiVersion. When specs consist of multiple files, these should be bundled
-   * together (e.g., in a zip archive) and stored as a unit. Multiple specs can
-   * exist to provide representations in different API description formats.
-   * Synchronization of these representations would be provided by tooling and
-   * background services.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiSpec} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ApiSpec) - com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 14: - return internalGetLabels(); - case 15: - return internalGetAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 14: - return internalGetMutableLabels(); - case 15: - return internalGetMutableAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ApiSpec.class, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ApiSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - filename_ = ""; - - description_ = ""; - - revisionId_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = null; - } else { - revisionCreateTime_ = null; - revisionCreateTimeBuilder_ = null; - } - if (revisionUpdateTimeBuilder_ == null) { - revisionUpdateTime_ = null; - } else { - revisionUpdateTime_ = null; - revisionUpdateTimeBuilder_ = null; - } - mimeType_ = ""; - - sizeBytes_ = 0; - - hash_ = ""; - - sourceUri_ = ""; - - contents_ = com.google.protobuf.ByteString.EMPTY; - - internalGetMutableLabels().clear(); - internalGetMutableAnnotations().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpec getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpec build() { - com.google.cloud.apigeeregistry.v1.ApiSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpec buildPartial() { - com.google.cloud.apigeeregistry.v1.ApiSpec result = new com.google.cloud.apigeeregistry.v1.ApiSpec(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.filename_ = filename_; - result.description_ = description_; - result.revisionId_ = revisionId_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (revisionCreateTimeBuilder_ == null) { - result.revisionCreateTime_ = revisionCreateTime_; - } else { - result.revisionCreateTime_ = revisionCreateTimeBuilder_.build(); - } - if (revisionUpdateTimeBuilder_ == null) { - result.revisionUpdateTime_ = revisionUpdateTime_; - } else { - result.revisionUpdateTime_ = revisionUpdateTimeBuilder_.build(); - } - result.mimeType_ = mimeType_; - result.sizeBytes_ = sizeBytes_; - result.hash_ = hash_; - result.sourceUri_ = sourceUri_; - result.contents_ = contents_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.annotations_ = internalGetAnnotations(); - result.annotations_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ApiSpec) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ApiSpec)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ApiSpec other) { - if (other == com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getFilename().isEmpty()) { - filename_ = other.filename_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getRevisionId().isEmpty()) { - revisionId_ = other.revisionId_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasRevisionCreateTime()) { - mergeRevisionCreateTime(other.getRevisionCreateTime()); - } - if (other.hasRevisionUpdateTime()) { - mergeRevisionUpdateTime(other.getRevisionUpdateTime()); - } - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - onChanged(); - } - if (other.getSizeBytes() != 0) { - setSizeBytes(other.getSizeBytes()); - } - if (!other.getHash().isEmpty()) { - hash_ = other.hash_; - onChanged(); - } - if (!other.getSourceUri().isEmpty()) { - sourceUri_ = other.sourceUri_; - onChanged(); - } - if (other.getContents() != com.google.protobuf.ByteString.EMPTY) { - setContents(other.getContents()); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - internalGetMutableAnnotations().mergeFrom( - other.internalGetAnnotations()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ApiSpec parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ApiSpec) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object filename_ = ""; - /** - *
-     * A possibly-hierarchical name used to refer to the spec from other specs.
-     * 
- * - * string filename = 2; - * @return The filename. - */ - public java.lang.String getFilename() { - java.lang.Object ref = filename_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filename_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A possibly-hierarchical name used to refer to the spec from other specs.
-     * 
- * - * string filename = 2; - * @return The bytes for filename. - */ - public com.google.protobuf.ByteString - getFilenameBytes() { - java.lang.Object ref = filename_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filename_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A possibly-hierarchical name used to refer to the spec from other specs.
-     * 
- * - * string filename = 2; - * @param value The filename to set. - * @return This builder for chaining. - */ - public Builder setFilename( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filename_ = value; - onChanged(); - return this; - } - /** - *
-     * A possibly-hierarchical name used to refer to the spec from other specs.
-     * 
- * - * string filename = 2; - * @return This builder for chaining. - */ - public Builder clearFilename() { - - filename_ = getDefaultInstance().getFilename(); - onChanged(); - return this; - } - /** - *
-     * A possibly-hierarchical name used to refer to the spec from other specs.
-     * 
- * - * string filename = 2; - * @param value The bytes for filename to set. - * @return This builder for chaining. - */ - public Builder setFilenameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filename_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.lang.Object revisionId_ = ""; - /** - *
-     * Output only. Immutable. The revision ID of the spec.
-     * A new revision is committed whenever the spec contents are changed.
-     * The format is an 8-character hexadecimal string.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Immutable. The revision ID of the spec.
-     * A new revision is committed whenever the spec contents are changed.
-     * The format is an 8-character hexadecimal string.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Immutable. The revision ID of the spec.
-     * A new revision is committed whenever the spec contents are changed.
-     * The format is an 8-character hexadecimal string.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - revisionId_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Immutable. The revision ID of the spec.
-     * A new revision is committed whenever the spec contents are changed.
-     * The format is an 8-character hexadecimal string.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - - revisionId_ = getDefaultInstance().getRevisionId(); - onChanged(); - return this; - } - /** - *
-     * Output only. Immutable. The revision ID of the spec.
-     * A new revision is committed whenever the spec contents are changed.
-     * The format is an 8-character hexadecimal string.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - revisionId_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. Creation timestamp; when the spec resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. Creation timestamp; when the spec resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.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. Creation timestamp; when the spec resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp; when the spec resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp; when the spec resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp; when the spec resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Creation timestamp; when the spec resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Creation timestamp; when the spec resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.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. Creation timestamp; when the spec resource was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp revisionCreateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> revisionCreateTimeBuilder_; - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionCreateTime field is set. - */ - public boolean hasRevisionCreateTime() { - return revisionCreateTimeBuilder_ != null || revisionCreateTime_ != null; - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionCreateTime. - */ - public com.google.protobuf.Timestamp getRevisionCreateTime() { - if (revisionCreateTimeBuilder_ == null) { - return revisionCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; - } else { - return revisionCreateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setRevisionCreateTime(com.google.protobuf.Timestamp value) { - if (revisionCreateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - revisionCreateTime_ = value; - onChanged(); - } else { - revisionCreateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setRevisionCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = builderForValue.build(); - onChanged(); - } else { - revisionCreateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeRevisionCreateTime(com.google.protobuf.Timestamp value) { - if (revisionCreateTimeBuilder_ == null) { - if (revisionCreateTime_ != null) { - revisionCreateTime_ = - com.google.protobuf.Timestamp.newBuilder(revisionCreateTime_).mergeFrom(value).buildPartial(); - } else { - revisionCreateTime_ = value; - } - onChanged(); - } else { - revisionCreateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearRevisionCreateTime() { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = null; - onChanged(); - } else { - revisionCreateTime_ = null; - revisionCreateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getRevisionCreateTimeBuilder() { - - onChanged(); - return getRevisionCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { - if (revisionCreateTimeBuilder_ != null) { - return revisionCreateTimeBuilder_.getMessageOrBuilder(); - } else { - return revisionCreateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; - } - } - /** - *
-     * Output only. Revision creation timestamp; when the represented revision was created.
-     * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getRevisionCreateTimeFieldBuilder() { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getRevisionCreateTime(), - getParentForChildren(), - isClean()); - revisionCreateTime_ = null; - } - return revisionCreateTimeBuilder_; - } - - private com.google.protobuf.Timestamp revisionUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> revisionUpdateTimeBuilder_; - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionUpdateTime field is set. - */ - public boolean hasRevisionUpdateTime() { - return revisionUpdateTimeBuilder_ != null || revisionUpdateTime_ != null; - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionUpdateTime. - */ - public com.google.protobuf.Timestamp getRevisionUpdateTime() { - if (revisionUpdateTimeBuilder_ == null) { - return revisionUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; - } else { - return revisionUpdateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setRevisionUpdateTime(com.google.protobuf.Timestamp value) { - if (revisionUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - revisionUpdateTime_ = value; - onChanged(); - } else { - revisionUpdateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setRevisionUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (revisionUpdateTimeBuilder_ == null) { - revisionUpdateTime_ = builderForValue.build(); - onChanged(); - } else { - revisionUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeRevisionUpdateTime(com.google.protobuf.Timestamp value) { - if (revisionUpdateTimeBuilder_ == null) { - if (revisionUpdateTime_ != null) { - revisionUpdateTime_ = - com.google.protobuf.Timestamp.newBuilder(revisionUpdateTime_).mergeFrom(value).buildPartial(); - } else { - revisionUpdateTime_ = value; - } - onChanged(); - } else { - revisionUpdateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearRevisionUpdateTime() { - if (revisionUpdateTimeBuilder_ == null) { - revisionUpdateTime_ = null; - onChanged(); - } else { - revisionUpdateTime_ = null; - revisionUpdateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getRevisionUpdateTimeBuilder() { - - onChanged(); - return getRevisionUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder() { - if (revisionUpdateTimeBuilder_ != null) { - return revisionUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return revisionUpdateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : revisionUpdateTime_; - } - } - /** - *
-     * Output only. Last update timestamp: when the represented revision was last modified.
-     * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getRevisionUpdateTimeFieldBuilder() { - if (revisionUpdateTimeBuilder_ == null) { - revisionUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getRevisionUpdateTime(), - getParentForChildren(), - isClean()); - revisionUpdateTime_ = null; - } - return revisionUpdateTimeBuilder_; - } - - private java.lang.Object mimeType_ = ""; - /** - *
-     * A style (format) descriptor for this spec that is specified as a Media Type
-     * (https://en.wikipedia.org/wiki/Media_type). Possible values include
-     * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
-     * `application/vnd.apigee.graphql`, with possible suffixes representing
-     * compression types. These hypothetical names are defined in the vendor tree
-     * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
-     * Content types can specify compression. Currently only GZip compression is
-     * supported (indicated with "+gzip").
-     * 
- * - * string mime_type = 8; - * @return The mimeType. - */ - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mimeType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A style (format) descriptor for this spec that is specified as a Media Type
-     * (https://en.wikipedia.org/wiki/Media_type). Possible values include
-     * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
-     * `application/vnd.apigee.graphql`, with possible suffixes representing
-     * compression types. These hypothetical names are defined in the vendor tree
-     * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
-     * Content types can specify compression. Currently only GZip compression is
-     * supported (indicated with "+gzip").
-     * 
- * - * string mime_type = 8; - * @return The bytes for mimeType. - */ - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A style (format) descriptor for this spec that is specified as a Media Type
-     * (https://en.wikipedia.org/wiki/Media_type). Possible values include
-     * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
-     * `application/vnd.apigee.graphql`, with possible suffixes representing
-     * compression types. These hypothetical names are defined in the vendor tree
-     * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
-     * Content types can specify compression. Currently only GZip compression is
-     * supported (indicated with "+gzip").
-     * 
- * - * string mime_type = 8; - * @param value The mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mimeType_ = value; - onChanged(); - return this; - } - /** - *
-     * A style (format) descriptor for this spec that is specified as a Media Type
-     * (https://en.wikipedia.org/wiki/Media_type). Possible values include
-     * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
-     * `application/vnd.apigee.graphql`, with possible suffixes representing
-     * compression types. These hypothetical names are defined in the vendor tree
-     * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
-     * Content types can specify compression. Currently only GZip compression is
-     * supported (indicated with "+gzip").
-     * 
- * - * string mime_type = 8; - * @return This builder for chaining. - */ - public Builder clearMimeType() { - - mimeType_ = getDefaultInstance().getMimeType(); - onChanged(); - return this; - } - /** - *
-     * A style (format) descriptor for this spec that is specified as a Media Type
-     * (https://en.wikipedia.org/wiki/Media_type). Possible values include
-     * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
-     * `application/vnd.apigee.graphql`, with possible suffixes representing
-     * compression types. These hypothetical names are defined in the vendor tree
-     * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
-     * Content types can specify compression. Currently only GZip compression is
-     * supported (indicated with "+gzip").
-     * 
- * - * string mime_type = 8; - * @param value The bytes for mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mimeType_ = value; - onChanged(); - return this; - } - - private int sizeBytes_ ; - /** - *
-     * Output only. The size of the spec file in bytes. If the spec is gzipped, this is the
-     * size of the uncompressed spec.
-     * 
- * - * int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sizeBytes. - */ - @java.lang.Override - public int getSizeBytes() { - return sizeBytes_; - } - /** - *
-     * Output only. The size of the spec file in bytes. If the spec is gzipped, this is the
-     * size of the uncompressed spec.
-     * 
- * - * int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The sizeBytes to set. - * @return This builder for chaining. - */ - public Builder setSizeBytes(int value) { - - sizeBytes_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The size of the spec file in bytes. If the spec is gzipped, this is the
-     * size of the uncompressed spec.
-     * 
- * - * int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearSizeBytes() { - - sizeBytes_ = 0; - onChanged(); - return this; - } - - private java.lang.Object hash_ = ""; - /** - *
-     * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
-     * the hash of the uncompressed spec.
-     * 
- * - * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The hash. - */ - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
-     * the hash of the uncompressed spec.
-     * 
- * - * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for hash. - */ - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
-     * the hash of the uncompressed spec.
-     * 
- * - * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - hash_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
-     * the hash of the uncompressed spec.
-     * 
- * - * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearHash() { - - hash_ = getDefaultInstance().getHash(); - onChanged(); - return this; - } - /** - *
-     * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
-     * the hash of the uncompressed spec.
-     * 
- * - * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for hash to set. - * @return This builder for chaining. - */ - public Builder setHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - hash_ = value; - onChanged(); - return this; - } - - private java.lang.Object sourceUri_ = ""; - /** - *
-     * The original source URI of the spec (if one exists).
-     * This is an external location that can be used for reference purposes
-     * but which may not be authoritative since this external resource may
-     * change after the spec is retrieved.
-     * 
- * - * string source_uri = 11; - * @return The sourceUri. - */ - public java.lang.String getSourceUri() { - java.lang.Object ref = sourceUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The original source URI of the spec (if one exists).
-     * This is an external location that can be used for reference purposes
-     * but which may not be authoritative since this external resource may
-     * change after the spec is retrieved.
-     * 
- * - * string source_uri = 11; - * @return The bytes for sourceUri. - */ - public com.google.protobuf.ByteString - getSourceUriBytes() { - java.lang.Object ref = sourceUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The original source URI of the spec (if one exists).
-     * This is an external location that can be used for reference purposes
-     * but which may not be authoritative since this external resource may
-     * change after the spec is retrieved.
-     * 
- * - * string source_uri = 11; - * @param value The sourceUri to set. - * @return This builder for chaining. - */ - public Builder setSourceUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The original source URI of the spec (if one exists).
-     * This is an external location that can be used for reference purposes
-     * but which may not be authoritative since this external resource may
-     * change after the spec is retrieved.
-     * 
- * - * string source_uri = 11; - * @return This builder for chaining. - */ - public Builder clearSourceUri() { - - sourceUri_ = getDefaultInstance().getSourceUri(); - onChanged(); - return this; - } - /** - *
-     * The original source URI of the spec (if one exists).
-     * This is an external location that can be used for reference purposes
-     * but which may not be authoritative since this external resource may
-     * change after the spec is retrieved.
-     * 
- * - * string source_uri = 11; - * @param value The bytes for sourceUri to set. - * @return This builder for chaining. - */ - public Builder setSourceUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sourceUri_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString contents_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Input only. The contents of the spec.
-     * Provided by API callers when specs are created or updated.
-     * To access the contents of a spec, use GetApiSpecContents.
-     * 
- * - * bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return The contents. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContents() { - return contents_; - } - /** - *
-     * Input only. The contents of the spec.
-     * Provided by API callers when specs are created or updated.
-     * To access the contents of a spec, use GetApiSpecContents.
-     * 
- * - * bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param value The contents to set. - * @return This builder for chaining. - */ - public Builder setContents(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - contents_ = value; - onChanged(); - return this; - } - /** - *
-     * Input only. The contents of the spec.
-     * Provided by API callers when specs are created or updated.
-     * To access the contents of a spec, use GetApiSpecContents.
-     * 
- * - * bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearContents() { - - contents_ = getDefaultInstance().getContents(); - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged();; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableLabels().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 14; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> annotations_; - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - private com.google.protobuf.MapField - internalGetMutableAnnotations() { - onChanged();; - if (annotations_ == null) { - annotations_ = com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - if (!annotations_.isMutable()) { - annotations_ = annotations_.copy(); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - - @java.lang.Override - public boolean containsAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetAnnotations().getMap().containsKey(key); - } - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearAnnotations() { - internalGetMutableAnnotations().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - - public Builder removeAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableAnnotations().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableAnnotations() { - return internalGetMutableAnnotations().getMutableMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - public Builder putAnnotations( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableAnnotations().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 15; - */ - - public Builder putAllAnnotations( - java.util.Map values) { - internalGetMutableAnnotations().getMutableMap() - .putAll(values); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ApiSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ApiSpec) - private static final com.google.cloud.apigeeregistry.v1.ApiSpec DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ApiSpec(); - } - - public static com.google.cloud.apigeeregistry.v1.ApiSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ApiSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ApiSpec(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecName.java deleted file mode 100644 index 6954f8055c43..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecName.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ApiSpecName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_API_VERSION_SPEC = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String api; - private final String version; - private final String spec; - - @Deprecated - protected ApiSpecName() { - project = null; - location = null; - api = null; - version = null; - spec = null; - } - - private ApiSpecName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - api = Preconditions.checkNotNull(builder.getApi()); - version = Preconditions.checkNotNull(builder.getVersion()); - spec = Preconditions.checkNotNull(builder.getSpec()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public String getVersion() { - return version; - } - - public String getSpec() { - return spec; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ApiSpecName of( - String project, String location, String api, String version, String spec) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setVersion(version) - .setSpec(spec) - .build(); - } - - public static String format( - String project, String location, String api, String version, String spec) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setVersion(version) - .setSpec(spec) - .build() - .toString(); - } - - public static ApiSpecName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_API_VERSION_SPEC.validatedMatch( - formattedString, "ApiSpecName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("api"), - matchMap.get("version"), - matchMap.get("spec")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ApiSpecName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_API_VERSION_SPEC.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 (api != null) { - fieldMapBuilder.put("api", api); - } - if (version != null) { - fieldMapBuilder.put("version", version); - } - if (spec != null) { - fieldMapBuilder.put("spec", spec); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_API_VERSION_SPEC.instantiate( - "project", project, "location", location, "api", api, "version", version, "spec", spec); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ApiSpecName that = ((ApiSpecName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.api, that.api) - && Objects.equals(this.version, that.version) - && Objects.equals(this.spec, that.spec); - } - 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(api); - h *= 1000003; - h ^= Objects.hashCode(version); - h *= 1000003; - h ^= Objects.hashCode(spec); - return h; - } - - /** - * Builder for projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}. - */ - public static class Builder { - private String project; - private String location; - private String api; - private String version; - private String spec; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public String getVersion() { - return version; - } - - public String getSpec() { - return spec; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setApi(String api) { - this.api = api; - return this; - } - - public Builder setVersion(String version) { - this.version = version; - return this; - } - - public Builder setSpec(String spec) { - this.spec = spec; - return this; - } - - private Builder(ApiSpecName apiSpecName) { - this.project = apiSpecName.project; - this.location = apiSpecName.location; - this.api = apiSpecName.api; - this.version = apiSpecName.version; - this.spec = apiSpecName.spec; - } - - public ApiSpecName build() { - return new ApiSpecName(this); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecOrBuilder.java deleted file mode 100644 index 64b0d73625b9..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiSpecOrBuilder.java +++ /dev/null @@ -1,451 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_models.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ApiSpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ApiSpec) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * A possibly-hierarchical name used to refer to the spec from other specs.
-   * 
- * - * string filename = 2; - * @return The filename. - */ - java.lang.String getFilename(); - /** - *
-   * A possibly-hierarchical name used to refer to the spec from other specs.
-   * 
- * - * string filename = 2; - * @return The bytes for filename. - */ - com.google.protobuf.ByteString - getFilenameBytes(); - - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. Immutable. The revision ID of the spec.
-   * A new revision is committed whenever the spec contents are changed.
-   * The format is an 8-character hexadecimal string.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - *
-   * Output only. Immutable. The revision ID of the spec.
-   * A new revision is committed whenever the spec contents are changed.
-   * The format is an 8-character hexadecimal string.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString - getRevisionIdBytes(); - - /** - *
-   * Output only. Creation timestamp; when the spec resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. Creation timestamp; when the spec resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. Creation timestamp; when the spec resource was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionCreateTime field is set. - */ - boolean hasRevisionCreateTime(); - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionCreateTime. - */ - com.google.protobuf.Timestamp getRevisionCreateTime(); - /** - *
-   * Output only. Revision creation timestamp; when the represented revision was created.
-   * 
- * - * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder(); - - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the revisionUpdateTime field is set. - */ - boolean hasRevisionUpdateTime(); - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The revisionUpdateTime. - */ - com.google.protobuf.Timestamp getRevisionUpdateTime(); - /** - *
-   * Output only. Last update timestamp: when the represented revision was last modified.
-   * 
- * - * .google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getRevisionUpdateTimeOrBuilder(); - - /** - *
-   * A style (format) descriptor for this spec that is specified as a Media Type
-   * (https://en.wikipedia.org/wiki/Media_type). Possible values include
-   * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
-   * `application/vnd.apigee.graphql`, with possible suffixes representing
-   * compression types. These hypothetical names are defined in the vendor tree
-   * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
-   * Content types can specify compression. Currently only GZip compression is
-   * supported (indicated with "+gzip").
-   * 
- * - * string mime_type = 8; - * @return The mimeType. - */ - java.lang.String getMimeType(); - /** - *
-   * A style (format) descriptor for this spec that is specified as a Media Type
-   * (https://en.wikipedia.org/wiki/Media_type). Possible values include
-   * `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
-   * `application/vnd.apigee.graphql`, with possible suffixes representing
-   * compression types. These hypothetical names are defined in the vendor tree
-   * defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
-   * Content types can specify compression. Currently only GZip compression is
-   * supported (indicated with "+gzip").
-   * 
- * - * string mime_type = 8; - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString - getMimeTypeBytes(); - - /** - *
-   * Output only. The size of the spec file in bytes. If the spec is gzipped, this is the
-   * size of the uncompressed spec.
-   * 
- * - * int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sizeBytes. - */ - int getSizeBytes(); - - /** - *
-   * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
-   * the hash of the uncompressed spec.
-   * 
- * - * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The hash. - */ - java.lang.String getHash(); - /** - *
-   * Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
-   * the hash of the uncompressed spec.
-   * 
- * - * string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for hash. - */ - com.google.protobuf.ByteString - getHashBytes(); - - /** - *
-   * The original source URI of the spec (if one exists).
-   * This is an external location that can be used for reference purposes
-   * but which may not be authoritative since this external resource may
-   * change after the spec is retrieved.
-   * 
- * - * string source_uri = 11; - * @return The sourceUri. - */ - java.lang.String getSourceUri(); - /** - *
-   * The original source URI of the spec (if one exists).
-   * This is an external location that can be used for reference purposes
-   * but which may not be authoritative since this external resource may
-   * change after the spec is retrieved.
-   * 
- * - * string source_uri = 11; - * @return The bytes for sourceUri. - */ - com.google.protobuf.ByteString - getSourceUriBytes(); - - /** - *
-   * Input only. The contents of the spec.
-   * Provided by API callers when specs are created or updated.
-   * To access the contents of a spec, use GetApiSpecContents.
-   * 
- * - * bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return The contents. - */ - com.google.protobuf.ByteString getContents(); - - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - int getLabelsCount(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 14; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - int getAnnotationsCount(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - boolean containsAnnotations( - java.lang.String key); - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getAnnotations(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - java.util.Map - getAnnotationsMap(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - - /* nullable */ -java.lang.String getAnnotationsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 15; - */ - - java.lang.String getAnnotationsOrThrow( - java.lang.String key); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersion.java deleted file mode 100644 index 12d64b86a84b..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersion.java +++ /dev/null @@ -1,2355 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_models.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Describes a particular version of an API.
- * ApiVersions are what consumers actually use.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiVersion} - */ -public final class ApiVersion extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ApiVersion) - ApiVersionOrBuilder { -private static final long serialVersionUID = 0L; - // Use ApiVersion.newBuilder() to construct. - private ApiVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ApiVersion() { - name_ = ""; - displayName_ = ""; - description_ = ""; - state_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ApiVersion(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ApiVersion( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - state_ = s; - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put( - labels__.getKey(), labels__.getValue()); - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - annotations_ = com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - annotations__ = input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - annotations_.getMutableMap().put( - annotations__.getKey(), annotations__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetLabels(); - case 8: - return internalGetAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ApiVersion.class, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @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; - } - } - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @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; - private volatile java.lang.Object description_; - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. Creation 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 createTime_ != null; - } - /** - *
-   * Output only. Creation 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. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. Last 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 updateTime_ != null; - } - /** - *
-   * Output only. Last 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. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int STATE_FIELD_NUMBER = 6; - private volatile java.lang.Object state_; - /** - *
-   * A user-definable description of the lifecycle phase of this API version.
-   * Format: free-form, but we expect single words that describe API maturity,
-   * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
-   * "DEPRECATED", "RETIRED".
-   * 
- * - * string state = 6; - * @return The state. - */ - @java.lang.Override - public java.lang.String getState() { - java.lang.Object ref = state_; - 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(); - state_ = s; - return s; - } - } - /** - *
-   * A user-definable description of the lifecycle phase of this API version.
-   * Format: free-form, but we expect single words that describe API maturity,
-   * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
-   * "DEPRECATED", "RETIRED".
-   * 
- * - * string state = 6; - * @return The bytes for state. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStateBytes() { - java.lang.Object ref = state_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - state_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 7; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 7; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ANNOTATIONS_FIELD_NUMBER = 8; - private static final class AnnotationsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_AnnotationsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> annotations_; - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 8; - */ - - @java.lang.Override - public boolean containsAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetAnnotations().getMap().containsKey(key); - } - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 8; - */ - @java.lang.Override - - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 8; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 8; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (createTime_ != null) { - output.writeMessage(4, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(5, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, state_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 7); - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetAnnotations(), - AnnotationsDefaultEntryHolder.defaultEntry, - 8); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, state_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, labels__); - } - for (java.util.Map.Entry entry - : internalGetAnnotations().getMap().entrySet()) { - com.google.protobuf.MapEntry - annotations__ = AnnotationsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, annotations__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ApiVersion)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ApiVersion other = (com.google.cloud.apigeeregistry.v1.ApiVersion) 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 (!getState() - .equals(other.getState())) return false; - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!internalGetAnnotations().equals( - other.internalGetAnnotations())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + 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 = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + getState().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (!internalGetAnnotations().getMap().isEmpty()) { - hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetAnnotations().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ApiVersion 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.apigeeregistry.v1.ApiVersion parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ApiVersion 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.apigeeregistry.v1.ApiVersion parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ApiVersion parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ApiVersion parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ApiVersion parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ApiVersion prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Describes a particular version of an API.
-   * ApiVersions are what consumers actually use.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ApiVersion} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ApiVersion) - com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetLabels(); - case 8: - return internalGetAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 7: - return internalGetMutableLabels(); - case 8: - return internalGetMutableAnnotations(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ApiVersion.class, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ApiVersion.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - state_ = ""; - - internalGetMutableLabels().clear(); - internalGetMutableAnnotations().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_ApiVersion_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiVersion getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiVersion build() { - com.google.cloud.apigeeregistry.v1.ApiVersion result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiVersion buildPartial() { - com.google.cloud.apigeeregistry.v1.ApiVersion result = new com.google.cloud.apigeeregistry.v1.ApiVersion(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.state_ = state_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.annotations_ = internalGetAnnotations(); - result.annotations_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ApiVersion) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ApiVersion)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ApiVersion other) { - if (other == com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.getState().isEmpty()) { - state_ = other.state_; - onChanged(); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - internalGetMutableAnnotations().mergeFrom( - other.internalGetAnnotations()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ApiVersion parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ApiVersion) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - } - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - } - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - onChanged(); - return this; - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * Human-meaningful name.
-     * 
- * - * string display_name = 2; - * @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; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * A detailed description.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. Creation 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. Creation 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; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Creation 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(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Creation 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 (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Creation 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. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. Last 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 updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * Output only. Last 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. Last 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; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Last 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(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Last 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 (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Last 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. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private java.lang.Object state_ = ""; - /** - *
-     * A user-definable description of the lifecycle phase of this API version.
-     * Format: free-form, but we expect single words that describe API maturity,
-     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
-     * "DEPRECATED", "RETIRED".
-     * 
- * - * string state = 6; - * @return The state. - */ - public java.lang.String getState() { - java.lang.Object ref = state_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - state_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A user-definable description of the lifecycle phase of this API version.
-     * Format: free-form, but we expect single words that describe API maturity,
-     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
-     * "DEPRECATED", "RETIRED".
-     * 
- * - * string state = 6; - * @return The bytes for state. - */ - public com.google.protobuf.ByteString - getStateBytes() { - java.lang.Object ref = state_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - state_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A user-definable description of the lifecycle phase of this API version.
-     * Format: free-form, but we expect single words that describe API maturity,
-     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
-     * "DEPRECATED", "RETIRED".
-     * 
- * - * string state = 6; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * A user-definable description of the lifecycle phase of this API version.
-     * Format: free-form, but we expect single words that describe API maturity,
-     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
-     * "DEPRECATED", "RETIRED".
-     * 
- * - * string state = 6; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = getDefaultInstance().getState(); - onChanged(); - return this; - } - /** - *
-     * A user-definable description of the lifecycle phase of this API version.
-     * Format: free-form, but we expect single words that describe API maturity,
-     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
-     * "DEPRECATED", "RETIRED".
-     * 
- * - * string state = 6; - * @param value The bytes for state to set. - * @return This builder for chaining. - */ - public Builder setStateBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - state_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged();; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 7; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 7; - */ - - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 7; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableLabels().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Labels attach identifying metadata to resources. Identifying metadata can
-     * be used to filter list operations.
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     * No more than 64 user labels can be associated with one resource (System
-     * labels are excluded).
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * System reserved label keys are prefixed with
-     * `apigeeregistry.googleapis.com/` and cannot be changed.
-     * 
- * - * map<string, string> labels = 7; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> annotations_; - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - private com.google.protobuf.MapField - internalGetMutableAnnotations() { - onChanged();; - if (annotations_ == null) { - annotations_ = com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - if (!annotations_.isMutable()) { - annotations_ = annotations_.copy(); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 8; - */ - - @java.lang.Override - public boolean containsAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetAnnotations().getMap().containsKey(key); - } - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 8; - */ - @java.lang.Override - - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 8; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 8; - */ - @java.lang.Override - - public java.lang.String getAnnotationsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearAnnotations() { - internalGetMutableAnnotations().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 8; - */ - - public Builder removeAnnotations( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableAnnotations().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableAnnotations() { - return internalGetMutableAnnotations().getMutableMap(); - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 8; - */ - public Builder putAnnotations( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableAnnotations().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Annotations attach non-identifying metadata to resources.
-     * Annotation keys and values are less restricted than those of labels, but
-     * should be generally used for small values of broad interest. Larger, topic-
-     * specific metadata should be stored in Artifacts.
-     * 
- * - * map<string, string> annotations = 8; - */ - - public Builder putAllAnnotations( - java.util.Map values) { - internalGetMutableAnnotations().getMutableMap() - .putAll(values); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ApiVersion) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ApiVersion) - private static final com.google.cloud.apigeeregistry.v1.ApiVersion DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ApiVersion(); - } - - public static com.google.cloud.apigeeregistry.v1.ApiVersion getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ApiVersion parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ApiVersion(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiVersion getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionName.java deleted file mode 100644 index 167c21e6964c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionName.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ApiVersionName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_API_VERSION = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/apis/{api}/versions/{version}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String api; - private final String version; - - @Deprecated - protected ApiVersionName() { - project = null; - location = null; - api = null; - version = null; - } - - private ApiVersionName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - api = Preconditions.checkNotNull(builder.getApi()); - version = Preconditions.checkNotNull(builder.getVersion()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public String getVersion() { - return version; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ApiVersionName of(String project, String location, String api, String version) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setVersion(version) - .build(); - } - - public static String format(String project, String location, String api, String version) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setVersion(version) - .build() - .toString(); - } - - public static ApiVersionName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_API_VERSION.validatedMatch( - formattedString, "ApiVersionName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("api"), - matchMap.get("version")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ApiVersionName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_API_VERSION.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 (api != null) { - fieldMapBuilder.put("api", api); - } - if (version != null) { - fieldMapBuilder.put("version", version); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_API_VERSION.instantiate( - "project", project, "location", location, "api", api, "version", version); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ApiVersionName that = ((ApiVersionName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.api, that.api) - && Objects.equals(this.version, that.version); - } - 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(api); - h *= 1000003; - h ^= Objects.hashCode(version); - return h; - } - - /** Builder for projects/{project}/locations/{location}/apis/{api}/versions/{version}. */ - public static class Builder { - private String project; - private String location; - private String api; - private String version; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public String getVersion() { - return version; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setApi(String api) { - this.api = api; - return this; - } - - public Builder setVersion(String version) { - this.version = version; - return this; - } - - private Builder(ApiVersionName apiVersionName) { - this.project = apiVersionName.project; - this.location = apiVersionName.location; - this.api = apiVersionName.api; - this.version = apiVersionName.version; - } - - public ApiVersionName build() { - return new ApiVersionName(this); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionOrBuilder.java deleted file mode 100644 index 883e7f05c143..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ApiVersionOrBuilder.java +++ /dev/null @@ -1,321 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_models.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ApiVersionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ApiVersion) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * Human-meaningful name.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A detailed description.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. Last 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. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * A user-definable description of the lifecycle phase of this API version.
-   * Format: free-form, but we expect single words that describe API maturity,
-   * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
-   * "DEPRECATED", "RETIRED".
-   * 
- * - * string state = 6; - * @return The state. - */ - java.lang.String getState(); - /** - *
-   * A user-definable description of the lifecycle phase of this API version.
-   * Format: free-form, but we expect single words that describe API maturity,
-   * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
-   * "DEPRECATED", "RETIRED".
-   * 
- * - * string state = 6; - * @return The bytes for state. - */ - com.google.protobuf.ByteString - getStateBytes(); - - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 7; - */ - int getLabelsCount(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 7; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 7; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 7; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Labels attach identifying metadata to resources. Identifying metadata can
-   * be used to filter list operations.
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   * No more than 64 user labels can be associated with one resource (System
-   * labels are excluded).
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * System reserved label keys are prefixed with
-   * `apigeeregistry.googleapis.com/` and cannot be changed.
-   * 
- * - * map<string, string> labels = 7; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 8; - */ - int getAnnotationsCount(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 8; - */ - boolean containsAnnotations( - java.lang.String key); - /** - * Use {@link #getAnnotationsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getAnnotations(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 8; - */ - java.util.Map - getAnnotationsMap(); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 8; - */ - - /* nullable */ -java.lang.String getAnnotationsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Annotations attach non-identifying metadata to resources.
-   * Annotation keys and values are less restricted than those of labels, but
-   * should be generally used for small values of broad interest. Larger, topic-
-   * specific metadata should be stored in Artifacts.
-   * 
- * - * map<string, string> annotations = 8; - */ - - java.lang.String getAnnotationsOrThrow( - java.lang.String key); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Artifact.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Artifact.java deleted file mode 100644 index 65564e2a24d6..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Artifact.java +++ /dev/null @@ -1,1631 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_models.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Artifacts of resources. Artifacts are unique (single-value) per resource
- * and are used to store metadata that is too large or numerous to be stored
- * directly on the resource. Since artifacts are stored separately from parent
- * resources, they should generally be used for metadata that is needed
- * infrequently, i.e., not for display in primary views of the resource but
- * perhaps displayed or downloaded upon request. The `ListArtifacts` method
- * allows artifacts to be quickly enumerated and checked for presence without
- * downloading their (potentially-large) contents.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.Artifact} - */ -public final class Artifact extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.Artifact) - ArtifactOrBuilder { -private static final long serialVersionUID = 0L; - // Use Artifact.newBuilder() to construct. - private Artifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Artifact() { - name_ = ""; - mimeType_ = ""; - hash_ = ""; - contents_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Artifact(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Artifact( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - mimeType_ = s; - break; - } - case 40: { - - sizeBytes_ = input.readInt32(); - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - hash_ = s; - break; - } - case 58: { - - contents_ = input.readBytes(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Artifact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Artifact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.Artifact.class, com.google.cloud.apigeeregistry.v1.Artifact.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .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 updateTime_ != null; - } - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .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. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int MIME_TYPE_FIELD_NUMBER = 4; - private volatile java.lang.Object mimeType_; - /** - *
-   * A content type specifier for the artifact.
-   * Content type specifiers are Media Types
-   * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
-   * parameter that specifies a schema for the stored information.
-   * Content types can specify compression. Currently only GZip compression is
-   * supported (indicated with "+gzip").
-   * 
- * - * string mime_type = 4; - * @return The mimeType. - */ - @java.lang.Override - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - 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(); - mimeType_ = s; - return s; - } - } - /** - *
-   * A content type specifier for the artifact.
-   * Content type specifiers are Media Types
-   * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
-   * parameter that specifies a schema for the stored information.
-   * Content types can specify compression. Currently only GZip compression is
-   * supported (indicated with "+gzip").
-   * 
- * - * string mime_type = 4; - * @return The bytes for mimeType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIZE_BYTES_FIELD_NUMBER = 5; - private int sizeBytes_; - /** - *
-   * Output only. The size of the artifact in bytes. If the artifact is gzipped, this is
-   * the size of the uncompressed artifact.
-   * 
- * - * int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sizeBytes. - */ - @java.lang.Override - public int getSizeBytes() { - return sizeBytes_; - } - - public static final int HASH_FIELD_NUMBER = 6; - private volatile java.lang.Object hash_; - /** - *
-   * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
-   * this is the hash of the uncompressed artifact.
-   * 
- * - * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The hash. - */ - @java.lang.Override - public java.lang.String getHash() { - java.lang.Object ref = hash_; - 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(); - hash_ = s; - return s; - } - } - /** - *
-   * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
-   * this is the hash of the uncompressed artifact.
-   * 
- * - * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONTENTS_FIELD_NUMBER = 7; - private com.google.protobuf.ByteString contents_; - /** - *
-   * Input only. The contents of the artifact.
-   * Provided by API callers when artifacts are created or replaced.
-   * To access the contents of an artifact, use GetArtifactContents.
-   * 
- * - * bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return The contents. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContents() { - return contents_; - } - - 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(3, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mimeType_); - } - if (sizeBytes_ != 0) { - output.writeInt32(5, sizeBytes_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, hash_); - } - if (!contents_.isEmpty()) { - output.writeBytes(7, contents_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mimeType_); - } - if (sizeBytes_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, sizeBytes_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, hash_); - } - if (!contents_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, contents_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.Artifact)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.Artifact other = (com.google.cloud.apigeeregistry.v1.Artifact) obj; - - if (!getName() - .equals(other.getName())) 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 (!getMimeType() - .equals(other.getMimeType())) return false; - if (getSizeBytes() - != other.getSizeBytes()) return false; - if (!getHash() - .equals(other.getHash())) return false; - if (!getContents() - .equals(other.getContents())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (37 * hash) + SIZE_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getSizeBytes(); - hash = (37 * hash) + HASH_FIELD_NUMBER; - hash = (53 * hash) + getHash().hashCode(); - hash = (37 * hash) + CONTENTS_FIELD_NUMBER; - hash = (53 * hash) + getContents().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Artifact 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.apigeeregistry.v1.Artifact parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Artifact 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.apigeeregistry.v1.Artifact parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Artifact parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Artifact parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Artifact parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.Artifact prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Artifacts of resources. Artifacts are unique (single-value) per resource
-   * and are used to store metadata that is too large or numerous to be stored
-   * directly on the resource. Since artifacts are stored separately from parent
-   * resources, they should generally be used for metadata that is needed
-   * infrequently, i.e., not for display in primary views of the resource but
-   * perhaps displayed or downloaded upon request. The `ListArtifacts` method
-   * allows artifacts to be quickly enumerated and checked for presence without
-   * downloading their (potentially-large) contents.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.Artifact} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.Artifact) - com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Artifact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Artifact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.Artifact.class, com.google.cloud.apigeeregistry.v1.Artifact.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.Artifact.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - mimeType_ = ""; - - sizeBytes_ = 0; - - hash_ = ""; - - contents_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryModelsProto.internal_static_google_cloud_apigeeregistry_v1_Artifact_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Artifact getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Artifact build() { - com.google.cloud.apigeeregistry.v1.Artifact result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Artifact buildPartial() { - com.google.cloud.apigeeregistry.v1.Artifact result = new com.google.cloud.apigeeregistry.v1.Artifact(this); - result.name_ = name_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.mimeType_ = mimeType_; - result.sizeBytes_ = sizeBytes_; - result.hash_ = hash_; - result.contents_ = contents_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.Artifact) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.Artifact)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.Artifact other) { - if (other == com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - onChanged(); - } - if (other.getSizeBytes() != 0) { - setSizeBytes(other.getSizeBytes()); - } - if (!other.getHash().isEmpty()) { - hash_ = other.hash_; - onChanged(); - } - if (other.getContents() != com.google.protobuf.ByteString.EMPTY) { - setContents(other.getContents()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.Artifact parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.Artifact) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .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. Last update timestamp.
-     * 
- * - * .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; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .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(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .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. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private java.lang.Object mimeType_ = ""; - /** - *
-     * A content type specifier for the artifact.
-     * Content type specifiers are Media Types
-     * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
-     * parameter that specifies a schema for the stored information.
-     * Content types can specify compression. Currently only GZip compression is
-     * supported (indicated with "+gzip").
-     * 
- * - * string mime_type = 4; - * @return The mimeType. - */ - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mimeType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A content type specifier for the artifact.
-     * Content type specifiers are Media Types
-     * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
-     * parameter that specifies a schema for the stored information.
-     * Content types can specify compression. Currently only GZip compression is
-     * supported (indicated with "+gzip").
-     * 
- * - * string mime_type = 4; - * @return The bytes for mimeType. - */ - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A content type specifier for the artifact.
-     * Content type specifiers are Media Types
-     * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
-     * parameter that specifies a schema for the stored information.
-     * Content types can specify compression. Currently only GZip compression is
-     * supported (indicated with "+gzip").
-     * 
- * - * string mime_type = 4; - * @param value The mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mimeType_ = value; - onChanged(); - return this; - } - /** - *
-     * A content type specifier for the artifact.
-     * Content type specifiers are Media Types
-     * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
-     * parameter that specifies a schema for the stored information.
-     * Content types can specify compression. Currently only GZip compression is
-     * supported (indicated with "+gzip").
-     * 
- * - * string mime_type = 4; - * @return This builder for chaining. - */ - public Builder clearMimeType() { - - mimeType_ = getDefaultInstance().getMimeType(); - onChanged(); - return this; - } - /** - *
-     * A content type specifier for the artifact.
-     * Content type specifiers are Media Types
-     * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
-     * parameter that specifies a schema for the stored information.
-     * Content types can specify compression. Currently only GZip compression is
-     * supported (indicated with "+gzip").
-     * 
- * - * string mime_type = 4; - * @param value The bytes for mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mimeType_ = value; - onChanged(); - return this; - } - - private int sizeBytes_ ; - /** - *
-     * Output only. The size of the artifact in bytes. If the artifact is gzipped, this is
-     * the size of the uncompressed artifact.
-     * 
- * - * int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sizeBytes. - */ - @java.lang.Override - public int getSizeBytes() { - return sizeBytes_; - } - /** - *
-     * Output only. The size of the artifact in bytes. If the artifact is gzipped, this is
-     * the size of the uncompressed artifact.
-     * 
- * - * int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The sizeBytes to set. - * @return This builder for chaining. - */ - public Builder setSizeBytes(int value) { - - sizeBytes_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The size of the artifact in bytes. If the artifact is gzipped, this is
-     * the size of the uncompressed artifact.
-     * 
- * - * int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearSizeBytes() { - - sizeBytes_ = 0; - onChanged(); - return this; - } - - private java.lang.Object hash_ = ""; - /** - *
-     * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
-     * this is the hash of the uncompressed artifact.
-     * 
- * - * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The hash. - */ - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
-     * this is the hash of the uncompressed artifact.
-     * 
- * - * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for hash. - */ - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
-     * this is the hash of the uncompressed artifact.
-     * 
- * - * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - hash_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
-     * this is the hash of the uncompressed artifact.
-     * 
- * - * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearHash() { - - hash_ = getDefaultInstance().getHash(); - onChanged(); - return this; - } - /** - *
-     * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
-     * this is the hash of the uncompressed artifact.
-     * 
- * - * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for hash to set. - * @return This builder for chaining. - */ - public Builder setHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - hash_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString contents_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Input only. The contents of the artifact.
-     * Provided by API callers when artifacts are created or replaced.
-     * To access the contents of an artifact, use GetArtifactContents.
-     * 
- * - * bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return The contents. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContents() { - return contents_; - } - /** - *
-     * Input only. The contents of the artifact.
-     * Provided by API callers when artifacts are created or replaced.
-     * To access the contents of an artifact, use GetArtifactContents.
-     * 
- * - * bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param value The contents to set. - * @return This builder for chaining. - */ - public Builder setContents(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - contents_ = value; - onChanged(); - return this; - } - /** - *
-     * Input only. The contents of the artifact.
-     * Provided by API callers when artifacts are created or replaced.
-     * To access the contents of an artifact, use GetArtifactContents.
-     * 
- * - * bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearContents() { - - contents_ = getDefaultInstance().getContents(); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.Artifact) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.Artifact) - private static final com.google.cloud.apigeeregistry.v1.Artifact DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.Artifact(); - } - - public static com.google.cloud.apigeeregistry.v1.Artifact getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Artifact parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Artifact(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Artifact getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactName.java deleted file mode 100644 index 9d92d788f93c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactName.java +++ /dev/null @@ -1,778 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ArtifactName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_ARTIFACT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/artifacts/{artifact}"); - private static final PathTemplate PROJECT_LOCATION_API_ARTIFACT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}"); - private static final PathTemplate PROJECT_LOCATION_API_VERSION_ARTIFACT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}"); - private static final PathTemplate PROJECT_LOCATION_API_VERSION_SPEC_ARTIFACT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}"); - private static final PathTemplate PROJECT_LOCATION_API_DEPLOYMENT_ARTIFACT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String location; - private final String artifact; - private final String api; - private final String version; - private final String spec; - private final String deployment; - - @Deprecated - protected ArtifactName() { - project = null; - location = null; - artifact = null; - api = null; - version = null; - spec = null; - deployment = null; - } - - private ArtifactName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - artifact = Preconditions.checkNotNull(builder.getArtifact()); - api = null; - version = null; - spec = null; - deployment = null; - pathTemplate = PROJECT_LOCATION_ARTIFACT; - } - - private ArtifactName(ProjectLocationApiArtifactBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - api = Preconditions.checkNotNull(builder.getApi()); - artifact = Preconditions.checkNotNull(builder.getArtifact()); - version = null; - spec = null; - deployment = null; - pathTemplate = PROJECT_LOCATION_API_ARTIFACT; - } - - private ArtifactName(ProjectLocationApiVersionArtifactBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - api = Preconditions.checkNotNull(builder.getApi()); - version = Preconditions.checkNotNull(builder.getVersion()); - artifact = Preconditions.checkNotNull(builder.getArtifact()); - spec = null; - deployment = null; - pathTemplate = PROJECT_LOCATION_API_VERSION_ARTIFACT; - } - - private ArtifactName(ProjectLocationApiVersionSpecArtifactBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - api = Preconditions.checkNotNull(builder.getApi()); - version = Preconditions.checkNotNull(builder.getVersion()); - spec = Preconditions.checkNotNull(builder.getSpec()); - artifact = Preconditions.checkNotNull(builder.getArtifact()); - deployment = null; - pathTemplate = PROJECT_LOCATION_API_VERSION_SPEC_ARTIFACT; - } - - private ArtifactName(ProjectLocationApiDeploymentArtifactBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - api = Preconditions.checkNotNull(builder.getApi()); - deployment = Preconditions.checkNotNull(builder.getDeployment()); - artifact = Preconditions.checkNotNull(builder.getArtifact()); - version = null; - spec = null; - pathTemplate = PROJECT_LOCATION_API_DEPLOYMENT_ARTIFACT; - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getArtifact() { - return artifact; - } - - public String getApi() { - return api; - } - - public String getVersion() { - return version; - } - - public String getSpec() { - return spec; - } - - public String getDeployment() { - return deployment; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newProjectLocationArtifactBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectLocationApiArtifactBuilder newProjectLocationApiArtifactBuilder() { - return new ProjectLocationApiArtifactBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectLocationApiVersionArtifactBuilder - newProjectLocationApiVersionArtifactBuilder() { - return new ProjectLocationApiVersionArtifactBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectLocationApiVersionSpecArtifactBuilder - newProjectLocationApiVersionSpecArtifactBuilder() { - return new ProjectLocationApiVersionSpecArtifactBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectLocationApiDeploymentArtifactBuilder - newProjectLocationApiDeploymentArtifactBuilder() { - return new ProjectLocationApiDeploymentArtifactBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ArtifactName of(String project, String location, String artifact) { - return newBuilder().setProject(project).setLocation(location).setArtifact(artifact).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static ArtifactName ofProjectLocationArtifactName( - String project, String location, String artifact) { - return newBuilder().setProject(project).setLocation(location).setArtifact(artifact).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static ArtifactName ofProjectLocationApiArtifactName( - String project, String location, String api, String artifact) { - return newProjectLocationApiArtifactBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setArtifact(artifact) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static ArtifactName ofProjectLocationApiVersionArtifactName( - String project, String location, String api, String version, String artifact) { - return newProjectLocationApiVersionArtifactBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setVersion(version) - .setArtifact(artifact) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static ArtifactName ofProjectLocationApiVersionSpecArtifactName( - String project, String location, String api, String version, String spec, String artifact) { - return newProjectLocationApiVersionSpecArtifactBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setVersion(version) - .setSpec(spec) - .setArtifact(artifact) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static ArtifactName ofProjectLocationApiDeploymentArtifactName( - String project, String location, String api, String deployment, String artifact) { - return newProjectLocationApiDeploymentArtifactBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setDeployment(deployment) - .setArtifact(artifact) - .build(); - } - - public static String format(String project, String location, String artifact) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setArtifact(artifact) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationArtifactName( - String project, String location, String artifact) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setArtifact(artifact) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationApiArtifactName( - String project, String location, String api, String artifact) { - return newProjectLocationApiArtifactBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setArtifact(artifact) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationApiVersionArtifactName( - String project, String location, String api, String version, String artifact) { - return newProjectLocationApiVersionArtifactBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setVersion(version) - .setArtifact(artifact) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationApiVersionSpecArtifactName( - String project, String location, String api, String version, String spec, String artifact) { - return newProjectLocationApiVersionSpecArtifactBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setVersion(version) - .setSpec(spec) - .setArtifact(artifact) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationApiDeploymentArtifactName( - String project, String location, String api, String deployment, String artifact) { - return newProjectLocationApiDeploymentArtifactBuilder() - .setProject(project) - .setLocation(location) - .setApi(api) - .setDeployment(deployment) - .setArtifact(artifact) - .build() - .toString(); - } - - public static ArtifactName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT_LOCATION_ARTIFACT.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_ARTIFACT.match(formattedString); - return ofProjectLocationArtifactName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("artifact")); - } else if (PROJECT_LOCATION_API_ARTIFACT.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_API_ARTIFACT.match(formattedString); - return ofProjectLocationApiArtifactName( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("api"), - matchMap.get("artifact")); - } else if (PROJECT_LOCATION_API_VERSION_ARTIFACT.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_API_VERSION_ARTIFACT.match(formattedString); - return ofProjectLocationApiVersionArtifactName( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("api"), - matchMap.get("version"), - matchMap.get("artifact")); - } else if (PROJECT_LOCATION_API_VERSION_SPEC_ARTIFACT.matches(formattedString)) { - Map matchMap = - PROJECT_LOCATION_API_VERSION_SPEC_ARTIFACT.match(formattedString); - return ofProjectLocationApiVersionSpecArtifactName( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("api"), - matchMap.get("version"), - matchMap.get("spec"), - matchMap.get("artifact")); - } else if (PROJECT_LOCATION_API_DEPLOYMENT_ARTIFACT.matches(formattedString)) { - Map matchMap = - PROJECT_LOCATION_API_DEPLOYMENT_ARTIFACT.match(formattedString); - return ofProjectLocationApiDeploymentArtifactName( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("api"), - matchMap.get("deployment"), - matchMap.get("artifact")); - } - throw new ValidationException("ArtifactName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ArtifactName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_ARTIFACT.matches(formattedString) - || PROJECT_LOCATION_API_ARTIFACT.matches(formattedString) - || PROJECT_LOCATION_API_VERSION_ARTIFACT.matches(formattedString) - || PROJECT_LOCATION_API_VERSION_SPEC_ARTIFACT.matches(formattedString) - || PROJECT_LOCATION_API_DEPLOYMENT_ARTIFACT.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 (artifact != null) { - fieldMapBuilder.put("artifact", artifact); - } - if (api != null) { - fieldMapBuilder.put("api", api); - } - if (version != null) { - fieldMapBuilder.put("version", version); - } - if (spec != null) { - fieldMapBuilder.put("spec", spec); - } - if (deployment != null) { - fieldMapBuilder.put("deployment", deployment); - } - 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(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ArtifactName that = ((ArtifactName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.artifact, that.artifact) - && Objects.equals(this.api, that.api) - && Objects.equals(this.version, that.version) - && Objects.equals(this.spec, that.spec) - && Objects.equals(this.deployment, that.deployment); - } - 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(artifact); - h *= 1000003; - h ^= Objects.hashCode(api); - h *= 1000003; - h ^= Objects.hashCode(version); - h *= 1000003; - h ^= Objects.hashCode(spec); - h *= 1000003; - h ^= Objects.hashCode(deployment); - return h; - } - - /** Builder for projects/{project}/locations/{location}/artifacts/{artifact}. */ - public static class Builder { - private String project; - private String location; - private String artifact; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getArtifact() { - return artifact; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setArtifact(String artifact) { - this.artifact = artifact; - return this; - } - - private Builder(ArtifactName artifactName) { - Preconditions.checkArgument( - Objects.equals(artifactName.pathTemplate, PROJECT_LOCATION_ARTIFACT), - "toBuilder is only supported when ArtifactName has the pattern of projects/{project}/locations/{location}/artifacts/{artifact}"); - this.project = artifactName.project; - this.location = artifactName.location; - this.artifact = artifactName.artifact; - } - - public ArtifactName build() { - return new ArtifactName(this); - } - } - - /** Builder for projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectLocationApiArtifactBuilder { - private String project; - private String location; - private String api; - private String artifact; - - protected ProjectLocationApiArtifactBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public String getArtifact() { - return artifact; - } - - public ProjectLocationApiArtifactBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationApiArtifactBuilder setLocation(String location) { - this.location = location; - return this; - } - - public ProjectLocationApiArtifactBuilder setApi(String api) { - this.api = api; - return this; - } - - public ProjectLocationApiArtifactBuilder setArtifact(String artifact) { - this.artifact = artifact; - return this; - } - - public ArtifactName build() { - return new ArtifactName(this); - } - } - - /** - * Builder for - * projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}. - */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectLocationApiVersionArtifactBuilder { - private String project; - private String location; - private String api; - private String version; - private String artifact; - - protected ProjectLocationApiVersionArtifactBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public String getVersion() { - return version; - } - - public String getArtifact() { - return artifact; - } - - public ProjectLocationApiVersionArtifactBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationApiVersionArtifactBuilder setLocation(String location) { - this.location = location; - return this; - } - - public ProjectLocationApiVersionArtifactBuilder setApi(String api) { - this.api = api; - return this; - } - - public ProjectLocationApiVersionArtifactBuilder setVersion(String version) { - this.version = version; - return this; - } - - public ProjectLocationApiVersionArtifactBuilder setArtifact(String artifact) { - this.artifact = artifact; - return this; - } - - public ArtifactName build() { - return new ArtifactName(this); - } - } - - /** - * Builder for - * projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}. - */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectLocationApiVersionSpecArtifactBuilder { - private String project; - private String location; - private String api; - private String version; - private String spec; - private String artifact; - - protected ProjectLocationApiVersionSpecArtifactBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public String getVersion() { - return version; - } - - public String getSpec() { - return spec; - } - - public String getArtifact() { - return artifact; - } - - public ProjectLocationApiVersionSpecArtifactBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationApiVersionSpecArtifactBuilder setLocation(String location) { - this.location = location; - return this; - } - - public ProjectLocationApiVersionSpecArtifactBuilder setApi(String api) { - this.api = api; - return this; - } - - public ProjectLocationApiVersionSpecArtifactBuilder setVersion(String version) { - this.version = version; - return this; - } - - public ProjectLocationApiVersionSpecArtifactBuilder setSpec(String spec) { - this.spec = spec; - return this; - } - - public ProjectLocationApiVersionSpecArtifactBuilder setArtifact(String artifact) { - this.artifact = artifact; - return this; - } - - public ArtifactName build() { - return new ArtifactName(this); - } - } - - /** - * Builder for - * projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}. - */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectLocationApiDeploymentArtifactBuilder { - private String project; - private String location; - private String api; - private String deployment; - private String artifact; - - protected ProjectLocationApiDeploymentArtifactBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getApi() { - return api; - } - - public String getDeployment() { - return deployment; - } - - public String getArtifact() { - return artifact; - } - - public ProjectLocationApiDeploymentArtifactBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationApiDeploymentArtifactBuilder setLocation(String location) { - this.location = location; - return this; - } - - public ProjectLocationApiDeploymentArtifactBuilder setApi(String api) { - this.api = api; - return this; - } - - public ProjectLocationApiDeploymentArtifactBuilder setDeployment(String deployment) { - this.deployment = deployment; - return this; - } - - public ProjectLocationApiDeploymentArtifactBuilder setArtifact(String artifact) { - this.artifact = artifact; - return this; - } - - public ArtifactName build() { - return new ArtifactName(this); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactOrBuilder.java deleted file mode 100644 index 9b1afbbcc67d..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ArtifactOrBuilder.java +++ /dev/null @@ -1,158 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_models.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ArtifactOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.Artifact) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * A content type specifier for the artifact.
-   * Content type specifiers are Media Types
-   * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
-   * parameter that specifies a schema for the stored information.
-   * Content types can specify compression. Currently only GZip compression is
-   * supported (indicated with "+gzip").
-   * 
- * - * string mime_type = 4; - * @return The mimeType. - */ - java.lang.String getMimeType(); - /** - *
-   * A content type specifier for the artifact.
-   * Content type specifiers are Media Types
-   * (https://en.wikipedia.org/wiki/Media_type) with a possible "schema"
-   * parameter that specifies a schema for the stored information.
-   * Content types can specify compression. Currently only GZip compression is
-   * supported (indicated with "+gzip").
-   * 
- * - * string mime_type = 4; - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString - getMimeTypeBytes(); - - /** - *
-   * Output only. The size of the artifact in bytes. If the artifact is gzipped, this is
-   * the size of the uncompressed artifact.
-   * 
- * - * int32 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sizeBytes. - */ - int getSizeBytes(); - - /** - *
-   * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
-   * this is the hash of the uncompressed artifact.
-   * 
- * - * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The hash. - */ - java.lang.String getHash(); - /** - *
-   * Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped,
-   * this is the hash of the uncompressed artifact.
-   * 
- * - * string hash = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for hash. - */ - com.google.protobuf.ByteString - getHashBytes(); - - /** - *
-   * Input only. The contents of the artifact.
-   * Provided by API callers when artifacts are created or replaced.
-   * To access the contents of an artifact, use GetArtifactContents.
-   * 
- * - * bytes contents = 7 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return The contents. - */ - com.google.protobuf.ByteString getContents(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequest.java deleted file mode 100644 index 8bee5d23969e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for CreateApiDeployment.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest} - */ -public final class CreateApiDeploymentRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) - CreateApiDeploymentRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateApiDeploymentRequest.newBuilder() to construct. - private CreateApiDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateApiDeploymentRequest() { - parent_ = ""; - apiDeploymentId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateApiDeploymentRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateApiDeploymentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder subBuilder = null; - if (apiDeployment_ != null) { - subBuilder = apiDeployment_.toBuilder(); - } - apiDeployment_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiDeployment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(apiDeployment_); - apiDeployment_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - apiDeploymentId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent, which owns this collection of deployments.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 deployments.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 API_DEPLOYMENT_FIELD_NUMBER = 2; - private com.google.cloud.apigeeregistry.v1.ApiDeployment apiDeployment_; - /** - *
-   * Required. The deployment to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiDeployment field is set. - */ - @java.lang.Override - public boolean hasApiDeployment() { - return apiDeployment_ != null; - } - /** - *
-   * Required. The deployment to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiDeployment. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment() { - return apiDeployment_ == null ? com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; - } - /** - *
-   * Required. The deployment to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder() { - return getApiDeployment(); - } - - public static final int API_DEPLOYMENT_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object apiDeploymentId_; - /** - *
-   * Required. The ID to use for the deployment, which will become the final component of
-   * the deployment's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiDeploymentId. - */ - @java.lang.Override - public java.lang.String getApiDeploymentId() { - java.lang.Object ref = apiDeploymentId_; - 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(); - apiDeploymentId_ = s; - return s; - } - } - /** - *
-   * Required. The ID to use for the deployment, which will become the final component of
-   * the deployment's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiDeploymentId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getApiDeploymentIdBytes() { - java.lang.Object ref = apiDeploymentId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiDeploymentId_ = 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.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (apiDeployment_ != null) { - output.writeMessage(2, getApiDeployment()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiDeploymentId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, apiDeploymentId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (apiDeployment_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getApiDeployment()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiDeploymentId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, apiDeploymentId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest other = (com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasApiDeployment() != other.hasApiDeployment()) return false; - if (hasApiDeployment()) { - if (!getApiDeployment() - .equals(other.getApiDeployment())) return false; - } - if (!getApiDeploymentId() - .equals(other.getApiDeploymentId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasApiDeployment()) { - hash = (37 * hash) + API_DEPLOYMENT_FIELD_NUMBER; - hash = (53 * hash) + getApiDeployment().hashCode(); - } - hash = (37 * hash) + API_DEPLOYMENT_ID_FIELD_NUMBER; - hash = (53 * hash) + getApiDeploymentId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest 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.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest 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.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for CreateApiDeployment.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) - com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (apiDeploymentBuilder_ == null) { - apiDeployment_ = null; - } else { - apiDeployment_ = null; - apiDeploymentBuilder_ = null; - } - apiDeploymentId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest build() { - com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest result = new com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest(this); - result.parent_ = parent_; - if (apiDeploymentBuilder_ == null) { - result.apiDeployment_ = apiDeployment_; - } else { - result.apiDeployment_ = apiDeploymentBuilder_.build(); - } - result.apiDeploymentId_ = apiDeploymentId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasApiDeployment()) { - mergeApiDeployment(other.getApiDeployment()); - } - if (!other.getApiDeploymentId().isEmpty()) { - apiDeploymentId_ = other.apiDeploymentId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent, which owns this collection of deployments.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 deployments.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 deployments.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of deployments.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of deployments.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.apigeeregistry.v1.ApiDeployment apiDeployment_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> apiDeploymentBuilder_; - /** - *
-     * Required. The deployment to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiDeployment field is set. - */ - public boolean hasApiDeployment() { - return apiDeploymentBuilder_ != null || apiDeployment_ != null; - } - /** - *
-     * Required. The deployment to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiDeployment. - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment() { - if (apiDeploymentBuilder_ == null) { - return apiDeployment_ == null ? com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; - } else { - return apiDeploymentBuilder_.getMessage(); - } - } - /** - *
-     * Required. The deployment to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiDeployment(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { - if (apiDeploymentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - apiDeployment_ = value; - onChanged(); - } else { - apiDeploymentBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The deployment to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiDeployment( - com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { - if (apiDeploymentBuilder_ == null) { - apiDeployment_ = builderForValue.build(); - onChanged(); - } else { - apiDeploymentBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The deployment to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeApiDeployment(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { - if (apiDeploymentBuilder_ == null) { - if (apiDeployment_ != null) { - apiDeployment_ = - com.google.cloud.apigeeregistry.v1.ApiDeployment.newBuilder(apiDeployment_).mergeFrom(value).buildPartial(); - } else { - apiDeployment_ = value; - } - onChanged(); - } else { - apiDeploymentBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The deployment to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearApiDeployment() { - if (apiDeploymentBuilder_ == null) { - apiDeployment_ = null; - onChanged(); - } else { - apiDeployment_ = null; - apiDeploymentBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The deployment to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder getApiDeploymentBuilder() { - - onChanged(); - return getApiDeploymentFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The deployment to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder() { - if (apiDeploymentBuilder_ != null) { - return apiDeploymentBuilder_.getMessageOrBuilder(); - } else { - return apiDeployment_ == null ? - com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; - } - } - /** - *
-     * Required. The deployment to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> - getApiDeploymentFieldBuilder() { - if (apiDeploymentBuilder_ == null) { - apiDeploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder>( - getApiDeployment(), - getParentForChildren(), - isClean()); - apiDeployment_ = null; - } - return apiDeploymentBuilder_; - } - - private java.lang.Object apiDeploymentId_ = ""; - /** - *
-     * Required. The ID to use for the deployment, which will become the final component of
-     * the deployment's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiDeploymentId. - */ - public java.lang.String getApiDeploymentId() { - java.lang.Object ref = apiDeploymentId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiDeploymentId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ID to use for the deployment, which will become the final component of
-     * the deployment's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiDeploymentId. - */ - public com.google.protobuf.ByteString - getApiDeploymentIdBytes() { - java.lang.Object ref = apiDeploymentId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiDeploymentId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ID to use for the deployment, which will become the final component of
-     * the deployment's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The apiDeploymentId to set. - * @return This builder for chaining. - */ - public Builder setApiDeploymentId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - apiDeploymentId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the deployment, which will become the final component of
-     * the deployment's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearApiDeploymentId() { - - apiDeploymentId_ = getDefaultInstance().getApiDeploymentId(); - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the deployment, which will become the final component of
-     * the deployment's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for apiDeploymentId to set. - * @return This builder for chaining. - */ - public Builder setApiDeploymentIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - apiDeploymentId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) - private static final com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateApiDeploymentRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateApiDeploymentRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequestOrBuilder.java deleted file mode 100644 index 19d23f27f2ad..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiDeploymentRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface CreateApiDeploymentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent, which owns this collection of deployments.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 deployments.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The deployment to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiDeployment field is set. - */ - boolean hasApiDeployment(); - /** - *
-   * Required. The deployment to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiDeployment. - */ - com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment(); - /** - *
-   * Required. The deployment to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder(); - - /** - *
-   * Required. The ID to use for the deployment, which will become the final component of
-   * the deployment's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiDeploymentId. - */ - java.lang.String getApiDeploymentId(); - /** - *
-   * Required. The ID to use for the deployment, which will become the final component of
-   * the deployment's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiDeploymentId. - */ - com.google.protobuf.ByteString - getApiDeploymentIdBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequest.java deleted file mode 100644 index a27171874fa7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for CreateApi.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiRequest} - */ -public final class CreateApiRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateApiRequest) - CreateApiRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateApiRequest.newBuilder() to construct. - private CreateApiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateApiRequest() { - parent_ = ""; - apiId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateApiRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateApiRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.apigeeregistry.v1.Api.Builder subBuilder = null; - if (api_ != null) { - subBuilder = api_.toBuilder(); - } - api_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Api.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(api_); - api_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - apiId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateApiRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent, which owns this collection of APIs.
-   * Format: `projects/*/locations/*`
-   * 
- * - * 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 APIs.
-   * Format: `projects/*/locations/*`
-   * 
- * - * 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 API_FIELD_NUMBER = 2; - private com.google.cloud.apigeeregistry.v1.Api api_; - /** - *
-   * Required. The API to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the api field is set. - */ - @java.lang.Override - public boolean hasApi() { - return api_ != null; - } - /** - *
-   * Required. The API to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The api. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Api getApi() { - return api_ == null ? com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; - } - /** - *
-   * Required. The API to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder() { - return getApi(); - } - - public static final int API_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object apiId_; - /** - *
-   * Required. The ID to use for the API, which will become the final component of
-   * the API's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiId. - */ - @java.lang.Override - public java.lang.String getApiId() { - java.lang.Object ref = apiId_; - 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(); - apiId_ = s; - return s; - } - } - /** - *
-   * Required. The ID to use for the API, which will become the final component of
-   * the API's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getApiIdBytes() { - java.lang.Object ref = apiId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiId_ = 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.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (api_ != null) { - output.writeMessage(2, getApi()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, apiId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (api_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getApi()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, apiId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateApiRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.CreateApiRequest other = (com.google.cloud.apigeeregistry.v1.CreateApiRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasApi() != other.hasApi()) return false; - if (hasApi()) { - if (!getApi() - .equals(other.getApi())) return false; - } - if (!getApiId() - .equals(other.getApiId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasApi()) { - hash = (37 * hash) + API_FIELD_NUMBER; - hash = (53 * hash) + getApi().hashCode(); - } - hash = (37 * hash) + API_ID_FIELD_NUMBER; - hash = (53 * hash) + getApiId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiRequest 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.apigeeregistry.v1.CreateApiRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiRequest 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.apigeeregistry.v1.CreateApiRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateApiRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for CreateApi.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateApiRequest) - com.google.cloud.apigeeregistry.v1.CreateApiRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateApiRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.CreateApiRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (apiBuilder_ == null) { - api_ = null; - } else { - api_ = null; - apiBuilder_ = null; - } - apiId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.CreateApiRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiRequest build() { - com.google.cloud.apigeeregistry.v1.CreateApiRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.CreateApiRequest result = new com.google.cloud.apigeeregistry.v1.CreateApiRequest(this); - result.parent_ = parent_; - if (apiBuilder_ == null) { - result.api_ = api_; - } else { - result.api_ = apiBuilder_.build(); - } - result.apiId_ = apiId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.CreateApiRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateApiRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateApiRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.CreateApiRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasApi()) { - mergeApi(other.getApi()); - } - if (!other.getApiId().isEmpty()) { - apiId_ = other.apiId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.CreateApiRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateApiRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent, which owns this collection of APIs.
-     * Format: `projects/*/locations/*`
-     * 
- * - * 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 APIs.
-     * Format: `projects/*/locations/*`
-     * 
- * - * 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 APIs.
-     * Format: `projects/*/locations/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of APIs.
-     * Format: `projects/*/locations/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of APIs.
-     * Format: `projects/*/locations/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.apigeeregistry.v1.Api api_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> apiBuilder_; - /** - *
-     * Required. The API to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the api field is set. - */ - public boolean hasApi() { - return apiBuilder_ != null || api_ != null; - } - /** - *
-     * Required. The API to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The api. - */ - public com.google.cloud.apigeeregistry.v1.Api getApi() { - if (apiBuilder_ == null) { - return api_ == null ? com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; - } else { - return apiBuilder_.getMessage(); - } - } - /** - *
-     * Required. The API to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApi(com.google.cloud.apigeeregistry.v1.Api value) { - if (apiBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - api_ = value; - onChanged(); - } else { - apiBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The API to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApi( - com.google.cloud.apigeeregistry.v1.Api.Builder builderForValue) { - if (apiBuilder_ == null) { - api_ = builderForValue.build(); - onChanged(); - } else { - apiBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The API to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeApi(com.google.cloud.apigeeregistry.v1.Api value) { - if (apiBuilder_ == null) { - if (api_ != null) { - api_ = - com.google.cloud.apigeeregistry.v1.Api.newBuilder(api_).mergeFrom(value).buildPartial(); - } else { - api_ = value; - } - onChanged(); - } else { - apiBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The API to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearApi() { - if (apiBuilder_ == null) { - api_ = null; - onChanged(); - } else { - api_ = null; - apiBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The API to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.Api.Builder getApiBuilder() { - - onChanged(); - return getApiFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The API to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder() { - if (apiBuilder_ != null) { - return apiBuilder_.getMessageOrBuilder(); - } else { - return api_ == null ? - com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; - } - } - /** - *
-     * Required. The API to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> - getApiFieldBuilder() { - if (apiBuilder_ == null) { - apiBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder>( - getApi(), - getParentForChildren(), - isClean()); - api_ = null; - } - return apiBuilder_; - } - - private java.lang.Object apiId_ = ""; - /** - *
-     * Required. The ID to use for the API, which will become the final component of
-     * the API's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiId. - */ - public java.lang.String getApiId() { - java.lang.Object ref = apiId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ID to use for the API, which will become the final component of
-     * the API's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiId. - */ - public com.google.protobuf.ByteString - getApiIdBytes() { - java.lang.Object ref = apiId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ID to use for the API, which will become the final component of
-     * the API's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The apiId to set. - * @return This builder for chaining. - */ - public Builder setApiId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - apiId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the API, which will become the final component of
-     * the API's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearApiId() { - - apiId_ = getDefaultInstance().getApiId(); - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the API, which will become the final component of
-     * the API's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for apiId to set. - * @return This builder for chaining. - */ - public Builder setApiIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - apiId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateApiRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateApiRequest) - private static final com.google.cloud.apigeeregistry.v1.CreateApiRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateApiRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.CreateApiRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateApiRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateApiRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequestOrBuilder.java deleted file mode 100644 index 84746e0e4597..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface CreateApiRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateApiRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent, which owns this collection of APIs.
-   * Format: `projects/*/locations/*`
-   * 
- * - * 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 APIs.
-   * Format: `projects/*/locations/*`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The API to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the api field is set. - */ - boolean hasApi(); - /** - *
-   * Required. The API to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The api. - */ - com.google.cloud.apigeeregistry.v1.Api getApi(); - /** - *
-   * Required. The API to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder(); - - /** - *
-   * Required. The ID to use for the API, which will become the final component of
-   * the API's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiId. - */ - java.lang.String getApiId(); - /** - *
-   * Required. The ID to use for the API, which will become the final component of
-   * the API's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiId. - */ - com.google.protobuf.ByteString - getApiIdBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequest.java deleted file mode 100644 index b8f4bb7c6202..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for CreateApiSpec.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiSpecRequest} - */ -public final class CreateApiSpecRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateApiSpecRequest) - CreateApiSpecRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateApiSpecRequest.newBuilder() to construct. - private CreateApiSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateApiSpecRequest() { - parent_ = ""; - apiSpecId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateApiSpecRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateApiSpecRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.apigeeregistry.v1.ApiSpec.Builder subBuilder = null; - if (apiSpec_ != null) { - subBuilder = apiSpec_.toBuilder(); - } - apiSpec_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(apiSpec_); - apiSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - apiSpecId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent, which owns this collection of specs.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * 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 specs.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * 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 API_SPEC_FIELD_NUMBER = 2; - private com.google.cloud.apigeeregistry.v1.ApiSpec apiSpec_; - /** - *
-   * Required. The spec to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiSpec field is set. - */ - @java.lang.Override - public boolean hasApiSpec() { - return apiSpec_ != null; - } - /** - *
-   * Required. The spec to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiSpec. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec() { - return apiSpec_ == null ? com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; - } - /** - *
-   * Required. The spec to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder() { - return getApiSpec(); - } - - public static final int API_SPEC_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object apiSpecId_; - /** - *
-   * Required. The ID to use for the spec, which will become the final component of
-   * the spec's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiSpecId. - */ - @java.lang.Override - public java.lang.String getApiSpecId() { - java.lang.Object ref = apiSpecId_; - 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(); - apiSpecId_ = s; - return s; - } - } - /** - *
-   * Required. The ID to use for the spec, which will become the final component of
-   * the spec's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiSpecId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getApiSpecIdBytes() { - java.lang.Object ref = apiSpecId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiSpecId_ = 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.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (apiSpec_ != null) { - output.writeMessage(2, getApiSpec()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiSpecId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, apiSpecId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (apiSpec_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getApiSpec()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiSpecId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, apiSpecId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest other = (com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasApiSpec() != other.hasApiSpec()) return false; - if (hasApiSpec()) { - if (!getApiSpec() - .equals(other.getApiSpec())) return false; - } - if (!getApiSpecId() - .equals(other.getApiSpecId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasApiSpec()) { - hash = (37 * hash) + API_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getApiSpec().hashCode(); - } - hash = (37 * hash) + API_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getApiSpecId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest 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.apigeeregistry.v1.CreateApiSpecRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest 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.apigeeregistry.v1.CreateApiSpecRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for CreateApiSpec.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiSpecRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateApiSpecRequest) - com.google.cloud.apigeeregistry.v1.CreateApiSpecRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (apiSpecBuilder_ == null) { - apiSpec_ = null; - } else { - apiSpec_ = null; - apiSpecBuilder_ = null; - } - apiSpecId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest build() { - com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest result = new com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest(this); - result.parent_ = parent_; - if (apiSpecBuilder_ == null) { - result.apiSpec_ = apiSpec_; - } else { - result.apiSpec_ = apiSpecBuilder_.build(); - } - result.apiSpecId_ = apiSpecId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasApiSpec()) { - mergeApiSpec(other.getApiSpec()); - } - if (!other.getApiSpecId().isEmpty()) { - apiSpecId_ = other.apiSpecId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent, which owns this collection of specs.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * 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 specs.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * 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 specs.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of specs.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of specs.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.apigeeregistry.v1.ApiSpec apiSpec_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> apiSpecBuilder_; - /** - *
-     * Required. The spec to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiSpec field is set. - */ - public boolean hasApiSpec() { - return apiSpecBuilder_ != null || apiSpec_ != null; - } - /** - *
-     * Required. The spec to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiSpec. - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec() { - if (apiSpecBuilder_ == null) { - return apiSpec_ == null ? com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; - } else { - return apiSpecBuilder_.getMessage(); - } - } - /** - *
-     * Required. The spec to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiSpec(com.google.cloud.apigeeregistry.v1.ApiSpec value) { - if (apiSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - apiSpec_ = value; - onChanged(); - } else { - apiSpecBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The spec to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiSpec( - com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { - if (apiSpecBuilder_ == null) { - apiSpec_ = builderForValue.build(); - onChanged(); - } else { - apiSpecBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The spec to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeApiSpec(com.google.cloud.apigeeregistry.v1.ApiSpec value) { - if (apiSpecBuilder_ == null) { - if (apiSpec_ != null) { - apiSpec_ = - com.google.cloud.apigeeregistry.v1.ApiSpec.newBuilder(apiSpec_).mergeFrom(value).buildPartial(); - } else { - apiSpec_ = value; - } - onChanged(); - } else { - apiSpecBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The spec to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearApiSpec() { - if (apiSpecBuilder_ == null) { - apiSpec_ = null; - onChanged(); - } else { - apiSpec_ = null; - apiSpecBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The spec to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder getApiSpecBuilder() { - - onChanged(); - return getApiSpecFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The spec to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder() { - if (apiSpecBuilder_ != null) { - return apiSpecBuilder_.getMessageOrBuilder(); - } else { - return apiSpec_ == null ? - com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; - } - } - /** - *
-     * Required. The spec to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> - getApiSpecFieldBuilder() { - if (apiSpecBuilder_ == null) { - apiSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder>( - getApiSpec(), - getParentForChildren(), - isClean()); - apiSpec_ = null; - } - return apiSpecBuilder_; - } - - private java.lang.Object apiSpecId_ = ""; - /** - *
-     * Required. The ID to use for the spec, which will become the final component of
-     * the spec's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiSpecId. - */ - public java.lang.String getApiSpecId() { - java.lang.Object ref = apiSpecId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiSpecId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ID to use for the spec, which will become the final component of
-     * the spec's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiSpecId. - */ - public com.google.protobuf.ByteString - getApiSpecIdBytes() { - java.lang.Object ref = apiSpecId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ID to use for the spec, which will become the final component of
-     * the spec's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The apiSpecId to set. - * @return This builder for chaining. - */ - public Builder setApiSpecId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - apiSpecId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the spec, which will become the final component of
-     * the spec's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearApiSpecId() { - - apiSpecId_ = getDefaultInstance().getApiSpecId(); - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the spec, which will become the final component of
-     * the spec's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for apiSpecId to set. - * @return This builder for chaining. - */ - public Builder setApiSpecIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - apiSpecId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateApiSpecRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateApiSpecRequest) - private static final com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateApiSpecRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateApiSpecRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequestOrBuilder.java deleted file mode 100644 index 6af64b95120c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiSpecRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface CreateApiSpecRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateApiSpecRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent, which owns this collection of specs.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * 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 specs.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The spec to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiSpec field is set. - */ - boolean hasApiSpec(); - /** - *
-   * Required. The spec to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiSpec. - */ - com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec(); - /** - *
-   * Required. The spec to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder(); - - /** - *
-   * Required. The ID to use for the spec, which will become the final component of
-   * the spec's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiSpecId. - */ - java.lang.String getApiSpecId(); - /** - *
-   * Required. The ID to use for the spec, which will become the final component of
-   * the spec's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_spec_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiSpecId. - */ - com.google.protobuf.ByteString - getApiSpecIdBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequest.java deleted file mode 100644 index ae95250ae198..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for CreateApiVersion.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiVersionRequest} - */ -public final class CreateApiVersionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateApiVersionRequest) - CreateApiVersionRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateApiVersionRequest.newBuilder() to construct. - private CreateApiVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateApiVersionRequest() { - parent_ = ""; - apiVersionId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateApiVersionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateApiVersionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.apigeeregistry.v1.ApiVersion.Builder subBuilder = null; - if (apiVersion_ != null) { - subBuilder = apiVersion_.toBuilder(); - } - apiVersion_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiVersion.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(apiVersion_); - apiVersion_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - apiVersionId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent, which owns this collection of versions.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 versions.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 API_VERSION_FIELD_NUMBER = 2; - private com.google.cloud.apigeeregistry.v1.ApiVersion apiVersion_; - /** - *
-   * Required. The version to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiVersion field is set. - */ - @java.lang.Override - public boolean hasApiVersion() { - return apiVersion_ != null; - } - /** - *
-   * Required. The version to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiVersion. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion() { - return apiVersion_ == null ? com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; - } - /** - *
-   * Required. The version to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder() { - return getApiVersion(); - } - - public static final int API_VERSION_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object apiVersionId_; - /** - *
-   * Required. The ID to use for the version, which will become the final component of
-   * the version's resource name.
-   * This value should be 1-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiVersionId. - */ - @java.lang.Override - public java.lang.String getApiVersionId() { - java.lang.Object ref = apiVersionId_; - 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(); - apiVersionId_ = s; - return s; - } - } - /** - *
-   * Required. The ID to use for the version, which will become the final component of
-   * the version's resource name.
-   * This value should be 1-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiVersionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getApiVersionIdBytes() { - java.lang.Object ref = apiVersionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiVersionId_ = 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.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (apiVersion_ != null) { - output.writeMessage(2, getApiVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, apiVersionId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (apiVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getApiVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, apiVersionId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest other = (com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasApiVersion() != other.hasApiVersion()) return false; - if (hasApiVersion()) { - if (!getApiVersion() - .equals(other.getApiVersion())) return false; - } - if (!getApiVersionId() - .equals(other.getApiVersionId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasApiVersion()) { - hash = (37 * hash) + API_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getApiVersion().hashCode(); - } - hash = (37 * hash) + API_VERSION_ID_FIELD_NUMBER; - hash = (53 * hash) + getApiVersionId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest 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.apigeeregistry.v1.CreateApiVersionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest 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.apigeeregistry.v1.CreateApiVersionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for CreateApiVersion.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateApiVersionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateApiVersionRequest) - com.google.cloud.apigeeregistry.v1.CreateApiVersionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (apiVersionBuilder_ == null) { - apiVersion_ = null; - } else { - apiVersion_ = null; - apiVersionBuilder_ = null; - } - apiVersionId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest build() { - com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest result = new com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest(this); - result.parent_ = parent_; - if (apiVersionBuilder_ == null) { - result.apiVersion_ = apiVersion_; - } else { - result.apiVersion_ = apiVersionBuilder_.build(); - } - result.apiVersionId_ = apiVersionId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasApiVersion()) { - mergeApiVersion(other.getApiVersion()); - } - if (!other.getApiVersionId().isEmpty()) { - apiVersionId_ = other.apiVersionId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent, which owns this collection of versions.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 versions.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 versions.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of versions.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of versions.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.apigeeregistry.v1.ApiVersion apiVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> apiVersionBuilder_; - /** - *
-     * Required. The version to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiVersion field is set. - */ - public boolean hasApiVersion() { - return apiVersionBuilder_ != null || apiVersion_ != null; - } - /** - *
-     * Required. The version to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiVersion. - */ - public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion() { - if (apiVersionBuilder_ == null) { - return apiVersion_ == null ? com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; - } else { - return apiVersionBuilder_.getMessage(); - } - } - /** - *
-     * Required. The version to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiVersion(com.google.cloud.apigeeregistry.v1.ApiVersion value) { - if (apiVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - apiVersion_ = value; - onChanged(); - } else { - apiVersionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The version to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiVersion( - com.google.cloud.apigeeregistry.v1.ApiVersion.Builder builderForValue) { - if (apiVersionBuilder_ == null) { - apiVersion_ = builderForValue.build(); - onChanged(); - } else { - apiVersionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The version to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeApiVersion(com.google.cloud.apigeeregistry.v1.ApiVersion value) { - if (apiVersionBuilder_ == null) { - if (apiVersion_ != null) { - apiVersion_ = - com.google.cloud.apigeeregistry.v1.ApiVersion.newBuilder(apiVersion_).mergeFrom(value).buildPartial(); - } else { - apiVersion_ = value; - } - onChanged(); - } else { - apiVersionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The version to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearApiVersion() { - if (apiVersionBuilder_ == null) { - apiVersion_ = null; - onChanged(); - } else { - apiVersion_ = null; - apiVersionBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The version to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiVersion.Builder getApiVersionBuilder() { - - onChanged(); - return getApiVersionFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The version to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder() { - if (apiVersionBuilder_ != null) { - return apiVersionBuilder_.getMessageOrBuilder(); - } else { - return apiVersion_ == null ? - com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; - } - } - /** - *
-     * Required. The version to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> - getApiVersionFieldBuilder() { - if (apiVersionBuilder_ == null) { - apiVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder>( - getApiVersion(), - getParentForChildren(), - isClean()); - apiVersion_ = null; - } - return apiVersionBuilder_; - } - - private java.lang.Object apiVersionId_ = ""; - /** - *
-     * Required. The ID to use for the version, which will become the final component of
-     * the version's resource name.
-     * This value should be 1-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiVersionId. - */ - public java.lang.String getApiVersionId() { - java.lang.Object ref = apiVersionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ID to use for the version, which will become the final component of
-     * the version's resource name.
-     * This value should be 1-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiVersionId. - */ - public com.google.protobuf.ByteString - getApiVersionIdBytes() { - java.lang.Object ref = apiVersionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiVersionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ID to use for the version, which will become the final component of
-     * the version's resource name.
-     * This value should be 1-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The apiVersionId to set. - * @return This builder for chaining. - */ - public Builder setApiVersionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - apiVersionId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the version, which will become the final component of
-     * the version's resource name.
-     * This value should be 1-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearApiVersionId() { - - apiVersionId_ = getDefaultInstance().getApiVersionId(); - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the version, which will become the final component of
-     * the version's resource name.
-     * This value should be 1-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for apiVersionId to set. - * @return This builder for chaining. - */ - public Builder setApiVersionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - apiVersionId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateApiVersionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateApiVersionRequest) - private static final com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateApiVersionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateApiVersionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequestOrBuilder.java deleted file mode 100644 index 7590ad065a8c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateApiVersionRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface CreateApiVersionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateApiVersionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent, which owns this collection of versions.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 versions.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The version to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiVersion field is set. - */ - boolean hasApiVersion(); - /** - *
-   * Required. The version to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiVersion. - */ - com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion(); - /** - *
-   * Required. The version to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder(); - - /** - *
-   * Required. The ID to use for the version, which will become the final component of
-   * the version's resource name.
-   * This value should be 1-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiVersionId. - */ - java.lang.String getApiVersionId(); - /** - *
-   * Required. The ID to use for the version, which will become the final component of
-   * the version's resource name.
-   * This value should be 1-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string api_version_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for apiVersionId. - */ - com.google.protobuf.ByteString - getApiVersionIdBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequest.java deleted file mode 100644 index 2b0b8fea0437..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for CreateArtifact.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateArtifactRequest} - */ -public final class CreateArtifactRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateArtifactRequest) - CreateArtifactRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateArtifactRequest.newBuilder() to construct. - private CreateArtifactRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateArtifactRequest() { - parent_ = ""; - artifactId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateArtifactRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateArtifactRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.apigeeregistry.v1.Artifact.Builder subBuilder = null; - if (artifact_ != null) { - subBuilder = artifact_.toBuilder(); - } - artifact_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Artifact.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(artifact_); - artifact_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - artifactId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.class, com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent, which owns this collection of artifacts.
-   * Format: `{parent}`
-   * 
- * - * 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 artifacts.
-   * Format: `{parent}`
-   * 
- * - * 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 ARTIFACT_FIELD_NUMBER = 2; - private com.google.cloud.apigeeregistry.v1.Artifact artifact_; - /** - *
-   * Required. The artifact to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the artifact field is set. - */ - @java.lang.Override - public boolean hasArtifact() { - return artifact_ != null; - } - /** - *
-   * Required. The artifact to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The artifact. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Artifact getArtifact() { - return artifact_ == null ? com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; - } - /** - *
-   * Required. The artifact to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder() { - return getArtifact(); - } - - public static final int ARTIFACT_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object artifactId_; - /** - *
-   * Required. The ID to use for the artifact, which will become the final component of
-   * the artifact's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The artifactId. - */ - @java.lang.Override - public java.lang.String getArtifactId() { - java.lang.Object ref = artifactId_; - 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(); - artifactId_ = s; - return s; - } - } - /** - *
-   * Required. The ID to use for the artifact, which will become the final component of
-   * the artifact's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for artifactId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getArtifactIdBytes() { - java.lang.Object ref = artifactId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - artifactId_ = 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.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (artifact_ != null) { - output.writeMessage(2, getArtifact()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, artifactId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (artifact_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getArtifact()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, artifactId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateArtifactRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.CreateArtifactRequest other = (com.google.cloud.apigeeregistry.v1.CreateArtifactRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasArtifact() != other.hasArtifact()) return false; - if (hasArtifact()) { - if (!getArtifact() - .equals(other.getArtifact())) return false; - } - if (!getArtifactId() - .equals(other.getArtifactId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasArtifact()) { - hash = (37 * hash) + ARTIFACT_FIELD_NUMBER; - hash = (53 * hash) + getArtifact().hashCode(); - } - hash = (37 * hash) + ARTIFACT_ID_FIELD_NUMBER; - hash = (53 * hash) + getArtifactId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest 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.apigeeregistry.v1.CreateArtifactRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest 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.apigeeregistry.v1.CreateArtifactRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateArtifactRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for CreateArtifact.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateArtifactRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateArtifactRequest) - com.google.cloud.apigeeregistry.v1.CreateArtifactRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.class, com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (artifactBuilder_ == null) { - artifact_ = null; - } else { - artifact_ = null; - artifactBuilder_ = null; - } - artifactId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateArtifactRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateArtifactRequest build() { - com.google.cloud.apigeeregistry.v1.CreateArtifactRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateArtifactRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.CreateArtifactRequest result = new com.google.cloud.apigeeregistry.v1.CreateArtifactRequest(this); - result.parent_ = parent_; - if (artifactBuilder_ == null) { - result.artifact_ = artifact_; - } else { - result.artifact_ = artifactBuilder_.build(); - } - result.artifactId_ = artifactId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.CreateArtifactRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateArtifactRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateArtifactRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.CreateArtifactRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasArtifact()) { - mergeArtifact(other.getArtifact()); - } - if (!other.getArtifactId().isEmpty()) { - artifactId_ = other.artifactId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.CreateArtifactRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateArtifactRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent, which owns this collection of artifacts.
-     * Format: `{parent}`
-     * 
- * - * 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 artifacts.
-     * Format: `{parent}`
-     * 
- * - * 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 artifacts.
-     * Format: `{parent}`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of artifacts.
-     * Format: `{parent}`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of artifacts.
-     * Format: `{parent}`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.apigeeregistry.v1.Artifact artifact_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> artifactBuilder_; - /** - *
-     * Required. The artifact to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the artifact field is set. - */ - public boolean hasArtifact() { - return artifactBuilder_ != null || artifact_ != null; - } - /** - *
-     * Required. The artifact to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The artifact. - */ - public com.google.cloud.apigeeregistry.v1.Artifact getArtifact() { - if (artifactBuilder_ == null) { - return artifact_ == null ? com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; - } else { - return artifactBuilder_.getMessage(); - } - } - /** - *
-     * Required. The artifact to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setArtifact(com.google.cloud.apigeeregistry.v1.Artifact value) { - if (artifactBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - artifact_ = value; - onChanged(); - } else { - artifactBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The artifact to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setArtifact( - com.google.cloud.apigeeregistry.v1.Artifact.Builder builderForValue) { - if (artifactBuilder_ == null) { - artifact_ = builderForValue.build(); - onChanged(); - } else { - artifactBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The artifact to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeArtifact(com.google.cloud.apigeeregistry.v1.Artifact value) { - if (artifactBuilder_ == null) { - if (artifact_ != null) { - artifact_ = - com.google.cloud.apigeeregistry.v1.Artifact.newBuilder(artifact_).mergeFrom(value).buildPartial(); - } else { - artifact_ = value; - } - onChanged(); - } else { - artifactBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The artifact to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearArtifact() { - if (artifactBuilder_ == null) { - artifact_ = null; - onChanged(); - } else { - artifact_ = null; - artifactBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The artifact to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.Artifact.Builder getArtifactBuilder() { - - onChanged(); - return getArtifactFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The artifact to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder() { - if (artifactBuilder_ != null) { - return artifactBuilder_.getMessageOrBuilder(); - } else { - return artifact_ == null ? - com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; - } - } - /** - *
-     * Required. The artifact to create.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> - getArtifactFieldBuilder() { - if (artifactBuilder_ == null) { - artifactBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder>( - getArtifact(), - getParentForChildren(), - isClean()); - artifact_ = null; - } - return artifactBuilder_; - } - - private java.lang.Object artifactId_ = ""; - /** - *
-     * Required. The ID to use for the artifact, which will become the final component of
-     * the artifact's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The artifactId. - */ - public java.lang.String getArtifactId() { - java.lang.Object ref = artifactId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - artifactId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ID to use for the artifact, which will become the final component of
-     * the artifact's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for artifactId. - */ - public com.google.protobuf.ByteString - getArtifactIdBytes() { - java.lang.Object ref = artifactId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - artifactId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ID to use for the artifact, which will become the final component of
-     * the artifact's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The artifactId to set. - * @return This builder for chaining. - */ - public Builder setArtifactId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - artifactId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the artifact, which will become the final component of
-     * the artifact's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearArtifactId() { - - artifactId_ = getDefaultInstance().getArtifactId(); - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the artifact, which will become the final component of
-     * the artifact's resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Following AIP-162, IDs must not have the form of a UUID.
-     * 
- * - * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for artifactId to set. - * @return This builder for chaining. - */ - public Builder setArtifactIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - artifactId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateArtifactRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateArtifactRequest) - private static final com.google.cloud.apigeeregistry.v1.CreateArtifactRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateArtifactRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.CreateArtifactRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateArtifactRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateArtifactRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateArtifactRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequestOrBuilder.java deleted file mode 100644 index 378de0e5db66..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateArtifactRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface CreateArtifactRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateArtifactRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent, which owns this collection of artifacts.
-   * Format: `{parent}`
-   * 
- * - * 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 artifacts.
-   * Format: `{parent}`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The artifact to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the artifact field is set. - */ - boolean hasArtifact(); - /** - *
-   * Required. The artifact to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The artifact. - */ - com.google.cloud.apigeeregistry.v1.Artifact getArtifact(); - /** - *
-   * Required. The artifact to create.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder(); - - /** - *
-   * Required. The ID to use for the artifact, which will become the final component of
-   * the artifact's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The artifactId. - */ - java.lang.String getArtifactId(); - /** - *
-   * Required. The ID to use for the artifact, which will become the final component of
-   * the artifact's resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Following AIP-162, IDs must not have the form of a UUID.
-   * 
- * - * string artifact_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for artifactId. - */ - com.google.protobuf.ByteString - getArtifactIdBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequest.java deleted file mode 100644 index dd96e97231b8..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequest.java +++ /dev/null @@ -1,1004 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for CreateInstance.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateInstanceRequest} - */ -public final class CreateInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.CreateInstanceRequest) - CreateInstanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateInstanceRequest.newBuilder() to construct. - private CreateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateInstanceRequest() { - parent_ = ""; - instanceId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateInstanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateInstanceRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - instanceId_ = s; - break; - } - case 26: { - com.google.cloud.apigeeregistry.v1.Instance.Builder subBuilder = null; - if (instance_ != null) { - subBuilder = instance_.toBuilder(); - } - instance_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Instance.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instance_); - instance_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.class, com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
-   * 
- * - * 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. Parent resource of the Instance, of the form: `projects/*/locations/*`
-   * 
- * - * 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 INSTANCE_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object instanceId_; - /** - *
-   * Required. Identifier to assign to the Instance. Must be unique within scope of the
-   * parent resource.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instanceId. - */ - @java.lang.Override - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - 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(); - instanceId_ = s; - return s; - } - } - /** - *
-   * Required. Identifier to assign to the Instance. Must be unique within scope of the
-   * parent resource.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for instanceId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSTANCE_FIELD_NUMBER = 3; - private com.google.cloud.apigeeregistry.v1.Instance instance_; - /** - *
-   * Required. The Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - @java.lang.Override - public boolean hasInstance() { - return instance_ != null; - } - /** - *
-   * Required. The Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance getInstance() { - return instance_ == null ? com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance() : instance_; - } - /** - *
-   * Required. The Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.InstanceOrBuilder getInstanceOrBuilder() { - return getInstance(); - } - - 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.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); - } - if (instance_ != null) { - output.writeMessage(3, getInstance()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); - } - if (instance_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getInstance()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.CreateInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.CreateInstanceRequest other = (com.google.cloud.apigeeregistry.v1.CreateInstanceRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getInstanceId() - .equals(other.getInstanceId())) return false; - if (hasInstance() != other.hasInstance()) return false; - if (hasInstance()) { - if (!getInstance() - .equals(other.getInstance())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; - hash = (53 * hash) + getInstanceId().hashCode(); - if (hasInstance()) { - hash = (37 * hash) + INSTANCE_FIELD_NUMBER; - hash = (53 * hash) + getInstance().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest 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.apigeeregistry.v1.CreateInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest 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.apigeeregistry.v1.CreateInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.CreateInstanceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for CreateInstance.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.CreateInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.CreateInstanceRequest) - com.google.cloud.apigeeregistry.v1.CreateInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.class, com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - instanceId_ = ""; - - if (instanceBuilder_ == null) { - instance_ = null; - } else { - instance_ = null; - instanceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateInstanceRequest build() { - com.google.cloud.apigeeregistry.v1.CreateInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateInstanceRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.CreateInstanceRequest result = new com.google.cloud.apigeeregistry.v1.CreateInstanceRequest(this); - result.parent_ = parent_; - result.instanceId_ = instanceId_; - if (instanceBuilder_ == null) { - result.instance_ = instance_; - } else { - result.instance_ = instanceBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.CreateInstanceRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.CreateInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.CreateInstanceRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.CreateInstanceRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getInstanceId().isEmpty()) { - instanceId_ = other.instanceId_; - onChanged(); - } - if (other.hasInstance()) { - mergeInstance(other.getInstance()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.CreateInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.CreateInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
-     * 
- * - * 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. Parent resource of the Instance, of the form: `projects/*/locations/*`
-     * 
- * - * 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. Parent resource of the Instance, of the form: `projects/*/locations/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object instanceId_ = ""; - /** - *
-     * Required. Identifier to assign to the Instance. Must be unique within scope of the
-     * parent resource.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instanceId. - */ - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Identifier to assign to the Instance. Must be unique within scope of the
-     * parent resource.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for instanceId. - */ - public com.google.protobuf.ByteString - getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Identifier to assign to the Instance. Must be unique within scope of the
-     * parent resource.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The instanceId to set. - * @return This builder for chaining. - */ - public Builder setInstanceId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - instanceId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Identifier to assign to the Instance. Must be unique within scope of the
-     * parent resource.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearInstanceId() { - - instanceId_ = getDefaultInstance().getInstanceId(); - onChanged(); - return this; - } - /** - *
-     * Required. Identifier to assign to the Instance. Must be unique within scope of the
-     * parent resource.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for instanceId to set. - * @return This builder for chaining. - */ - public Builder setInstanceIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - instanceId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.apigeeregistry.v1.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Instance, com.google.cloud.apigeeregistry.v1.Instance.Builder, com.google.cloud.apigeeregistry.v1.InstanceOrBuilder> instanceBuilder_; - /** - *
-     * Required. The Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - public boolean hasInstance() { - return instanceBuilder_ != null || instance_ != null; - } - /** - *
-     * Required. The Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - public com.google.cloud.apigeeregistry.v1.Instance getInstance() { - if (instanceBuilder_ == null) { - return instance_ == null ? com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance() : instance_; - } else { - return instanceBuilder_.getMessage(); - } - } - /** - *
-     * Required. The Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInstance(com.google.cloud.apigeeregistry.v1.Instance value) { - if (instanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - instance_ = value; - onChanged(); - } else { - instanceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInstance( - com.google.cloud.apigeeregistry.v1.Instance.Builder builderForValue) { - if (instanceBuilder_ == null) { - instance_ = builderForValue.build(); - onChanged(); - } else { - instanceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeInstance(com.google.cloud.apigeeregistry.v1.Instance value) { - if (instanceBuilder_ == null) { - if (instance_ != null) { - instance_ = - com.google.cloud.apigeeregistry.v1.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); - } else { - instance_ = value; - } - onChanged(); - } else { - instanceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearInstance() { - if (instanceBuilder_ == null) { - instance_ = null; - onChanged(); - } else { - instance_ = null; - instanceBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.Instance.Builder getInstanceBuilder() { - - onChanged(); - return getInstanceFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.InstanceOrBuilder getInstanceOrBuilder() { - if (instanceBuilder_ != null) { - return instanceBuilder_.getMessageOrBuilder(); - } else { - return instance_ == null ? - com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance() : instance_; - } - } - /** - *
-     * Required. The Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Instance, com.google.cloud.apigeeregistry.v1.Instance.Builder, com.google.cloud.apigeeregistry.v1.InstanceOrBuilder> - getInstanceFieldBuilder() { - if (instanceBuilder_ == null) { - instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Instance, com.google.cloud.apigeeregistry.v1.Instance.Builder, com.google.cloud.apigeeregistry.v1.InstanceOrBuilder>( - getInstance(), - getParentForChildren(), - isClean()); - instance_ = null; - } - return instanceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.CreateInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.CreateInstanceRequest) - private static final com.google.cloud.apigeeregistry.v1.CreateInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.CreateInstanceRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.CreateInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateInstanceRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.CreateInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequestOrBuilder.java deleted file mode 100644 index 054683c8d916..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/CreateInstanceRequestOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface CreateInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.CreateInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource of the Instance, of the form: `projects/*/locations/*`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. Identifier to assign to the Instance. Must be unique within scope of the
-   * parent resource.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instanceId. - */ - java.lang.String getInstanceId(); - /** - *
-   * Required. Identifier to assign to the Instance. Must be unique within scope of the
-   * parent resource.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for instanceId. - */ - com.google.protobuf.ByteString - getInstanceIdBytes(); - - /** - *
-   * Required. The Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - boolean hasInstance(); - /** - *
-   * Required. The Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - com.google.cloud.apigeeregistry.v1.Instance getInstance(); - /** - *
-   * Required. The Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.InstanceOrBuilder getInstanceOrBuilder(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequest.java deleted file mode 100644 index e8a5d3fdee7d..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequest.java +++ /dev/null @@ -1,687 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for DeleteApiDeployment.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest} - */ -public final class DeleteApiDeploymentRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) - DeleteApiDeploymentRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteApiDeploymentRequest.newBuilder() to construct. - private DeleteApiDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteApiDeploymentRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteApiDeploymentRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteApiDeploymentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - - force_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the deployment to delete.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * 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 name of the deployment to delete.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FORCE_FIELD_NUMBER = 2; - private boolean force_; - /** - *
-   * If set to true, any child resources will also be deleted.
-   * (Otherwise, the request will only work if there are no child resources.)
-   * 
- * - * bool force = 2; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - - 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (force_ != false) { - output.writeBool(2, force_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (force_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, force_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getForce() - != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + FORCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getForce()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest 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.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest 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.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteApiDeployment.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - force_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest build() { - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest(this); - result.name_ = name_; - result.force_ = force_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getForce() != false) { - setForce(other.getForce()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the deployment to delete.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * 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 name of the deployment to delete.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * 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 name of the deployment to delete.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the deployment to delete.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the deployment to delete.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private boolean force_ ; - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @param value The force to set. - * @return This builder for chaining. - */ - public Builder setForce(boolean value) { - - force_ = value; - onChanged(); - return this; - } - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @return This builder for chaining. - */ - public Builder clearForce() { - - force_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) - private static final com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteApiDeploymentRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteApiDeploymentRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequestOrBuilder.java deleted file mode 100644 index 0f08f623a6c7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRequestOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface DeleteApiDeploymentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the deployment to delete.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the deployment to delete.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * If set to true, any child resources will also be deleted.
-   * (Otherwise, the request will only work if there are no child resources.)
-   * 
- * - * bool force = 2; - * @return The force. - */ - boolean getForce(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequest.java deleted file mode 100644 index 176f129bc2dc..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequest.java +++ /dev/null @@ -1,616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for DeleteApiDeploymentRevision.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest} - */ -public final class DeleteApiDeploymentRevisionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) - DeleteApiDeploymentRevisionRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteApiDeploymentRevisionRequest.newBuilder() to construct. - private DeleteApiDeploymentRevisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteApiDeploymentRevisionRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteApiDeploymentRevisionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteApiDeploymentRevisionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the deployment revision to be deleted,
-   * with a revision ID explicitly included.
-   * Example:
-   * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
-   * 
- * - * 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 name of the deployment revision to be deleted,
-   * with a revision ID explicitly included.
-   * Example:
-   * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest 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.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest 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.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteApiDeploymentRevision.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest build() { - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the deployment revision to be deleted,
-     * with a revision ID explicitly included.
-     * Example:
-     * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
-     * 
- * - * 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 name of the deployment revision to be deleted,
-     * with a revision ID explicitly included.
-     * Example:
-     * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
-     * 
- * - * 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 name of the deployment revision to be deleted,
-     * with a revision ID explicitly included.
-     * Example:
-     * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the deployment revision to be deleted,
-     * with a revision ID explicitly included.
-     * Example:
-     * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the deployment revision to be deleted,
-     * with a revision ID explicitly included.
-     * Example:
-     * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) - private static final com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteApiDeploymentRevisionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteApiDeploymentRevisionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequestOrBuilder.java deleted file mode 100644 index 22658d36e34e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiDeploymentRevisionRequestOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface DeleteApiDeploymentRevisionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the deployment revision to be deleted,
-   * with a revision ID explicitly included.
-   * Example:
-   * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the deployment revision to be deleted,
-   * with a revision ID explicitly included.
-   * Example:
-   * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequest.java deleted file mode 100644 index ac35116717b3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequest.java +++ /dev/null @@ -1,687 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for DeleteApi.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiRequest} - */ -public final class DeleteApiRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiRequest) - DeleteApiRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteApiRequest.newBuilder() to construct. - private DeleteApiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteApiRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteApiRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteApiRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - - force_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the API to delete.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 name of the API to delete.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FORCE_FIELD_NUMBER = 2; - private boolean force_; - /** - *
-   * If set to true, any child resources will also be deleted.
-   * (Otherwise, the request will only work if there are no child resources.)
-   * 
- * - * bool force = 2; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - - 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (force_ != false) { - output.writeBool(2, force_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (force_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, force_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.DeleteApiRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getForce() - != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + FORCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getForce()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest 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.apigeeregistry.v1.DeleteApiRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest 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.apigeeregistry.v1.DeleteApiRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteApi.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiRequest) - com.google.cloud.apigeeregistry.v1.DeleteApiRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - force_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.DeleteApiRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiRequest build() { - com.google.cloud.apigeeregistry.v1.DeleteApiRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.DeleteApiRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiRequest(this); - result.name_ = name_; - result.force_ = force_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.DeleteApiRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getForce() != false) { - setForce(other.getForce()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.DeleteApiRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the API to delete.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 name of the API to delete.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 name of the API to delete.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the API to delete.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the API to delete.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private boolean force_ ; - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @param value The force to set. - * @return This builder for chaining. - */ - public Builder setForce(boolean value) { - - force_ = value; - onChanged(); - return this; - } - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @return This builder for chaining. - */ - public Builder clearForce() { - - force_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiRequest) - private static final com.google.cloud.apigeeregistry.v1.DeleteApiRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteApiRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteApiRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequestOrBuilder.java deleted file mode 100644 index 2d0912c241cd..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiRequestOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface DeleteApiRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the API to delete.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the API to delete.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * If set to true, any child resources will also be deleted.
-   * (Otherwise, the request will only work if there are no child resources.)
-   * 
- * - * bool force = 2; - * @return The force. - */ - boolean getForce(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequest.java deleted file mode 100644 index 1cade39e9ffd..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequest.java +++ /dev/null @@ -1,687 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for DeleteApiSpec.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiSpecRequest} - */ -public final class DeleteApiSpecRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) - DeleteApiSpecRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteApiSpecRequest.newBuilder() to construct. - private DeleteApiSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteApiSpecRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteApiSpecRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteApiSpecRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - - force_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the spec to delete.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * 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 name of the spec to delete.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FORCE_FIELD_NUMBER = 2; - private boolean force_; - /** - *
-   * If set to true, any child resources will also be deleted.
-   * (Otherwise, the request will only work if there are no child resources.)
-   * 
- * - * bool force = 2; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - - 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (force_ != false) { - output.writeBool(2, force_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (force_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, force_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getForce() - != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + FORCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getForce()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest 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.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest 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.apigeeregistry.v1.DeleteApiSpecRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteApiSpec.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiSpecRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - force_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest build() { - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest(this); - result.name_ = name_; - result.force_ = force_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getForce() != false) { - setForce(other.getForce()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the spec to delete.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * 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 name of the spec to delete.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * 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 name of the spec to delete.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec to delete.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec to delete.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private boolean force_ ; - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @param value The force to set. - * @return This builder for chaining. - */ - public Builder setForce(boolean value) { - - force_ = value; - onChanged(); - return this; - } - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @return This builder for chaining. - */ - public Builder clearForce() { - - force_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) - private static final com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteApiSpecRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteApiSpecRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequestOrBuilder.java deleted file mode 100644 index 81ee8337931a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRequestOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface DeleteApiSpecRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the spec to delete.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the spec to delete.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * If set to true, any child resources will also be deleted.
-   * (Otherwise, the request will only work if there are no child resources.)
-   * 
- * - * bool force = 2; - * @return The force. - */ - boolean getForce(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequest.java deleted file mode 100644 index d28dc747544c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequest.java +++ /dev/null @@ -1,616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for DeleteApiSpecRevision.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest} - */ -public final class DeleteApiSpecRevisionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) - DeleteApiSpecRevisionRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteApiSpecRevisionRequest.newBuilder() to construct. - private DeleteApiSpecRevisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteApiSpecRevisionRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteApiSpecRevisionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteApiSpecRevisionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the spec revision to be deleted,
-   * with a revision ID explicitly included.
-   * Example:
-   * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
-   * 
- * - * 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 name of the spec revision to be deleted,
-   * with a revision ID explicitly included.
-   * Example:
-   * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest 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.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest 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.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteApiSpecRevision.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest build() { - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the spec revision to be deleted,
-     * with a revision ID explicitly included.
-     * Example:
-     * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
-     * 
- * - * 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 name of the spec revision to be deleted,
-     * with a revision ID explicitly included.
-     * Example:
-     * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
-     * 
- * - * 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 name of the spec revision to be deleted,
-     * with a revision ID explicitly included.
-     * Example:
-     * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec revision to be deleted,
-     * with a revision ID explicitly included.
-     * Example:
-     * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec revision to be deleted,
-     * with a revision ID explicitly included.
-     * Example:
-     * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) - private static final com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteApiSpecRevisionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteApiSpecRevisionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequestOrBuilder.java deleted file mode 100644 index 00e35b821164..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiSpecRevisionRequestOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface DeleteApiSpecRevisionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the spec revision to be deleted,
-   * with a revision ID explicitly included.
-   * Example:
-   * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the spec revision to be deleted,
-   * with a revision ID explicitly included.
-   * Example:
-   * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequest.java deleted file mode 100644 index 2b5da3b0611a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequest.java +++ /dev/null @@ -1,687 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for DeleteApiVersion.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiVersionRequest} - */ -public final class DeleteApiVersionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) - DeleteApiVersionRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteApiVersionRequest.newBuilder() to construct. - private DeleteApiVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteApiVersionRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteApiVersionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteApiVersionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - - force_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the version to delete.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * 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 name of the version to delete.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FORCE_FIELD_NUMBER = 2; - private boolean force_; - /** - *
-   * If set to true, any child resources will also be deleted.
-   * (Otherwise, the request will only work if there are no child resources.)
-   * 
- * - * bool force = 2; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - - 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (force_ != false) { - output.writeBool(2, force_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (force_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, force_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest other = (com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getForce() - != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + FORCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getForce()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest 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.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest 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.apigeeregistry.v1.DeleteApiVersionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteApiVersion.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteApiVersionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) - com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - force_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest build() { - com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest result = new com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest(this); - result.name_ = name_; - result.force_ = force_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getForce() != false) { - setForce(other.getForce()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the version to delete.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * 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 name of the version to delete.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * 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 name of the version to delete.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the version to delete.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the version to delete.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private boolean force_ ; - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @param value The force to set. - * @return This builder for chaining. - */ - public Builder setForce(boolean value) { - - force_ = value; - onChanged(); - return this; - } - /** - *
-     * If set to true, any child resources will also be deleted.
-     * (Otherwise, the request will only work if there are no child resources.)
-     * 
- * - * bool force = 2; - * @return This builder for chaining. - */ - public Builder clearForce() { - - force_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) - private static final com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteApiVersionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteApiVersionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequestOrBuilder.java deleted file mode 100644 index bcedc238bebb..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteApiVersionRequestOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface DeleteApiVersionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the version to delete.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the version to delete.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * If set to true, any child resources will also be deleted.
-   * (Otherwise, the request will only work if there are no child resources.)
-   * 
- * - * bool force = 2; - * @return The force. - */ - boolean getForce(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequest.java deleted file mode 100644 index bc02928a805f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for DeleteArtifact.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteArtifactRequest} - */ -public final class DeleteArtifactRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteArtifactRequest) - DeleteArtifactRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteArtifactRequest.newBuilder() to construct. - private DeleteArtifactRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteArtifactRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteArtifactRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteArtifactRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.class, com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the artifact to delete.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * 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 name of the artifact to delete.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest other = (com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest 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.apigeeregistry.v1.DeleteArtifactRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest 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.apigeeregistry.v1.DeleteArtifactRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteArtifact.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteArtifactRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteArtifactRequest) - com.google.cloud.apigeeregistry.v1.DeleteArtifactRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.class, com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest build() { - com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest result = new com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the artifact to delete.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * 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 name of the artifact to delete.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * 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 name of the artifact to delete.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the artifact to delete.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the artifact to delete.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteArtifactRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteArtifactRequest) - private static final com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteArtifactRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteArtifactRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequestOrBuilder.java deleted file mode 100644 index 6ae4b1992a86..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteArtifactRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface DeleteArtifactRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteArtifactRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the artifact to delete.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the artifact to delete.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequest.java deleted file mode 100644 index 4aa31a15bcaa..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for DeleteInstance.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteInstanceRequest} - */ -public final class DeleteInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.DeleteInstanceRequest) - DeleteInstanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteInstanceRequest.newBuilder() to construct. - private DeleteInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteInstanceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteInstanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteInstanceRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.class, com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the Instance to delete.
-   * Format: `projects/*/locations/*/instances/*`.
-   * 
- * - * 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 name of the Instance to delete.
-   * Format: `projects/*/locations/*/instances/*`.
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest other = (com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest 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.apigeeregistry.v1.DeleteInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest 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.apigeeregistry.v1.DeleteInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteInstance.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.DeleteInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.DeleteInstanceRequest) - com.google.cloud.apigeeregistry.v1.DeleteInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.class, com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest build() { - com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest result = new com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the Instance to delete.
-     * Format: `projects/*/locations/*/instances/*`.
-     * 
- * - * 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 name of the Instance to delete.
-     * Format: `projects/*/locations/*/instances/*`.
-     * 
- * - * 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 name of the Instance to delete.
-     * Format: `projects/*/locations/*/instances/*`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the Instance to delete.
-     * Format: `projects/*/locations/*/instances/*`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the Instance to delete.
-     * Format: `projects/*/locations/*/instances/*`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.DeleteInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.DeleteInstanceRequest) - private static final com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInstanceRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequestOrBuilder.java deleted file mode 100644 index 9daaec0922aa..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/DeleteInstanceRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface DeleteInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.DeleteInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the Instance to delete.
-   * Format: `projects/*/locations/*/instances/*`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the Instance to delete.
-   * Format: `projects/*/locations/*/instances/*`.
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequest.java deleted file mode 100644 index d64764d6b21e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for GetApiDeployment.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiDeploymentRequest} - */ -public final class GetApiDeploymentRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) - GetApiDeploymentRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetApiDeploymentRequest.newBuilder() to construct. - private GetApiDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetApiDeploymentRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetApiDeploymentRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetApiDeploymentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the deployment to retrieve.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * 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 name of the deployment to retrieve.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest other = (com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest 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.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest 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.apigeeregistry.v1.GetApiDeploymentRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetApiDeployment.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiDeploymentRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) - com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest build() { - com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest result = new com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the deployment to retrieve.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * 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 name of the deployment to retrieve.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * 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 name of the deployment to retrieve.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the deployment to retrieve.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the deployment to retrieve.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) - private static final com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetApiDeploymentRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetApiDeploymentRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequestOrBuilder.java deleted file mode 100644 index 207f159e28a7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiDeploymentRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface GetApiDeploymentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the deployment to retrieve.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the deployment to retrieve.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequest.java deleted file mode 100644 index 8cda9e11a68a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for GetApi.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiRequest} - */ -public final class GetApiRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetApiRequest) - GetApiRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetApiRequest.newBuilder() to construct. - private GetApiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetApiRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetApiRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetApiRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetApiRequest.class, com.google.cloud.apigeeregistry.v1.GetApiRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the API to retrieve.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 name of the API to retrieve.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetApiRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.GetApiRequest other = (com.google.cloud.apigeeregistry.v1.GetApiRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiRequest 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.apigeeregistry.v1.GetApiRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiRequest 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.apigeeregistry.v1.GetApiRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetApiRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetApi.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetApiRequest) - com.google.cloud.apigeeregistry.v1.GetApiRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetApiRequest.class, com.google.cloud.apigeeregistry.v1.GetApiRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.GetApiRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.GetApiRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiRequest build() { - com.google.cloud.apigeeregistry.v1.GetApiRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.GetApiRequest result = new com.google.cloud.apigeeregistry.v1.GetApiRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.GetApiRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.GetApiRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetApiRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.GetApiRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.GetApiRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.GetApiRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the API to retrieve.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 name of the API to retrieve.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 name of the API to retrieve.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the API to retrieve.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the API to retrieve.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetApiRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetApiRequest) - private static final com.google.cloud.apigeeregistry.v1.GetApiRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetApiRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.GetApiRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetApiRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetApiRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequestOrBuilder.java deleted file mode 100644 index 8224a3021d73..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface GetApiRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetApiRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the API to retrieve.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the API to retrieve.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequest.java deleted file mode 100644 index 75c66b592af6..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for GetApiSpecContents.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest} - */ -public final class GetApiSpecContentsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) - GetApiSpecContentsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetApiSpecContentsRequest.newBuilder() to construct. - private GetApiSpecContentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetApiSpecContentsRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetApiSpecContentsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetApiSpecContentsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.class, com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the spec whose contents should be retrieved.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * 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 name of the spec whose contents should be retrieved.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest other = (com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest 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.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest 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.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetApiSpecContents.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) - com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.class, com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest build() { - com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest result = new com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the spec whose contents should be retrieved.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * 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 name of the spec whose contents should be retrieved.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * 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 name of the spec whose contents should be retrieved.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec whose contents should be retrieved.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec whose contents should be retrieved.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) - private static final com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetApiSpecContentsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetApiSpecContentsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequestOrBuilder.java deleted file mode 100644 index 49e39e6cb910..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecContentsRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface GetApiSpecContentsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the spec whose contents should be retrieved.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the spec whose contents should be retrieved.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequest.java deleted file mode 100644 index 9d2c34d7db14..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for GetApiSpec.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiSpecRequest} - */ -public final class GetApiSpecRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetApiSpecRequest) - GetApiSpecRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetApiSpecRequest.newBuilder() to construct. - private GetApiSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetApiSpecRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetApiSpecRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetApiSpecRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the spec to retrieve.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * 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 name of the spec to retrieve.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetApiSpecRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.GetApiSpecRequest other = (com.google.cloud.apigeeregistry.v1.GetApiSpecRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest 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.apigeeregistry.v1.GetApiSpecRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest 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.apigeeregistry.v1.GetApiSpecRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetApiSpecRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetApiSpec.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiSpecRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetApiSpecRequest) - com.google.cloud.apigeeregistry.v1.GetApiSpecRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiSpecRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiSpecRequest build() { - com.google.cloud.apigeeregistry.v1.GetApiSpecRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiSpecRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.GetApiSpecRequest result = new com.google.cloud.apigeeregistry.v1.GetApiSpecRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.GetApiSpecRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.GetApiSpecRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetApiSpecRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.GetApiSpecRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.GetApiSpecRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.GetApiSpecRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the spec to retrieve.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * 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 name of the spec to retrieve.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * 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 name of the spec to retrieve.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec to retrieve.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec to retrieve.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetApiSpecRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetApiSpecRequest) - private static final com.google.cloud.apigeeregistry.v1.GetApiSpecRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetApiSpecRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.GetApiSpecRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetApiSpecRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetApiSpecRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiSpecRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequestOrBuilder.java deleted file mode 100644 index 94de44577c33..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiSpecRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface GetApiSpecRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetApiSpecRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the spec to retrieve.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the spec to retrieve.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequest.java deleted file mode 100644 index 792efd7f2bf1..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for GetApiVersion.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiVersionRequest} - */ -public final class GetApiVersionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetApiVersionRequest) - GetApiVersionRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetApiVersionRequest.newBuilder() to construct. - private GetApiVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetApiVersionRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetApiVersionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetApiVersionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the version to retrieve.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * 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 name of the version to retrieve.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetApiVersionRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.GetApiVersionRequest other = (com.google.cloud.apigeeregistry.v1.GetApiVersionRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest 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.apigeeregistry.v1.GetApiVersionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest 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.apigeeregistry.v1.GetApiVersionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetApiVersionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetApiVersion.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetApiVersionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetApiVersionRequest) - com.google.cloud.apigeeregistry.v1.GetApiVersionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiVersionRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiVersionRequest build() { - com.google.cloud.apigeeregistry.v1.GetApiVersionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiVersionRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.GetApiVersionRequest result = new com.google.cloud.apigeeregistry.v1.GetApiVersionRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.GetApiVersionRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.GetApiVersionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetApiVersionRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.GetApiVersionRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.GetApiVersionRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.GetApiVersionRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the version to retrieve.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * 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 name of the version to retrieve.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * 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 name of the version to retrieve.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the version to retrieve.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the version to retrieve.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetApiVersionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetApiVersionRequest) - private static final com.google.cloud.apigeeregistry.v1.GetApiVersionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetApiVersionRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.GetApiVersionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetApiVersionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetApiVersionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetApiVersionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequestOrBuilder.java deleted file mode 100644 index 68a28f7dc625..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetApiVersionRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface GetApiVersionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetApiVersionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the version to retrieve.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the version to retrieve.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequest.java deleted file mode 100644 index 87cadef59fd4..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for GetArtifactContents.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetArtifactContentsRequest} - */ -public final class GetArtifactContentsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) - GetArtifactContentsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetArtifactContentsRequest.newBuilder() to construct. - private GetArtifactContentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetArtifactContentsRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetArtifactContentsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetArtifactContentsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.class, com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the artifact whose contents should be retrieved.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * 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 name of the artifact whose contents should be retrieved.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest other = (com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest 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.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest 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.apigeeregistry.v1.GetArtifactContentsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetArtifactContents.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetArtifactContentsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) - com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.class, com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest build() { - com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest result = new com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the artifact whose contents should be retrieved.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * 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 name of the artifact whose contents should be retrieved.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * 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 name of the artifact whose contents should be retrieved.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the artifact whose contents should be retrieved.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the artifact whose contents should be retrieved.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) - private static final com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetArtifactContentsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetArtifactContentsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequestOrBuilder.java deleted file mode 100644 index 5d9e641d2ae7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactContentsRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface GetArtifactContentsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the artifact whose contents should be retrieved.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the artifact whose contents should be retrieved.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequest.java deleted file mode 100644 index 0c53399a43be..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for GetArtifact.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetArtifactRequest} - */ -public final class GetArtifactRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetArtifactRequest) - GetArtifactRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetArtifactRequest.newBuilder() to construct. - private GetArtifactRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetArtifactRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetArtifactRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetArtifactRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetArtifactRequest.class, com.google.cloud.apigeeregistry.v1.GetArtifactRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the artifact to retrieve.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * 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 name of the artifact to retrieve.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetArtifactRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.GetArtifactRequest other = (com.google.cloud.apigeeregistry.v1.GetArtifactRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest 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.apigeeregistry.v1.GetArtifactRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest 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.apigeeregistry.v1.GetArtifactRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetArtifactRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetArtifact.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetArtifactRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetArtifactRequest) - com.google.cloud.apigeeregistry.v1.GetArtifactRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetArtifactRequest.class, com.google.cloud.apigeeregistry.v1.GetArtifactRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.GetArtifactRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetArtifactRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.GetArtifactRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetArtifactRequest build() { - com.google.cloud.apigeeregistry.v1.GetArtifactRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetArtifactRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.GetArtifactRequest result = new com.google.cloud.apigeeregistry.v1.GetArtifactRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.GetArtifactRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.GetArtifactRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetArtifactRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.GetArtifactRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.GetArtifactRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.GetArtifactRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the artifact to retrieve.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * 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 name of the artifact to retrieve.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * 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 name of the artifact to retrieve.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the artifact to retrieve.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the artifact to retrieve.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetArtifactRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetArtifactRequest) - private static final com.google.cloud.apigeeregistry.v1.GetArtifactRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetArtifactRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.GetArtifactRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetArtifactRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetArtifactRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetArtifactRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequestOrBuilder.java deleted file mode 100644 index 479cb91e7401..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetArtifactRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface GetArtifactRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetArtifactRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the artifact to retrieve.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the artifact to retrieve.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequest.java deleted file mode 100644 index 7c7373a127c3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for GetInstance.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetInstanceRequest} - */ -public final class GetInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.GetInstanceRequest) - GetInstanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetInstanceRequest.newBuilder() to construct. - private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetInstanceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetInstanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetInstanceRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetInstanceRequest.class, com.google.cloud.apigeeregistry.v1.GetInstanceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the Instance to retrieve.
-   * Format: `projects/*/locations/*/instances/*`.
-   * 
- * - * 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 name of the Instance to retrieve.
-   * Format: `projects/*/locations/*/instances/*`.
-   * 
- * - * 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.GetInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.GetInstanceRequest other = (com.google.cloud.apigeeregistry.v1.GetInstanceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest 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.apigeeregistry.v1.GetInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest 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.apigeeregistry.v1.GetInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.GetInstanceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetInstance.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.GetInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.GetInstanceRequest) - com.google.cloud.apigeeregistry.v1.GetInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.GetInstanceRequest.class, com.google.cloud.apigeeregistry.v1.GetInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.GetInstanceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.GetInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetInstanceRequest build() { - com.google.cloud.apigeeregistry.v1.GetInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetInstanceRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.GetInstanceRequest result = new com.google.cloud.apigeeregistry.v1.GetInstanceRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.GetInstanceRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.GetInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.GetInstanceRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.GetInstanceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.GetInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.GetInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the Instance to retrieve.
-     * Format: `projects/*/locations/*/instances/*`.
-     * 
- * - * 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 name of the Instance to retrieve.
-     * Format: `projects/*/locations/*/instances/*`.
-     * 
- * - * 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 name of the Instance to retrieve.
-     * Format: `projects/*/locations/*/instances/*`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the Instance to retrieve.
-     * Format: `projects/*/locations/*/instances/*`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the Instance to retrieve.
-     * Format: `projects/*/locations/*/instances/*`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.GetInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.GetInstanceRequest) - private static final com.google.cloud.apigeeregistry.v1.GetInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.GetInstanceRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.GetInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInstanceRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.GetInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequestOrBuilder.java deleted file mode 100644 index e9724dbc4271..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/GetInstanceRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface GetInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.GetInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the Instance to retrieve.
-   * Format: `projects/*/locations/*/instances/*`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the Instance to retrieve.
-   * Format: `projects/*/locations/*/instances/*`.
-   * 
- * - * 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Instance.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Instance.java deleted file mode 100644 index 0fa2dd61022c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/Instance.java +++ /dev/null @@ -1,2642 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * An Instance represents the instance resources of the Registry.
- * Currently, only one instance is allowed for each project.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.Instance} - */ -public final class Instance extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.Instance) - InstanceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Instance.newBuilder() to construct. - private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Instance() { - name_ = ""; - state_ = 0; - stateMessage_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Instance(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Instance( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 32: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - stateMessage_ = s; - break; - } - case 50: { - com.google.cloud.apigeeregistry.v1.Instance.Config.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Instance.Config.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.Instance.class, com.google.cloud.apigeeregistry.v1.Instance.Builder.class); - } - - /** - *
-   * State of the Instance.
-   * 
- * - * Protobuf enum {@code google.cloud.apigeeregistry.v1.Instance.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * The default value. This value is used if the state is omitted.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * The Instance has not been initialized or has been deleted.
-     * 
- * - * INACTIVE = 1; - */ - INACTIVE(1), - /** - *
-     * The Instance is being created.
-     * 
- * - * CREATING = 2; - */ - CREATING(2), - /** - *
-     * The Instance has been created and is ready for use.
-     * 
- * - * ACTIVE = 3; - */ - ACTIVE(3), - /** - *
-     * The Instance is being updated.
-     * 
- * - * UPDATING = 4; - */ - UPDATING(4), - /** - *
-     * The Instance is being deleted.
-     * 
- * - * DELETING = 5; - */ - DELETING(5), - /** - *
-     * The Instance encountered an error during a state change.
-     * 
- * - * FAILED = 6; - */ - FAILED(6), - UNRECOGNIZED(-1), - ; - - /** - *
-     * The default value. This value is used if the state is omitted.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * The Instance has not been initialized or has been deleted.
-     * 
- * - * INACTIVE = 1; - */ - public static final int INACTIVE_VALUE = 1; - /** - *
-     * The Instance is being created.
-     * 
- * - * CREATING = 2; - */ - public static final int CREATING_VALUE = 2; - /** - *
-     * The Instance has been created and is ready for use.
-     * 
- * - * ACTIVE = 3; - */ - public static final int ACTIVE_VALUE = 3; - /** - *
-     * The Instance is being updated.
-     * 
- * - * UPDATING = 4; - */ - public static final int UPDATING_VALUE = 4; - /** - *
-     * The Instance is being deleted.
-     * 
- * - * DELETING = 5; - */ - public static final int DELETING_VALUE = 5; - /** - *
-     * The Instance encountered an error during a state change.
-     * 
- * - * FAILED = 6; - */ - public static final int FAILED_VALUE = 6; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: return STATE_UNSPECIFIED; - case 1: return INACTIVE; - case 2: return CREATING; - case 3: return ACTIVE; - case 4: return UPDATING; - case 5: return DELETING; - case 6: return FAILED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.Instance.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.apigeeregistry.v1.Instance.State) - } - - public interface ConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.Instance.Config) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Output only. The GCP location where the Instance resides.
-     * 
- * - * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The location. - */ - java.lang.String getLocation(); - /** - *
-     * Output only. The GCP location where the Instance resides.
-     * 
- * - * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for location. - */ - com.google.protobuf.ByteString - getLocationBytes(); - - /** - *
-     * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
-     * The CMEK name should follow the format of
-     * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
-     * where the `location` must match InstanceConfig.location.
-     * 
- * - * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The cmekKeyName. - */ - java.lang.String getCmekKeyName(); - /** - *
-     * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
-     * The CMEK name should follow the format of
-     * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
-     * where the `location` must match InstanceConfig.location.
-     * 
- * - * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cmekKeyName. - */ - com.google.protobuf.ByteString - getCmekKeyNameBytes(); - } - /** - *
-   * Available configurations to provision an Instance.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.Instance.Config} - */ - public static final class Config extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.Instance.Config) - ConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use Config.newBuilder() to construct. - private Config(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Config() { - location_ = ""; - cmekKeyName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Config(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Config( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - cmekKeyName_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_Config_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_Config_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.Instance.Config.class, com.google.cloud.apigeeregistry.v1.Instance.Config.Builder.class); - } - - public static final int LOCATION_FIELD_NUMBER = 1; - private volatile java.lang.Object location_; - /** - *
-     * Output only. The GCP location where the Instance resides.
-     * 
- * - * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The location. - */ - @java.lang.Override - public java.lang.String getLocation() { - java.lang.Object ref = location_; - 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(); - location_ = s; - return s; - } - } - /** - *
-     * Output only. The GCP location where the Instance resides.
-     * 
- * - * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for location. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CMEK_KEY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object cmekKeyName_; - /** - *
-     * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
-     * The CMEK name should follow the format of
-     * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
-     * where the `location` must match InstanceConfig.location.
-     * 
- * - * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The cmekKeyName. - */ - @java.lang.Override - public java.lang.String getCmekKeyName() { - java.lang.Object ref = cmekKeyName_; - 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(); - cmekKeyName_ = s; - return s; - } - } - /** - *
-     * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
-     * The CMEK name should follow the format of
-     * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
-     * where the `location` must match InstanceConfig.location.
-     * 
- * - * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cmekKeyName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCmekKeyNameBytes() { - java.lang.Object ref = cmekKeyName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cmekKeyName_ = 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.GeneratedMessageV3.isStringEmpty(location_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmekKeyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cmekKeyName_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmekKeyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cmekKeyName_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.Instance.Config)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.Instance.Config other = (com.google.cloud.apigeeregistry.v1.Instance.Config) obj; - - if (!getLocation() - .equals(other.getLocation())) return false; - if (!getCmekKeyName() - .equals(other.getCmekKeyName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocation().hashCode(); - hash = (37 * hash) + CMEK_KEY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getCmekKeyName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Instance.Config 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.apigeeregistry.v1.Instance.Config parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Instance.Config 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.apigeeregistry.v1.Instance.Config parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Instance.Config parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Instance.Config parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Instance.Config parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.Instance.Config prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Available configurations to provision an Instance.
-     * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.Instance.Config} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.Instance.Config) - com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_Config_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_Config_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.Instance.Config.class, com.google.cloud.apigeeregistry.v1.Instance.Config.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.Instance.Config.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - location_ = ""; - - cmekKeyName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_Config_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance.Config getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.Instance.Config.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance.Config build() { - com.google.cloud.apigeeregistry.v1.Instance.Config result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance.Config buildPartial() { - com.google.cloud.apigeeregistry.v1.Instance.Config result = new com.google.cloud.apigeeregistry.v1.Instance.Config(this); - result.location_ = location_; - result.cmekKeyName_ = cmekKeyName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.Instance.Config) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.Instance.Config)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.Instance.Config other) { - if (other == com.google.cloud.apigeeregistry.v1.Instance.Config.getDefaultInstance()) return this; - if (!other.getLocation().isEmpty()) { - location_ = other.location_; - onChanged(); - } - if (!other.getCmekKeyName().isEmpty()) { - cmekKeyName_ = other.cmekKeyName_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.Instance.Config parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.Instance.Config) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object location_ = ""; - /** - *
-       * Output only. The GCP location where the Instance resides.
-       * 
- * - * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The location. - */ - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Output only. The GCP location where the Instance resides.
-       * 
- * - * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for location. - */ - public com.google.protobuf.ByteString - getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Output only. The GCP location where the Instance resides.
-       * 
- * - * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The location to set. - * @return This builder for chaining. - */ - public Builder setLocation( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - location_ = value; - onChanged(); - return this; - } - /** - *
-       * Output only. The GCP location where the Instance resides.
-       * 
- * - * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearLocation() { - - location_ = getDefaultInstance().getLocation(); - onChanged(); - return this; - } - /** - *
-       * Output only. The GCP location where the Instance resides.
-       * 
- * - * string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for location to set. - * @return This builder for chaining. - */ - public Builder setLocationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - location_ = value; - onChanged(); - return this; - } - - private java.lang.Object cmekKeyName_ = ""; - /** - *
-       * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
-       * The CMEK name should follow the format of
-       * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
-       * where the `location` must match InstanceConfig.location.
-       * 
- * - * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The cmekKeyName. - */ - public java.lang.String getCmekKeyName() { - java.lang.Object ref = cmekKeyName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cmekKeyName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
-       * The CMEK name should follow the format of
-       * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
-       * where the `location` must match InstanceConfig.location.
-       * 
- * - * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cmekKeyName. - */ - public com.google.protobuf.ByteString - getCmekKeyNameBytes() { - java.lang.Object ref = cmekKeyName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cmekKeyName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
-       * The CMEK name should follow the format of
-       * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
-       * where the `location` must match InstanceConfig.location.
-       * 
- * - * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The cmekKeyName to set. - * @return This builder for chaining. - */ - public Builder setCmekKeyName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - cmekKeyName_ = value; - onChanged(); - return this; - } - /** - *
-       * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
-       * The CMEK name should follow the format of
-       * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
-       * where the `location` must match InstanceConfig.location.
-       * 
- * - * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearCmekKeyName() { - - cmekKeyName_ = getDefaultInstance().getCmekKeyName(); - onChanged(); - return this; - } - /** - *
-       * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
-       * The CMEK name should follow the format of
-       * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
-       * where the `location` must match InstanceConfig.location.
-       * 
- * - * string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for cmekKeyName to set. - * @return This builder for chaining. - */ - public Builder setCmekKeyNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - cmekKeyName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.Instance.Config) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.Instance.Config) - private static final com.google.cloud.apigeeregistry.v1.Instance.Config DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.Instance.Config(); - } - - public static com.google.cloud.apigeeregistry.v1.Instance.Config getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Config parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Config(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance.Config getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Format: `projects/*/locations/*/instance`.
-   * Currently only `locations/global` is supported.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Format: `projects/*/locations/*/instance`.
-   * Currently only `locations/global` is supported.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .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 updateTime_ != null; - } - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .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. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int STATE_FIELD_NUMBER = 4; - private int state_; - /** - *
-   * Output only. The current state of the Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * Output only. The current state of the Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override public com.google.cloud.apigeeregistry.v1.Instance.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.apigeeregistry.v1.Instance.State result = com.google.cloud.apigeeregistry.v1.Instance.State.valueOf(state_); - return result == null ? com.google.cloud.apigeeregistry.v1.Instance.State.UNRECOGNIZED : result; - } - - public static final int STATE_MESSAGE_FIELD_NUMBER = 5; - private volatile java.lang.Object stateMessage_; - /** - *
-   * Output only. Extra information of Instance.State if the state is `FAILED`.
-   * 
- * - * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The stateMessage. - */ - @java.lang.Override - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - 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(); - stateMessage_ = s; - return s; - } - } - /** - *
-   * Output only. Extra information of Instance.State if the state is `FAILED`.
-   * 
- * - * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for stateMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIG_FIELD_NUMBER = 6; - private com.google.cloud.apigeeregistry.v1.Instance.Config config_; - /** - *
-   * Required. Config of the Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the config field is set. - */ - @java.lang.Override - public boolean hasConfig() { - return config_ != null; - } - /** - *
-   * Required. Config of the Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return The config. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance.Config getConfig() { - return config_ == null ? com.google.cloud.apigeeregistry.v1.Instance.Config.getDefaultInstance() : config_; - } - /** - *
-   * Required. Config of the Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder getConfigOrBuilder() { - return getConfig(); - } - - 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(3, getUpdateTime()); - } - if (state_ != com.google.cloud.apigeeregistry.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, stateMessage_); - } - if (config_ != null) { - output.writeMessage(6, getConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUpdateTime()); - } - if (state_ != com.google.cloud.apigeeregistry.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, stateMessage_); - } - if (config_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.Instance)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.Instance other = (com.google.cloud.apigeeregistry.v1.Instance) obj; - - if (!getName() - .equals(other.getName())) 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 (state_ != other.state_) return false; - if (!getStateMessage() - .equals(other.getStateMessage())) return false; - if (hasConfig() != other.hasConfig()) return false; - if (hasConfig()) { - if (!getConfig() - .equals(other.getConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStateMessage().hashCode(); - if (hasConfig()) { - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.Instance parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Instance 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.apigeeregistry.v1.Instance parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Instance 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.apigeeregistry.v1.Instance parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.Instance parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Instance parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Instance parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Instance parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Instance parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.Instance parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.Instance parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.Instance prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An Instance represents the instance resources of the Registry.
-   * Currently, only one instance is allowed for each project.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.Instance} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.Instance) - com.google.cloud.apigeeregistry.v1.InstanceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.Instance.class, com.google.cloud.apigeeregistry.v1.Instance.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.Instance.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - state_ = 0; - - stateMessage_ = ""; - - if (configBuilder_ == null) { - config_ = null; - } else { - config_ = null; - configBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_Instance_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance build() { - com.google.cloud.apigeeregistry.v1.Instance result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance buildPartial() { - com.google.cloud.apigeeregistry.v1.Instance result = new com.google.cloud.apigeeregistry.v1.Instance(this); - result.name_ = name_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.state_ = state_; - result.stateMessage_ = stateMessage_; - if (configBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = configBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.Instance) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.Instance)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.Instance other) { - if (other == com.google.cloud.apigeeregistry.v1.Instance.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getStateMessage().isEmpty()) { - stateMessage_ = other.stateMessage_; - onChanged(); - } - if (other.hasConfig()) { - mergeConfig(other.getConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.Instance parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.Instance) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Format: `projects/*/locations/*/instance`.
-     * Currently only `locations/global` is supported.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Format: `projects/*/locations/*/instance`.
-     * Currently only `locations/global` is supported.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Format: `projects/*/locations/*/instance`.
-     * Currently only `locations/global` is supported.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Format: `projects/*/locations/*/instance`.
-     * Currently only `locations/global` is supported.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Format: `projects/*/locations/*/instance`.
-     * Currently only `locations/global` is supported.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.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. Creation timestamp.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .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. Last update timestamp.
-     * 
- * - * .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; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .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(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Last update timestamp.
-     * 
- * - * .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. Last update timestamp.
-     * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private int state_ = 0; - /** - *
-     * Output only. The current state of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Output only. The current state of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The current state of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.apigeeregistry.v1.Instance.State result = com.google.cloud.apigeeregistry.v1.Instance.State.valueOf(state_); - return result == null ? com.google.cloud.apigeeregistry.v1.Instance.State.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The current state of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.apigeeregistry.v1.Instance.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The current state of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object stateMessage_ = ""; - /** - *
-     * Output only. Extra information of Instance.State if the state is `FAILED`.
-     * 
- * - * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The stateMessage. - */ - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Extra information of Instance.State if the state is `FAILED`.
-     * 
- * - * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for stateMessage. - */ - public com.google.protobuf.ByteString - getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Extra information of Instance.State if the state is `FAILED`.
-     * 
- * - * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - stateMessage_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Extra information of Instance.State if the state is `FAILED`.
-     * 
- * - * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearStateMessage() { - - stateMessage_ = getDefaultInstance().getStateMessage(); - onChanged(); - return this; - } - /** - *
-     * Output only. Extra information of Instance.State if the state is `FAILED`.
-     * 
- * - * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - stateMessage_ = value; - onChanged(); - return this; - } - - private com.google.cloud.apigeeregistry.v1.Instance.Config config_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Instance.Config, com.google.cloud.apigeeregistry.v1.Instance.Config.Builder, com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder> configBuilder_; - /** - *
-     * Required. Config of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the config field is set. - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - *
-     * Required. Config of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return The config. - */ - public com.google.cloud.apigeeregistry.v1.Instance.Config getConfig() { - if (configBuilder_ == null) { - return config_ == null ? com.google.cloud.apigeeregistry.v1.Instance.Config.getDefaultInstance() : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - *
-     * Required. Config of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setConfig(com.google.cloud.apigeeregistry.v1.Instance.Config value) { - if (configBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - configBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Config of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setConfig( - com.google.cloud.apigeeregistry.v1.Instance.Config.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Config of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeConfig(com.google.cloud.apigeeregistry.v1.Instance.Config value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.cloud.apigeeregistry.v1.Instance.Config.newBuilder(config_).mergeFrom(value).buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Config of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Config of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.Instance.Config.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Config of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null ? - com.google.cloud.apigeeregistry.v1.Instance.Config.getDefaultInstance() : config_; - } - } - /** - *
-     * Required. Config of the Instance.
-     * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Instance.Config, com.google.cloud.apigeeregistry.v1.Instance.Config.Builder, com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Instance.Config, com.google.cloud.apigeeregistry.v1.Instance.Config.Builder, com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder>( - getConfig(), - getParentForChildren(), - isClean()); - config_ = null; - } - return configBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.Instance) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.Instance) - private static final com.google.cloud.apigeeregistry.v1.Instance DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.Instance(); - } - - public static com.google.cloud.apigeeregistry.v1.Instance getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Instance parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Instance(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Instance getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceName.java deleted file mode 100644 index c67ae8d3e8e5..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceName.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class InstanceName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_INSTANCE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/instances/{instance}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String instance; - - @Deprecated - protected InstanceName() { - project = null; - location = null; - instance = null; - } - - private InstanceName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - instance = Preconditions.checkNotNull(builder.getInstance()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getInstance() { - return instance; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static InstanceName of(String project, String location, String instance) { - return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); - } - - public static String format(String project, String location, String instance) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setInstance(instance) - .build() - .toString(); - } - - public static InstanceName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_INSTANCE.validatedMatch( - formattedString, "InstanceName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (InstanceName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_INSTANCE.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 (instance != null) { - fieldMapBuilder.put("instance", instance); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_INSTANCE.instantiate( - "project", project, "location", location, "instance", instance); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - InstanceName that = ((InstanceName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.instance, that.instance); - } - 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(instance); - return h; - } - - /** Builder for projects/{project}/locations/{location}/instances/{instance}. */ - public static class Builder { - private String project; - private String location; - private String instance; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getInstance() { - return instance; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setInstance(String instance) { - this.instance = instance; - return this; - } - - private Builder(InstanceName instanceName) { - this.project = instanceName.project; - this.location = instanceName.location; - this.instance = instanceName.instance; - } - - public InstanceName build() { - return new InstanceName(this); - } - } -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceOrBuilder.java deleted file mode 100644 index 5f0c3843a042..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/InstanceOrBuilder.java +++ /dev/null @@ -1,151 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface InstanceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.Instance) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Format: `projects/*/locations/*/instance`.
-   * Currently only `locations/global` is supported.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Format: `projects/*/locations/*/instance`.
-   * Currently only `locations/global` is supported.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. Creation timestamp.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. Last update timestamp.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * Output only. The current state of the Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * Output only. The current state of the Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - com.google.cloud.apigeeregistry.v1.Instance.State getState(); - - /** - *
-   * Output only. Extra information of Instance.State if the state is `FAILED`.
-   * 
- * - * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The stateMessage. - */ - java.lang.String getStateMessage(); - /** - *
-   * Output only. Extra information of Instance.State if the state is `FAILED`.
-   * 
- * - * string state_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for stateMessage. - */ - com.google.protobuf.ByteString - getStateMessageBytes(); - - /** - *
-   * Required. Config of the Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the config field is set. - */ - boolean hasConfig(); - /** - *
-   * Required. Config of the Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return The config. - */ - com.google.cloud.apigeeregistry.v1.Instance.Config getConfig(); - /** - *
-   * Required. Config of the Instance.
-   * 
- * - * .google.cloud.apigeeregistry.v1.Instance.Config config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.Instance.ConfigOrBuilder getConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequest.java deleted file mode 100644 index 7b64b1e982f2..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequest.java +++ /dev/null @@ -1,848 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for ListApiDeploymentRevisions.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest} - */ -public final class ListApiDeploymentRevisionsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) - ListApiDeploymentRevisionsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApiDeploymentRevisionsRequest.newBuilder() to construct. - private ListApiDeploymentRevisionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApiDeploymentRevisionsRequest() { - name_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApiDeploymentRevisionsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApiDeploymentRevisionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the deployment to list revisions for.
-   * 
- * - * 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 name of the deployment to list revisions for.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of revisions to return per page.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The page token, received from a previous ListApiDeploymentRevisions call.
-   * Provide this to retrieve the subsequent page.
-   * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-   * The page token, received from a previous ListApiDeploymentRevisions call.
-   * Provide this to retrieve the subsequent page.
-   * 
- * - * string page_token = 3; - * @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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest other = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest 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.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest 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.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ListApiDeploymentRevisions.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest build() { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest result = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest(this); - result.name_ = name_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the deployment to list revisions for.
-     * 
- * - * 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 name of the deployment to list revisions for.
-     * 
- * - * 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 name of the deployment to list revisions for.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the deployment to list revisions for.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the deployment to list revisions for.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of revisions to return per page.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of revisions to return per page.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of revisions to return per page.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The page token, received from a previous ListApiDeploymentRevisions call.
-     * Provide this to retrieve the subsequent page.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * The page token, received from a previous ListApiDeploymentRevisions call.
-     * Provide this to retrieve the subsequent page.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * The page token, received from a previous ListApiDeploymentRevisions call.
-     * Provide this to retrieve the subsequent page.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The page token, received from a previous ListApiDeploymentRevisions call.
-     * Provide this to retrieve the subsequent page.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The page token, received from a previous ListApiDeploymentRevisions call.
-     * Provide this to retrieve the subsequent page.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) - private static final com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApiDeploymentRevisionsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApiDeploymentRevisionsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequestOrBuilder.java deleted file mode 100644 index a264d1fa4f18..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsRequestOrBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApiDeploymentRevisionsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the deployment to list revisions for.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the deployment to list revisions for.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The maximum number of revisions to return per page.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The page token, received from a previous ListApiDeploymentRevisions call.
-   * Provide this to retrieve the subsequent page.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The page token, received from a previous ListApiDeploymentRevisions call.
-   * Provide this to retrieve the subsequent page.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponse.java deleted file mode 100644 index 70ca2024cb73..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Response message for ListApiDeploymentRevisionsResponse.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse} - */ -public final class ListApiDeploymentRevisionsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) - ListApiDeploymentRevisionsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApiDeploymentRevisionsResponse.newBuilder() to construct. - private ListApiDeploymentRevisionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApiDeploymentRevisionsResponse() { - apiDeployments_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApiDeploymentRevisionsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApiDeploymentRevisionsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - apiDeployments_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - apiDeployments_.add( - input.readMessage(com.google.cloud.apigeeregistry.v1.ApiDeployment.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - apiDeployments_ = java.util.Collections.unmodifiableList(apiDeployments_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.Builder.class); - } - - public static final int API_DEPLOYMENTS_FIELD_NUMBER = 1; - private java.util.List apiDeployments_; - /** - *
-   * The revisions of the deployment.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - @java.lang.Override - public java.util.List getApiDeploymentsList() { - return apiDeployments_; - } - /** - *
-   * The revisions of the deployment.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - @java.lang.Override - public java.util.List - getApiDeploymentsOrBuilderList() { - return apiDeployments_; - } - /** - *
-   * The revisions of the deployment.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - @java.lang.Override - public int getApiDeploymentsCount() { - return apiDeployments_.size(); - } - /** - *
-   * The revisions of the deployment.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index) { - return apiDeployments_.get(index); - } - /** - *
-   * The revisions of the deployment.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( - int index) { - return apiDeployments_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * A token that can be sent as `page_token` to retrieve the next page.
-   * If 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.
-   * If 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 < apiDeployments_.size(); i++) { - output.writeMessage(1, apiDeployments_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < apiDeployments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, apiDeployments_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse other = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) obj; - - if (!getApiDeploymentsList() - .equals(other.getApiDeploymentsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getApiDeploymentsCount() > 0) { - hash = (37 * hash) + API_DEPLOYMENTS_FIELD_NUMBER; - hash = (53 * hash) + getApiDeploymentsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse 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.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse 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.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for ListApiDeploymentRevisionsResponse.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getApiDeploymentsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (apiDeploymentsBuilder_ == null) { - apiDeployments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - apiDeploymentsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse build() { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse result = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse(this); - int from_bitField0_ = bitField0_; - if (apiDeploymentsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - apiDeployments_ = java.util.Collections.unmodifiableList(apiDeployments_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.apiDeployments_ = apiDeployments_; - } else { - result.apiDeployments_ = apiDeploymentsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.getDefaultInstance()) return this; - if (apiDeploymentsBuilder_ == null) { - if (!other.apiDeployments_.isEmpty()) { - if (apiDeployments_.isEmpty()) { - apiDeployments_ = other.apiDeployments_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureApiDeploymentsIsMutable(); - apiDeployments_.addAll(other.apiDeployments_); - } - onChanged(); - } - } else { - if (!other.apiDeployments_.isEmpty()) { - if (apiDeploymentsBuilder_.isEmpty()) { - apiDeploymentsBuilder_.dispose(); - apiDeploymentsBuilder_ = null; - apiDeployments_ = other.apiDeployments_; - bitField0_ = (bitField0_ & ~0x00000001); - apiDeploymentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getApiDeploymentsFieldBuilder() : null; - } else { - apiDeploymentsBuilder_.addAllMessages(other.apiDeployments_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List apiDeployments_ = - java.util.Collections.emptyList(); - private void ensureApiDeploymentsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - apiDeployments_ = new java.util.ArrayList(apiDeployments_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> apiDeploymentsBuilder_; - - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public java.util.List getApiDeploymentsList() { - if (apiDeploymentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(apiDeployments_); - } else { - return apiDeploymentsBuilder_.getMessageList(); - } - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public int getApiDeploymentsCount() { - if (apiDeploymentsBuilder_ == null) { - return apiDeployments_.size(); - } else { - return apiDeploymentsBuilder_.getCount(); - } - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index) { - if (apiDeploymentsBuilder_ == null) { - return apiDeployments_.get(index); - } else { - return apiDeploymentsBuilder_.getMessage(index); - } - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder setApiDeployments( - int index, com.google.cloud.apigeeregistry.v1.ApiDeployment value) { - if (apiDeploymentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiDeploymentsIsMutable(); - apiDeployments_.set(index, value); - onChanged(); - } else { - apiDeploymentsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder setApiDeployments( - int index, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { - if (apiDeploymentsBuilder_ == null) { - ensureApiDeploymentsIsMutable(); - apiDeployments_.set(index, builderForValue.build()); - onChanged(); - } else { - apiDeploymentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder addApiDeployments(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { - if (apiDeploymentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiDeploymentsIsMutable(); - apiDeployments_.add(value); - onChanged(); - } else { - apiDeploymentsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder addApiDeployments( - int index, com.google.cloud.apigeeregistry.v1.ApiDeployment value) { - if (apiDeploymentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiDeploymentsIsMutable(); - apiDeployments_.add(index, value); - onChanged(); - } else { - apiDeploymentsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder addApiDeployments( - com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { - if (apiDeploymentsBuilder_ == null) { - ensureApiDeploymentsIsMutable(); - apiDeployments_.add(builderForValue.build()); - onChanged(); - } else { - apiDeploymentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder addApiDeployments( - int index, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { - if (apiDeploymentsBuilder_ == null) { - ensureApiDeploymentsIsMutable(); - apiDeployments_.add(index, builderForValue.build()); - onChanged(); - } else { - apiDeploymentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder addAllApiDeployments( - java.lang.Iterable values) { - if (apiDeploymentsBuilder_ == null) { - ensureApiDeploymentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, apiDeployments_); - onChanged(); - } else { - apiDeploymentsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder clearApiDeployments() { - if (apiDeploymentsBuilder_ == null) { - apiDeployments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - apiDeploymentsBuilder_.clear(); - } - return this; - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder removeApiDeployments(int index) { - if (apiDeploymentsBuilder_ == null) { - ensureApiDeploymentsIsMutable(); - apiDeployments_.remove(index); - onChanged(); - } else { - apiDeploymentsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder getApiDeploymentsBuilder( - int index) { - return getApiDeploymentsFieldBuilder().getBuilder(index); - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( - int index) { - if (apiDeploymentsBuilder_ == null) { - return apiDeployments_.get(index); } else { - return apiDeploymentsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public java.util.List - getApiDeploymentsOrBuilderList() { - if (apiDeploymentsBuilder_ != null) { - return apiDeploymentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(apiDeployments_); - } - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder addApiDeploymentsBuilder() { - return getApiDeploymentsFieldBuilder().addBuilder( - com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance()); - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder addApiDeploymentsBuilder( - int index) { - return getApiDeploymentsFieldBuilder().addBuilder( - index, com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance()); - } - /** - *
-     * The revisions of the deployment.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public java.util.List - getApiDeploymentsBuilderList() { - return getApiDeploymentsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> - getApiDeploymentsFieldBuilder() { - if (apiDeploymentsBuilder_ == null) { - apiDeploymentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder>( - apiDeployments_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - apiDeployments_ = null; - } - return apiDeploymentsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * A token that can be sent as `page_token` to retrieve the next page.
-     * If 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.
-     * If 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.
-     * If 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; - onChanged(); - return this; - } - /** - *
-     * A token that can be sent as `page_token` to retrieve the next page.
-     * If 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(); - onChanged(); - return this; - } - /** - *
-     * A token that can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) - private static final com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApiDeploymentRevisionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApiDeploymentRevisionsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponseOrBuilder.java deleted file mode 100644 index 7c437627627b..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentRevisionsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApiDeploymentRevisionsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The revisions of the deployment.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - java.util.List - getApiDeploymentsList(); - /** - *
-   * The revisions of the deployment.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index); - /** - *
-   * The revisions of the deployment.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - int getApiDeploymentsCount(); - /** - *
-   * The revisions of the deployment.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - java.util.List - getApiDeploymentsOrBuilderList(); - /** - *
-   * The revisions of the deployment.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( - int index); - - /** - *
-   * A token that can be sent as `page_token` to retrieve the next page.
-   * If 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.
-   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequest.java deleted file mode 100644 index 90e15f31a703..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequest.java +++ /dev/null @@ -1,1054 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for ListApiDeployments.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest} - */ -public final class ListApiDeploymentsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) - ListApiDeploymentsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApiDeploymentsRequest.newBuilder() to construct. - private ListApiDeploymentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApiDeploymentsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApiDeploymentsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApiDeploymentsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent, which owns this collection of deployments.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 deployments.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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_; - /** - *
-   * The maximum number of deployments to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 50 values will be returned.
-   * The maximum is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * A page token, received from a previous `ListApiDeployments` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiDeployments` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-   * A page token, received from a previous `ListApiDeployments` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiDeployments` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @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 FILTER_FIELD_NUMBER = 4; - private volatile java.lang.Object filter_; - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest other = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + 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) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest 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.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest 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.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ListApiDeployments.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest build() { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest result = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.filter_ = filter_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent, which owns this collection of deployments.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 deployments.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 deployments.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of deployments.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of deployments.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of deployments to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of deployments to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of deployments to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * A page token, received from a previous `ListApiDeployments` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiDeployments` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * A page token, received from a previous `ListApiDeployments` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiDeployments` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * A page token, received from a previous `ListApiDeployments` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiDeployments` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * A page token, received from a previous `ListApiDeployments` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiDeployments` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * A page token, received from a previous `ListApiDeployments` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiDeployments` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) - private static final com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApiDeploymentsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApiDeploymentsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequestOrBuilder.java deleted file mode 100644 index 21f5d58c4ae7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsRequestOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApiDeploymentsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent, which owns this collection of deployments.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 deployments.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of deployments to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 50 values will be returned.
-   * The maximum is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * A page token, received from a previous `ListApiDeployments` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiDeployments` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * A page token, received from a previous `ListApiDeployments` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiDeployments` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponse.java deleted file mode 100644 index 51795021fca5..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Response message for ListApiDeployments.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse} - */ -public final class ListApiDeploymentsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) - ListApiDeploymentsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApiDeploymentsResponse.newBuilder() to construct. - private ListApiDeploymentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApiDeploymentsResponse() { - apiDeployments_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApiDeploymentsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApiDeploymentsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - apiDeployments_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - apiDeployments_.add( - input.readMessage(com.google.cloud.apigeeregistry.v1.ApiDeployment.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - apiDeployments_ = java.util.Collections.unmodifiableList(apiDeployments_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.Builder.class); - } - - public static final int API_DEPLOYMENTS_FIELD_NUMBER = 1; - private java.util.List apiDeployments_; - /** - *
-   * The deployments from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - @java.lang.Override - public java.util.List getApiDeploymentsList() { - return apiDeployments_; - } - /** - *
-   * The deployments from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - @java.lang.Override - public java.util.List - getApiDeploymentsOrBuilderList() { - return apiDeployments_; - } - /** - *
-   * The deployments from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - @java.lang.Override - public int getApiDeploymentsCount() { - return apiDeployments_.size(); - } - /** - *
-   * The deployments from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index) { - return apiDeployments_.get(index); - } - /** - *
-   * The deployments from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( - int index) { - return apiDeployments_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If 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, which can be sent as `page_token` to retrieve the next page.
-   * If 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 < apiDeployments_.size(); i++) { - output.writeMessage(1, apiDeployments_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < apiDeployments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, apiDeployments_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse other = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) obj; - - if (!getApiDeploymentsList() - .equals(other.getApiDeploymentsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getApiDeploymentsCount() > 0) { - hash = (37 * hash) + API_DEPLOYMENTS_FIELD_NUMBER; - hash = (53 * hash) + getApiDeploymentsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse 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.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse 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.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for ListApiDeployments.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getApiDeploymentsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (apiDeploymentsBuilder_ == null) { - apiDeployments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - apiDeploymentsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse build() { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse result = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse(this); - int from_bitField0_ = bitField0_; - if (apiDeploymentsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - apiDeployments_ = java.util.Collections.unmodifiableList(apiDeployments_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.apiDeployments_ = apiDeployments_; - } else { - result.apiDeployments_ = apiDeploymentsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.getDefaultInstance()) return this; - if (apiDeploymentsBuilder_ == null) { - if (!other.apiDeployments_.isEmpty()) { - if (apiDeployments_.isEmpty()) { - apiDeployments_ = other.apiDeployments_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureApiDeploymentsIsMutable(); - apiDeployments_.addAll(other.apiDeployments_); - } - onChanged(); - } - } else { - if (!other.apiDeployments_.isEmpty()) { - if (apiDeploymentsBuilder_.isEmpty()) { - apiDeploymentsBuilder_.dispose(); - apiDeploymentsBuilder_ = null; - apiDeployments_ = other.apiDeployments_; - bitField0_ = (bitField0_ & ~0x00000001); - apiDeploymentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getApiDeploymentsFieldBuilder() : null; - } else { - apiDeploymentsBuilder_.addAllMessages(other.apiDeployments_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List apiDeployments_ = - java.util.Collections.emptyList(); - private void ensureApiDeploymentsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - apiDeployments_ = new java.util.ArrayList(apiDeployments_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> apiDeploymentsBuilder_; - - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public java.util.List getApiDeploymentsList() { - if (apiDeploymentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(apiDeployments_); - } else { - return apiDeploymentsBuilder_.getMessageList(); - } - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public int getApiDeploymentsCount() { - if (apiDeploymentsBuilder_ == null) { - return apiDeployments_.size(); - } else { - return apiDeploymentsBuilder_.getCount(); - } - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index) { - if (apiDeploymentsBuilder_ == null) { - return apiDeployments_.get(index); - } else { - return apiDeploymentsBuilder_.getMessage(index); - } - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder setApiDeployments( - int index, com.google.cloud.apigeeregistry.v1.ApiDeployment value) { - if (apiDeploymentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiDeploymentsIsMutable(); - apiDeployments_.set(index, value); - onChanged(); - } else { - apiDeploymentsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder setApiDeployments( - int index, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { - if (apiDeploymentsBuilder_ == null) { - ensureApiDeploymentsIsMutable(); - apiDeployments_.set(index, builderForValue.build()); - onChanged(); - } else { - apiDeploymentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder addApiDeployments(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { - if (apiDeploymentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiDeploymentsIsMutable(); - apiDeployments_.add(value); - onChanged(); - } else { - apiDeploymentsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder addApiDeployments( - int index, com.google.cloud.apigeeregistry.v1.ApiDeployment value) { - if (apiDeploymentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiDeploymentsIsMutable(); - apiDeployments_.add(index, value); - onChanged(); - } else { - apiDeploymentsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder addApiDeployments( - com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { - if (apiDeploymentsBuilder_ == null) { - ensureApiDeploymentsIsMutable(); - apiDeployments_.add(builderForValue.build()); - onChanged(); - } else { - apiDeploymentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder addApiDeployments( - int index, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { - if (apiDeploymentsBuilder_ == null) { - ensureApiDeploymentsIsMutable(); - apiDeployments_.add(index, builderForValue.build()); - onChanged(); - } else { - apiDeploymentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder addAllApiDeployments( - java.lang.Iterable values) { - if (apiDeploymentsBuilder_ == null) { - ensureApiDeploymentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, apiDeployments_); - onChanged(); - } else { - apiDeploymentsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder clearApiDeployments() { - if (apiDeploymentsBuilder_ == null) { - apiDeployments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - apiDeploymentsBuilder_.clear(); - } - return this; - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public Builder removeApiDeployments(int index) { - if (apiDeploymentsBuilder_ == null) { - ensureApiDeploymentsIsMutable(); - apiDeployments_.remove(index); - onChanged(); - } else { - apiDeploymentsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder getApiDeploymentsBuilder( - int index) { - return getApiDeploymentsFieldBuilder().getBuilder(index); - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( - int index) { - if (apiDeploymentsBuilder_ == null) { - return apiDeployments_.get(index); } else { - return apiDeploymentsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public java.util.List - getApiDeploymentsOrBuilderList() { - if (apiDeploymentsBuilder_ != null) { - return apiDeploymentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(apiDeployments_); - } - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder addApiDeploymentsBuilder() { - return getApiDeploymentsFieldBuilder().addBuilder( - com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance()); - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder addApiDeploymentsBuilder( - int index) { - return getApiDeploymentsFieldBuilder().addBuilder( - index, com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance()); - } - /** - *
-     * The deployments from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - public java.util.List - getApiDeploymentsBuilderList() { - return getApiDeploymentsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> - getApiDeploymentsFieldBuilder() { - if (apiDeploymentsBuilder_ == null) { - apiDeploymentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder>( - apiDeployments_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - apiDeployments_ = null; - } - return apiDeploymentsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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, which can be sent as `page_token` to retrieve the next page.
-     * If 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, which can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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(); - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) - private static final com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApiDeploymentsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApiDeploymentsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponseOrBuilder.java deleted file mode 100644 index cdd1a747dca6..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiDeploymentsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApiDeploymentsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The deployments from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - java.util.List - getApiDeploymentsList(); - /** - *
-   * The deployments from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployments(int index); - /** - *
-   * The deployments from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - int getApiDeploymentsCount(); - /** - *
-   * The deployments from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - java.util.List - getApiDeploymentsOrBuilderList(); - /** - *
-   * The deployments from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiDeployment api_deployments = 1; - */ - com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentsOrBuilder( - int index); - - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequest.java deleted file mode 100644 index d33bacc96bd5..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequest.java +++ /dev/null @@ -1,848 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for ListApiSpecRevisions.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest} - */ -public final class ListApiSpecRevisionsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) - ListApiSpecRevisionsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApiSpecRevisionsRequest.newBuilder() to construct. - private ListApiSpecRevisionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApiSpecRevisionsRequest() { - name_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApiSpecRevisionsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApiSpecRevisionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the spec to list revisions for.
-   * 
- * - * 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 name of the spec to list revisions for.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of revisions to return per page.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The page token, received from a previous ListApiSpecRevisions call.
-   * Provide this to retrieve the subsequent page.
-   * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-   * The page token, received from a previous ListApiSpecRevisions call.
-   * Provide this to retrieve the subsequent page.
-   * 
- * - * string page_token = 3; - * @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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest other = (com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest 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.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest 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.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ListApiSpecRevisions.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest build() { - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest result = new com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest(this); - result.name_ = name_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the spec to list revisions for.
-     * 
- * - * 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 name of the spec to list revisions for.
-     * 
- * - * 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 name of the spec to list revisions for.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec to list revisions for.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec to list revisions for.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of revisions to return per page.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of revisions to return per page.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of revisions to return per page.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The page token, received from a previous ListApiSpecRevisions call.
-     * Provide this to retrieve the subsequent page.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * The page token, received from a previous ListApiSpecRevisions call.
-     * Provide this to retrieve the subsequent page.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * The page token, received from a previous ListApiSpecRevisions call.
-     * Provide this to retrieve the subsequent page.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The page token, received from a previous ListApiSpecRevisions call.
-     * Provide this to retrieve the subsequent page.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The page token, received from a previous ListApiSpecRevisions call.
-     * Provide this to retrieve the subsequent page.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) - private static final com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApiSpecRevisionsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApiSpecRevisionsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequestOrBuilder.java deleted file mode 100644 index dcb85ef1cdc9..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsRequestOrBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApiSpecRevisionsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the spec to list revisions for.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the spec to list revisions for.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The maximum number of revisions to return per page.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The page token, received from a previous ListApiSpecRevisions call.
-   * Provide this to retrieve the subsequent page.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The page token, received from a previous ListApiSpecRevisions call.
-   * Provide this to retrieve the subsequent page.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponse.java deleted file mode 100644 index d62dc44192c6..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Response message for ListApiSpecRevisionsResponse.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse} - */ -public final class ListApiSpecRevisionsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) - ListApiSpecRevisionsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApiSpecRevisionsResponse.newBuilder() to construct. - private ListApiSpecRevisionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApiSpecRevisionsResponse() { - apiSpecs_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApiSpecRevisionsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApiSpecRevisionsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - apiSpecs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - apiSpecs_.add( - input.readMessage(com.google.cloud.apigeeregistry.v1.ApiSpec.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - apiSpecs_ = java.util.Collections.unmodifiableList(apiSpecs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.Builder.class); - } - - public static final int API_SPECS_FIELD_NUMBER = 1; - private java.util.List apiSpecs_; - /** - *
-   * The revisions of the spec.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - @java.lang.Override - public java.util.List getApiSpecsList() { - return apiSpecs_; - } - /** - *
-   * The revisions of the spec.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - @java.lang.Override - public java.util.List - getApiSpecsOrBuilderList() { - return apiSpecs_; - } - /** - *
-   * The revisions of the spec.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - @java.lang.Override - public int getApiSpecsCount() { - return apiSpecs_.size(); - } - /** - *
-   * The revisions of the spec.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index) { - return apiSpecs_.get(index); - } - /** - *
-   * The revisions of the spec.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( - int index) { - return apiSpecs_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * A token that can be sent as `page_token` to retrieve the next page.
-   * If 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.
-   * If 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 < apiSpecs_.size(); i++) { - output.writeMessage(1, apiSpecs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < apiSpecs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, apiSpecs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse other = (com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) obj; - - if (!getApiSpecsList() - .equals(other.getApiSpecsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getApiSpecsCount() > 0) { - hash = (37 * hash) + API_SPECS_FIELD_NUMBER; - hash = (53 * hash) + getApiSpecsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse 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.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse 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.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for ListApiSpecRevisionsResponse.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getApiSpecsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (apiSpecsBuilder_ == null) { - apiSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - apiSpecsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse build() { - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse result = new com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse(this); - int from_bitField0_ = bitField0_; - if (apiSpecsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - apiSpecs_ = java.util.Collections.unmodifiableList(apiSpecs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.apiSpecs_ = apiSpecs_; - } else { - result.apiSpecs_ = apiSpecsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.getDefaultInstance()) return this; - if (apiSpecsBuilder_ == null) { - if (!other.apiSpecs_.isEmpty()) { - if (apiSpecs_.isEmpty()) { - apiSpecs_ = other.apiSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureApiSpecsIsMutable(); - apiSpecs_.addAll(other.apiSpecs_); - } - onChanged(); - } - } else { - if (!other.apiSpecs_.isEmpty()) { - if (apiSpecsBuilder_.isEmpty()) { - apiSpecsBuilder_.dispose(); - apiSpecsBuilder_ = null; - apiSpecs_ = other.apiSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); - apiSpecsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getApiSpecsFieldBuilder() : null; - } else { - apiSpecsBuilder_.addAllMessages(other.apiSpecs_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List apiSpecs_ = - java.util.Collections.emptyList(); - private void ensureApiSpecsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - apiSpecs_ = new java.util.ArrayList(apiSpecs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> apiSpecsBuilder_; - - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public java.util.List getApiSpecsList() { - if (apiSpecsBuilder_ == null) { - return java.util.Collections.unmodifiableList(apiSpecs_); - } else { - return apiSpecsBuilder_.getMessageList(); - } - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public int getApiSpecsCount() { - if (apiSpecsBuilder_ == null) { - return apiSpecs_.size(); - } else { - return apiSpecsBuilder_.getCount(); - } - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index) { - if (apiSpecsBuilder_ == null) { - return apiSpecs_.get(index); - } else { - return apiSpecsBuilder_.getMessage(index); - } - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder setApiSpecs( - int index, com.google.cloud.apigeeregistry.v1.ApiSpec value) { - if (apiSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiSpecsIsMutable(); - apiSpecs_.set(index, value); - onChanged(); - } else { - apiSpecsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder setApiSpecs( - int index, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { - if (apiSpecsBuilder_ == null) { - ensureApiSpecsIsMutable(); - apiSpecs_.set(index, builderForValue.build()); - onChanged(); - } else { - apiSpecsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder addApiSpecs(com.google.cloud.apigeeregistry.v1.ApiSpec value) { - if (apiSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiSpecsIsMutable(); - apiSpecs_.add(value); - onChanged(); - } else { - apiSpecsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder addApiSpecs( - int index, com.google.cloud.apigeeregistry.v1.ApiSpec value) { - if (apiSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiSpecsIsMutable(); - apiSpecs_.add(index, value); - onChanged(); - } else { - apiSpecsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder addApiSpecs( - com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { - if (apiSpecsBuilder_ == null) { - ensureApiSpecsIsMutable(); - apiSpecs_.add(builderForValue.build()); - onChanged(); - } else { - apiSpecsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder addApiSpecs( - int index, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { - if (apiSpecsBuilder_ == null) { - ensureApiSpecsIsMutable(); - apiSpecs_.add(index, builderForValue.build()); - onChanged(); - } else { - apiSpecsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder addAllApiSpecs( - java.lang.Iterable values) { - if (apiSpecsBuilder_ == null) { - ensureApiSpecsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, apiSpecs_); - onChanged(); - } else { - apiSpecsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder clearApiSpecs() { - if (apiSpecsBuilder_ == null) { - apiSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - apiSpecsBuilder_.clear(); - } - return this; - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder removeApiSpecs(int index) { - if (apiSpecsBuilder_ == null) { - ensureApiSpecsIsMutable(); - apiSpecs_.remove(index); - onChanged(); - } else { - apiSpecsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder getApiSpecsBuilder( - int index) { - return getApiSpecsFieldBuilder().getBuilder(index); - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( - int index) { - if (apiSpecsBuilder_ == null) { - return apiSpecs_.get(index); } else { - return apiSpecsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public java.util.List - getApiSpecsOrBuilderList() { - if (apiSpecsBuilder_ != null) { - return apiSpecsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(apiSpecs_); - } - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder addApiSpecsBuilder() { - return getApiSpecsFieldBuilder().addBuilder( - com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance()); - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder addApiSpecsBuilder( - int index) { - return getApiSpecsFieldBuilder().addBuilder( - index, com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance()); - } - /** - *
-     * The revisions of the spec.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public java.util.List - getApiSpecsBuilderList() { - return getApiSpecsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> - getApiSpecsFieldBuilder() { - if (apiSpecsBuilder_ == null) { - apiSpecsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder>( - apiSpecs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - apiSpecs_ = null; - } - return apiSpecsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * A token that can be sent as `page_token` to retrieve the next page.
-     * If 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.
-     * If 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.
-     * If 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; - onChanged(); - return this; - } - /** - *
-     * A token that can be sent as `page_token` to retrieve the next page.
-     * If 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(); - onChanged(); - return this; - } - /** - *
-     * A token that can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) - private static final com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApiSpecRevisionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApiSpecRevisionsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponseOrBuilder.java deleted file mode 100644 index d614627ebf12..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecRevisionsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApiSpecRevisionsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The revisions of the spec.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - java.util.List - getApiSpecsList(); - /** - *
-   * The revisions of the spec.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index); - /** - *
-   * The revisions of the spec.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - int getApiSpecsCount(); - /** - *
-   * The revisions of the spec.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - java.util.List - getApiSpecsOrBuilderList(); - /** - *
-   * The revisions of the spec.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( - int index); - - /** - *
-   * A token that can be sent as `page_token` to retrieve the next page.
-   * If 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.
-   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequest.java deleted file mode 100644 index edb074eb44c4..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequest.java +++ /dev/null @@ -1,1054 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for ListApiSpecs.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecsRequest} - */ -public final class ListApiSpecsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiSpecsRequest) - ListApiSpecsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApiSpecsRequest.newBuilder() to construct. - private ListApiSpecsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApiSpecsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApiSpecsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApiSpecsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent, which owns this collection of specs.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * 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 specs.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * 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_; - /** - *
-   * The maximum number of specs to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 50 values will be returned.
-   * The maximum is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * A page token, received from a previous `ListApiSpecs` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiSpecs` must match
-   * the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-   * A page token, received from a previous `ListApiSpecs` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiSpecs` must match
-   * the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @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 FILTER_FIELD_NUMBER = 4; - private volatile java.lang.Object filter_; - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields except contents.
-   * 
- * - * string filter = 4; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields except contents.
-   * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest other = (com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + 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) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest 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.apigeeregistry.v1.ListApiSpecsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest 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.apigeeregistry.v1.ListApiSpecsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ListApiSpecs.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiSpecsRequest) - com.google.cloud.apigeeregistry.v1.ListApiSpecsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest build() { - com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest result = new com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.filter_ = filter_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent, which owns this collection of specs.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * 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 specs.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * 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 specs.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of specs.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of specs.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of specs to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of specs to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of specs to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * A page token, received from a previous `ListApiSpecs` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiSpecs` must match
-     * the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * A page token, received from a previous `ListApiSpecs` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiSpecs` must match
-     * the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * A page token, received from a previous `ListApiSpecs` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiSpecs` must match
-     * the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * A page token, received from a previous `ListApiSpecs` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiSpecs` must match
-     * the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * A page token, received from a previous `ListApiSpecs` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiSpecs` must match
-     * the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields except contents.
-     * 
- * - * string filter = 4; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields except contents.
-     * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields except contents.
-     * 
- * - * string filter = 4; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields except contents.
-     * 
- * - * string filter = 4; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields except contents.
-     * 
- * - * string filter = 4; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiSpecsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiSpecsRequest) - private static final com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApiSpecsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApiSpecsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequestOrBuilder.java deleted file mode 100644 index 208db1f4bf7e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsRequestOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApiSpecsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiSpecsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent, which owns this collection of specs.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * 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 specs.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of specs to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 50 values will be returned.
-   * The maximum is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * A page token, received from a previous `ListApiSpecs` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiSpecs` must match
-   * the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * A page token, received from a previous `ListApiSpecs` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiSpecs` must match
-   * the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields except contents.
-   * 
- * - * string filter = 4; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields except contents.
-   * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponse.java deleted file mode 100644 index c48efb626ca9..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Response message for ListApiSpecs.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecsResponse} - */ -public final class ListApiSpecsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiSpecsResponse) - ListApiSpecsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApiSpecsResponse.newBuilder() to construct. - private ListApiSpecsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApiSpecsResponse() { - apiSpecs_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApiSpecsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApiSpecsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - apiSpecs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - apiSpecs_.add( - input.readMessage(com.google.cloud.apigeeregistry.v1.ApiSpec.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - apiSpecs_ = java.util.Collections.unmodifiableList(apiSpecs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.Builder.class); - } - - public static final int API_SPECS_FIELD_NUMBER = 1; - private java.util.List apiSpecs_; - /** - *
-   * The specs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - @java.lang.Override - public java.util.List getApiSpecsList() { - return apiSpecs_; - } - /** - *
-   * The specs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - @java.lang.Override - public java.util.List - getApiSpecsOrBuilderList() { - return apiSpecs_; - } - /** - *
-   * The specs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - @java.lang.Override - public int getApiSpecsCount() { - return apiSpecs_.size(); - } - /** - *
-   * The specs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index) { - return apiSpecs_.get(index); - } - /** - *
-   * The specs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( - int index) { - return apiSpecs_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If 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, which can be sent as `page_token` to retrieve the next page.
-   * If 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 < apiSpecs_.size(); i++) { - output.writeMessage(1, apiSpecs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < apiSpecs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, apiSpecs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse other = (com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse) obj; - - if (!getApiSpecsList() - .equals(other.getApiSpecsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getApiSpecsCount() > 0) { - hash = (37 * hash) + API_SPECS_FIELD_NUMBER; - hash = (53 * hash) + getApiSpecsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse 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.apigeeregistry.v1.ListApiSpecsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse 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.apigeeregistry.v1.ListApiSpecsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for ListApiSpecs.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiSpecsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiSpecsResponse) - com.google.cloud.apigeeregistry.v1.ListApiSpecsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getApiSpecsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (apiSpecsBuilder_ == null) { - apiSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - apiSpecsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse build() { - com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse result = new com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse(this); - int from_bitField0_ = bitField0_; - if (apiSpecsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - apiSpecs_ = java.util.Collections.unmodifiableList(apiSpecs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.apiSpecs_ = apiSpecs_; - } else { - result.apiSpecs_ = apiSpecsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse.getDefaultInstance()) return this; - if (apiSpecsBuilder_ == null) { - if (!other.apiSpecs_.isEmpty()) { - if (apiSpecs_.isEmpty()) { - apiSpecs_ = other.apiSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureApiSpecsIsMutable(); - apiSpecs_.addAll(other.apiSpecs_); - } - onChanged(); - } - } else { - if (!other.apiSpecs_.isEmpty()) { - if (apiSpecsBuilder_.isEmpty()) { - apiSpecsBuilder_.dispose(); - apiSpecsBuilder_ = null; - apiSpecs_ = other.apiSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); - apiSpecsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getApiSpecsFieldBuilder() : null; - } else { - apiSpecsBuilder_.addAllMessages(other.apiSpecs_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List apiSpecs_ = - java.util.Collections.emptyList(); - private void ensureApiSpecsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - apiSpecs_ = new java.util.ArrayList(apiSpecs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> apiSpecsBuilder_; - - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public java.util.List getApiSpecsList() { - if (apiSpecsBuilder_ == null) { - return java.util.Collections.unmodifiableList(apiSpecs_); - } else { - return apiSpecsBuilder_.getMessageList(); - } - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public int getApiSpecsCount() { - if (apiSpecsBuilder_ == null) { - return apiSpecs_.size(); - } else { - return apiSpecsBuilder_.getCount(); - } - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index) { - if (apiSpecsBuilder_ == null) { - return apiSpecs_.get(index); - } else { - return apiSpecsBuilder_.getMessage(index); - } - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder setApiSpecs( - int index, com.google.cloud.apigeeregistry.v1.ApiSpec value) { - if (apiSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiSpecsIsMutable(); - apiSpecs_.set(index, value); - onChanged(); - } else { - apiSpecsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder setApiSpecs( - int index, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { - if (apiSpecsBuilder_ == null) { - ensureApiSpecsIsMutable(); - apiSpecs_.set(index, builderForValue.build()); - onChanged(); - } else { - apiSpecsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder addApiSpecs(com.google.cloud.apigeeregistry.v1.ApiSpec value) { - if (apiSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiSpecsIsMutable(); - apiSpecs_.add(value); - onChanged(); - } else { - apiSpecsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder addApiSpecs( - int index, com.google.cloud.apigeeregistry.v1.ApiSpec value) { - if (apiSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiSpecsIsMutable(); - apiSpecs_.add(index, value); - onChanged(); - } else { - apiSpecsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder addApiSpecs( - com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { - if (apiSpecsBuilder_ == null) { - ensureApiSpecsIsMutable(); - apiSpecs_.add(builderForValue.build()); - onChanged(); - } else { - apiSpecsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder addApiSpecs( - int index, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { - if (apiSpecsBuilder_ == null) { - ensureApiSpecsIsMutable(); - apiSpecs_.add(index, builderForValue.build()); - onChanged(); - } else { - apiSpecsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder addAllApiSpecs( - java.lang.Iterable values) { - if (apiSpecsBuilder_ == null) { - ensureApiSpecsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, apiSpecs_); - onChanged(); - } else { - apiSpecsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder clearApiSpecs() { - if (apiSpecsBuilder_ == null) { - apiSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - apiSpecsBuilder_.clear(); - } - return this; - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public Builder removeApiSpecs(int index) { - if (apiSpecsBuilder_ == null) { - ensureApiSpecsIsMutable(); - apiSpecs_.remove(index); - onChanged(); - } else { - apiSpecsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder getApiSpecsBuilder( - int index) { - return getApiSpecsFieldBuilder().getBuilder(index); - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( - int index) { - if (apiSpecsBuilder_ == null) { - return apiSpecs_.get(index); } else { - return apiSpecsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public java.util.List - getApiSpecsOrBuilderList() { - if (apiSpecsBuilder_ != null) { - return apiSpecsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(apiSpecs_); - } - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder addApiSpecsBuilder() { - return getApiSpecsFieldBuilder().addBuilder( - com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance()); - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder addApiSpecsBuilder( - int index) { - return getApiSpecsFieldBuilder().addBuilder( - index, com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance()); - } - /** - *
-     * The specs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - public java.util.List - getApiSpecsBuilderList() { - return getApiSpecsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> - getApiSpecsFieldBuilder() { - if (apiSpecsBuilder_ == null) { - apiSpecsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder>( - apiSpecs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - apiSpecs_ = null; - } - return apiSpecsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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, which can be sent as `page_token` to retrieve the next page.
-     * If 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, which can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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(); - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiSpecsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiSpecsResponse) - private static final com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApiSpecsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApiSpecsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponseOrBuilder.java deleted file mode 100644 index 18aafc8c3380..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiSpecsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApiSpecsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiSpecsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The specs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - java.util.List - getApiSpecsList(); - /** - *
-   * The specs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpecs(int index); - /** - *
-   * The specs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - int getApiSpecsCount(); - /** - *
-   * The specs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - java.util.List - getApiSpecsOrBuilderList(); - /** - *
-   * The specs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiSpec api_specs = 1; - */ - com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecsOrBuilder( - int index); - - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequest.java deleted file mode 100644 index 3ca421880623..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequest.java +++ /dev/null @@ -1,1054 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for ListApiVersions.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiVersionsRequest} - */ -public final class ListApiVersionsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiVersionsRequest) - ListApiVersionsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApiVersionsRequest.newBuilder() to construct. - private ListApiVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApiVersionsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApiVersionsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApiVersionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent, which owns this collection of versions.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 versions.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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_; - /** - *
-   * The maximum number of versions to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 50 values will be returned.
-   * The maximum is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * A page token, received from a previous `ListApiVersions` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiVersions` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-   * A page token, received from a previous `ListApiVersions` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiVersions` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @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 FILTER_FIELD_NUMBER = 4; - private volatile java.lang.Object filter_; - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest other = (com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + 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) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest 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.apigeeregistry.v1.ListApiVersionsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest 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.apigeeregistry.v1.ListApiVersionsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ListApiVersions.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiVersionsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiVersionsRequest) - com.google.cloud.apigeeregistry.v1.ListApiVersionsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.class, com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest build() { - com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest result = new com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.filter_ = filter_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent, which owns this collection of versions.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 versions.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * 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 versions.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of versions.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of versions.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of versions to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of versions to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of versions to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * A page token, received from a previous `ListApiVersions` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiVersions` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * A page token, received from a previous `ListApiVersions` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiVersions` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * A page token, received from a previous `ListApiVersions` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiVersions` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * A page token, received from a previous `ListApiVersions` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiVersions` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * A page token, received from a previous `ListApiVersions` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApiVersions` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiVersionsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiVersionsRequest) - private static final com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApiVersionsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApiVersionsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequestOrBuilder.java deleted file mode 100644 index e6b628396556..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsRequestOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApiVersionsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiVersionsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent, which owns this collection of versions.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * 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 versions.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of versions to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 50 values will be returned.
-   * The maximum is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * A page token, received from a previous `ListApiVersions` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiVersions` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * A page token, received from a previous `ListApiVersions` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApiVersions` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponse.java deleted file mode 100644 index f0138d370a16..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Response message for ListApiVersions.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiVersionsResponse} - */ -public final class ListApiVersionsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApiVersionsResponse) - ListApiVersionsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApiVersionsResponse.newBuilder() to construct. - private ListApiVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApiVersionsResponse() { - apiVersions_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApiVersionsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApiVersionsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - apiVersions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - apiVersions_.add( - input.readMessage(com.google.cloud.apigeeregistry.v1.ApiVersion.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - apiVersions_ = java.util.Collections.unmodifiableList(apiVersions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.Builder.class); - } - - public static final int API_VERSIONS_FIELD_NUMBER = 1; - private java.util.List apiVersions_; - /** - *
-   * The versions from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - @java.lang.Override - public java.util.List getApiVersionsList() { - return apiVersions_; - } - /** - *
-   * The versions from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - @java.lang.Override - public java.util.List - getApiVersionsOrBuilderList() { - return apiVersions_; - } - /** - *
-   * The versions from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - @java.lang.Override - public int getApiVersionsCount() { - return apiVersions_.size(); - } - /** - *
-   * The versions from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersions(int index) { - return apiVersions_.get(index); - } - /** - *
-   * The versions from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionsOrBuilder( - int index) { - return apiVersions_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If 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, which can be sent as `page_token` to retrieve the next page.
-   * If 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 < apiVersions_.size(); i++) { - output.writeMessage(1, apiVersions_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < apiVersions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, apiVersions_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse other = (com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse) obj; - - if (!getApiVersionsList() - .equals(other.getApiVersionsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getApiVersionsCount() > 0) { - hash = (37 * hash) + API_VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + getApiVersionsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse 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.apigeeregistry.v1.ListApiVersionsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse 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.apigeeregistry.v1.ListApiVersionsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for ListApiVersions.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApiVersionsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApiVersionsResponse) - com.google.cloud.apigeeregistry.v1.ListApiVersionsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.class, com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getApiVersionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (apiVersionsBuilder_ == null) { - apiVersions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - apiVersionsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse build() { - com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse result = new com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse(this); - int from_bitField0_ = bitField0_; - if (apiVersionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - apiVersions_ = java.util.Collections.unmodifiableList(apiVersions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.apiVersions_ = apiVersions_; - } else { - result.apiVersions_ = apiVersionsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse.getDefaultInstance()) return this; - if (apiVersionsBuilder_ == null) { - if (!other.apiVersions_.isEmpty()) { - if (apiVersions_.isEmpty()) { - apiVersions_ = other.apiVersions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureApiVersionsIsMutable(); - apiVersions_.addAll(other.apiVersions_); - } - onChanged(); - } - } else { - if (!other.apiVersions_.isEmpty()) { - if (apiVersionsBuilder_.isEmpty()) { - apiVersionsBuilder_.dispose(); - apiVersionsBuilder_ = null; - apiVersions_ = other.apiVersions_; - bitField0_ = (bitField0_ & ~0x00000001); - apiVersionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getApiVersionsFieldBuilder() : null; - } else { - apiVersionsBuilder_.addAllMessages(other.apiVersions_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List apiVersions_ = - java.util.Collections.emptyList(); - private void ensureApiVersionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - apiVersions_ = new java.util.ArrayList(apiVersions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> apiVersionsBuilder_; - - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public java.util.List getApiVersionsList() { - if (apiVersionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(apiVersions_); - } else { - return apiVersionsBuilder_.getMessageList(); - } - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public int getApiVersionsCount() { - if (apiVersionsBuilder_ == null) { - return apiVersions_.size(); - } else { - return apiVersionsBuilder_.getCount(); - } - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersions(int index) { - if (apiVersionsBuilder_ == null) { - return apiVersions_.get(index); - } else { - return apiVersionsBuilder_.getMessage(index); - } - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public Builder setApiVersions( - int index, com.google.cloud.apigeeregistry.v1.ApiVersion value) { - if (apiVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiVersionsIsMutable(); - apiVersions_.set(index, value); - onChanged(); - } else { - apiVersionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public Builder setApiVersions( - int index, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder builderForValue) { - if (apiVersionsBuilder_ == null) { - ensureApiVersionsIsMutable(); - apiVersions_.set(index, builderForValue.build()); - onChanged(); - } else { - apiVersionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public Builder addApiVersions(com.google.cloud.apigeeregistry.v1.ApiVersion value) { - if (apiVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiVersionsIsMutable(); - apiVersions_.add(value); - onChanged(); - } else { - apiVersionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public Builder addApiVersions( - int index, com.google.cloud.apigeeregistry.v1.ApiVersion value) { - if (apiVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApiVersionsIsMutable(); - apiVersions_.add(index, value); - onChanged(); - } else { - apiVersionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public Builder addApiVersions( - com.google.cloud.apigeeregistry.v1.ApiVersion.Builder builderForValue) { - if (apiVersionsBuilder_ == null) { - ensureApiVersionsIsMutable(); - apiVersions_.add(builderForValue.build()); - onChanged(); - } else { - apiVersionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public Builder addApiVersions( - int index, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder builderForValue) { - if (apiVersionsBuilder_ == null) { - ensureApiVersionsIsMutable(); - apiVersions_.add(index, builderForValue.build()); - onChanged(); - } else { - apiVersionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public Builder addAllApiVersions( - java.lang.Iterable values) { - if (apiVersionsBuilder_ == null) { - ensureApiVersionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, apiVersions_); - onChanged(); - } else { - apiVersionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public Builder clearApiVersions() { - if (apiVersionsBuilder_ == null) { - apiVersions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - apiVersionsBuilder_.clear(); - } - return this; - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public Builder removeApiVersions(int index) { - if (apiVersionsBuilder_ == null) { - ensureApiVersionsIsMutable(); - apiVersions_.remove(index); - onChanged(); - } else { - apiVersionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiVersion.Builder getApiVersionsBuilder( - int index) { - return getApiVersionsFieldBuilder().getBuilder(index); - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionsOrBuilder( - int index) { - if (apiVersionsBuilder_ == null) { - return apiVersions_.get(index); } else { - return apiVersionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public java.util.List - getApiVersionsOrBuilderList() { - if (apiVersionsBuilder_ != null) { - return apiVersionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(apiVersions_); - } - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiVersion.Builder addApiVersionsBuilder() { - return getApiVersionsFieldBuilder().addBuilder( - com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance()); - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiVersion.Builder addApiVersionsBuilder( - int index) { - return getApiVersionsFieldBuilder().addBuilder( - index, com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance()); - } - /** - *
-     * The versions from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - public java.util.List - getApiVersionsBuilderList() { - return getApiVersionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> - getApiVersionsFieldBuilder() { - if (apiVersionsBuilder_ == null) { - apiVersionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder>( - apiVersions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - apiVersions_ = null; - } - return apiVersionsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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, which can be sent as `page_token` to retrieve the next page.
-     * If 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, which can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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(); - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApiVersionsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApiVersionsResponse) - private static final com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApiVersionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApiVersionsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponseOrBuilder.java deleted file mode 100644 index 9e2e1a92d796..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApiVersionsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApiVersionsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApiVersionsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The versions from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - java.util.List - getApiVersionsList(); - /** - *
-   * The versions from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersions(int index); - /** - *
-   * The versions from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - int getApiVersionsCount(); - /** - *
-   * The versions from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - java.util.List - getApiVersionsOrBuilderList(); - /** - *
-   * The versions from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.ApiVersion api_versions = 1; - */ - com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionsOrBuilder( - int index); - - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequest.java deleted file mode 100644 index bacfff48f6ee..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequest.java +++ /dev/null @@ -1,1054 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for ListApis.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApisRequest} - */ -public final class ListApisRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApisRequest) - ListApisRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApisRequest.newBuilder() to construct. - private ListApisRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApisRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApisRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApisRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApisRequest.class, com.google.cloud.apigeeregistry.v1.ListApisRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent, which owns this collection of APIs.
-   * Format: `projects/*/locations/*`
-   * 
- * - * 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 APIs.
-   * Format: `projects/*/locations/*`
-   * 
- * - * 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_; - /** - *
-   * The maximum number of APIs to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 50 values will be returned.
-   * The maximum is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * A page token, received from a previous `ListApis` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApis` must match
-   * the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-   * A page token, received from a previous `ListApis` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApis` must match
-   * the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @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 FILTER_FIELD_NUMBER = 4; - private volatile java.lang.Object filter_; - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApisRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApisRequest other = (com.google.cloud.apigeeregistry.v1.ListApisRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + 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) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApisRequest 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.apigeeregistry.v1.ListApisRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApisRequest 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.apigeeregistry.v1.ListApisRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApisRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApisRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ListApis.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApisRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApisRequest) - com.google.cloud.apigeeregistry.v1.ListApisRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApisRequest.class, com.google.cloud.apigeeregistry.v1.ListApisRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApisRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApisRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApisRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApisRequest build() { - com.google.cloud.apigeeregistry.v1.ListApisRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApisRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApisRequest result = new com.google.cloud.apigeeregistry.v1.ListApisRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.filter_ = filter_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApisRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApisRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApisRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApisRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApisRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApisRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent, which owns this collection of APIs.
-     * Format: `projects/*/locations/*`
-     * 
- * - * 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 APIs.
-     * Format: `projects/*/locations/*`
-     * 
- * - * 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 APIs.
-     * Format: `projects/*/locations/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of APIs.
-     * Format: `projects/*/locations/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of APIs.
-     * Format: `projects/*/locations/*`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of APIs to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of APIs to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of APIs to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * A page token, received from a previous `ListApis` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApis` must match
-     * the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * A page token, received from a previous `ListApis` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApis` must match
-     * the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * A page token, received from a previous `ListApis` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApis` must match
-     * the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * A page token, received from a previous `ListApis` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApis` must match
-     * the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * A page token, received from a previous `ListApis` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListApis` must match
-     * the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields.
-     * 
- * - * string filter = 4; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApisRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApisRequest) - private static final com.google.cloud.apigeeregistry.v1.ListApisRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApisRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApisRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApisRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApisRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApisRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequestOrBuilder.java deleted file mode 100644 index 236cced25d5f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisRequestOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApisRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApisRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent, which owns this collection of APIs.
-   * Format: `projects/*/locations/*`
-   * 
- * - * 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 APIs.
-   * Format: `projects/*/locations/*`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of APIs to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 50 values will be returned.
-   * The maximum is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * A page token, received from a previous `ListApis` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApis` must match
-   * the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * A page token, received from a previous `ListApis` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListApis` must match
-   * the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields.
-   * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponse.java deleted file mode 100644 index c01abf8c5777..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Response message for ListApis.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApisResponse} - */ -public final class ListApisResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListApisResponse) - ListApisResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListApisResponse.newBuilder() to construct. - private ListApisResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListApisResponse() { - apis_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListApisResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListApisResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - apis_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - apis_.add( - input.readMessage(com.google.cloud.apigeeregistry.v1.Api.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - apis_ = java.util.Collections.unmodifiableList(apis_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApisResponse.class, com.google.cloud.apigeeregistry.v1.ListApisResponse.Builder.class); - } - - public static final int APIS_FIELD_NUMBER = 1; - private java.util.List apis_; - /** - *
-   * The APIs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - @java.lang.Override - public java.util.List getApisList() { - return apis_; - } - /** - *
-   * The APIs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - @java.lang.Override - public java.util.List - getApisOrBuilderList() { - return apis_; - } - /** - *
-   * The APIs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - @java.lang.Override - public int getApisCount() { - return apis_.size(); - } - /** - *
-   * The APIs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Api getApis(int index) { - return apis_.get(index); - } - /** - *
-   * The APIs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApisOrBuilder( - int index) { - return apis_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If 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, which can be sent as `page_token` to retrieve the next page.
-   * If 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 < apis_.size(); i++) { - output.writeMessage(1, apis_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < apis_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, apis_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListApisResponse)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListApisResponse other = (com.google.cloud.apigeeregistry.v1.ListApisResponse) obj; - - if (!getApisList() - .equals(other.getApisList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getApisCount() > 0) { - hash = (37 * hash) + APIS_FIELD_NUMBER; - hash = (53 * hash) + getApisList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApisResponse 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.apigeeregistry.v1.ListApisResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApisResponse 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.apigeeregistry.v1.ListApisResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListApisResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListApisResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for ListApis.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListApisResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListApisResponse) - com.google.cloud.apigeeregistry.v1.ListApisResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListApisResponse.class, com.google.cloud.apigeeregistry.v1.ListApisResponse.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListApisResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getApisFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (apisBuilder_ == null) { - apis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - apisBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApisResponse getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListApisResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApisResponse build() { - com.google.cloud.apigeeregistry.v1.ListApisResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApisResponse buildPartial() { - com.google.cloud.apigeeregistry.v1.ListApisResponse result = new com.google.cloud.apigeeregistry.v1.ListApisResponse(this); - int from_bitField0_ = bitField0_; - if (apisBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - apis_ = java.util.Collections.unmodifiableList(apis_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.apis_ = apis_; - } else { - result.apis_ = apisBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListApisResponse) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListApisResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListApisResponse other) { - if (other == com.google.cloud.apigeeregistry.v1.ListApisResponse.getDefaultInstance()) return this; - if (apisBuilder_ == null) { - if (!other.apis_.isEmpty()) { - if (apis_.isEmpty()) { - apis_ = other.apis_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureApisIsMutable(); - apis_.addAll(other.apis_); - } - onChanged(); - } - } else { - if (!other.apis_.isEmpty()) { - if (apisBuilder_.isEmpty()) { - apisBuilder_.dispose(); - apisBuilder_ = null; - apis_ = other.apis_; - bitField0_ = (bitField0_ & ~0x00000001); - apisBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getApisFieldBuilder() : null; - } else { - apisBuilder_.addAllMessages(other.apis_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListApisResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListApisResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List apis_ = - java.util.Collections.emptyList(); - private void ensureApisIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - apis_ = new java.util.ArrayList(apis_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> apisBuilder_; - - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public java.util.List getApisList() { - if (apisBuilder_ == null) { - return java.util.Collections.unmodifiableList(apis_); - } else { - return apisBuilder_.getMessageList(); - } - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public int getApisCount() { - if (apisBuilder_ == null) { - return apis_.size(); - } else { - return apisBuilder_.getCount(); - } - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public com.google.cloud.apigeeregistry.v1.Api getApis(int index) { - if (apisBuilder_ == null) { - return apis_.get(index); - } else { - return apisBuilder_.getMessage(index); - } - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public Builder setApis( - int index, com.google.cloud.apigeeregistry.v1.Api value) { - if (apisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApisIsMutable(); - apis_.set(index, value); - onChanged(); - } else { - apisBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public Builder setApis( - int index, com.google.cloud.apigeeregistry.v1.Api.Builder builderForValue) { - if (apisBuilder_ == null) { - ensureApisIsMutable(); - apis_.set(index, builderForValue.build()); - onChanged(); - } else { - apisBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public Builder addApis(com.google.cloud.apigeeregistry.v1.Api value) { - if (apisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApisIsMutable(); - apis_.add(value); - onChanged(); - } else { - apisBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public Builder addApis( - int index, com.google.cloud.apigeeregistry.v1.Api value) { - if (apisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApisIsMutable(); - apis_.add(index, value); - onChanged(); - } else { - apisBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public Builder addApis( - com.google.cloud.apigeeregistry.v1.Api.Builder builderForValue) { - if (apisBuilder_ == null) { - ensureApisIsMutable(); - apis_.add(builderForValue.build()); - onChanged(); - } else { - apisBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public Builder addApis( - int index, com.google.cloud.apigeeregistry.v1.Api.Builder builderForValue) { - if (apisBuilder_ == null) { - ensureApisIsMutable(); - apis_.add(index, builderForValue.build()); - onChanged(); - } else { - apisBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public Builder addAllApis( - java.lang.Iterable values) { - if (apisBuilder_ == null) { - ensureApisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, apis_); - onChanged(); - } else { - apisBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public Builder clearApis() { - if (apisBuilder_ == null) { - apis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - apisBuilder_.clear(); - } - return this; - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public Builder removeApis(int index) { - if (apisBuilder_ == null) { - ensureApisIsMutable(); - apis_.remove(index); - onChanged(); - } else { - apisBuilder_.remove(index); - } - return this; - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public com.google.cloud.apigeeregistry.v1.Api.Builder getApisBuilder( - int index) { - return getApisFieldBuilder().getBuilder(index); - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApisOrBuilder( - int index) { - if (apisBuilder_ == null) { - return apis_.get(index); } else { - return apisBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public java.util.List - getApisOrBuilderList() { - if (apisBuilder_ != null) { - return apisBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(apis_); - } - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public com.google.cloud.apigeeregistry.v1.Api.Builder addApisBuilder() { - return getApisFieldBuilder().addBuilder( - com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance()); - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public com.google.cloud.apigeeregistry.v1.Api.Builder addApisBuilder( - int index) { - return getApisFieldBuilder().addBuilder( - index, com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance()); - } - /** - *
-     * The APIs from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - public java.util.List - getApisBuilderList() { - return getApisFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> - getApisFieldBuilder() { - if (apisBuilder_ == null) { - apisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder>( - apis_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - apis_ = null; - } - return apisBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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, which can be sent as `page_token` to retrieve the next page.
-     * If 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, which can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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(); - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListApisResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListApisResponse) - private static final com.google.cloud.apigeeregistry.v1.ListApisResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListApisResponse(); - } - - public static com.google.cloud.apigeeregistry.v1.ListApisResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApisResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApisResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListApisResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponseOrBuilder.java deleted file mode 100644 index 2d531a5768e2..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListApisResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListApisResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListApisResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The APIs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - java.util.List - getApisList(); - /** - *
-   * The APIs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - com.google.cloud.apigeeregistry.v1.Api getApis(int index); - /** - *
-   * The APIs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - int getApisCount(); - /** - *
-   * The APIs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - java.util.List - getApisOrBuilderList(); - /** - *
-   * The APIs from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Api apis = 1; - */ - com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApisOrBuilder( - int index); - - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequest.java deleted file mode 100644 index 481e53604fa8..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequest.java +++ /dev/null @@ -1,1054 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for ListArtifacts.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListArtifactsRequest} - */ -public final class ListArtifactsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListArtifactsRequest) - ListArtifactsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListArtifactsRequest.newBuilder() to construct. - private ListArtifactsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListArtifactsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListArtifactsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListArtifactsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.class, com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent, which owns this collection of artifacts.
-   * Format: `{parent}`
-   * 
- * - * 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 artifacts.
-   * Format: `{parent}`
-   * 
- * - * 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_; - /** - *
-   * The maximum number of artifacts to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 50 values will be returned.
-   * The maximum is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * A page token, received from a previous `ListArtifacts` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListArtifacts` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-   * A page token, received from a previous `ListArtifacts` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListArtifacts` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @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 FILTER_FIELD_NUMBER = 4; - private volatile java.lang.Object filter_; - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields except contents.
-   * 
- * - * string filter = 4; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields except contents.
-   * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListArtifactsRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListArtifactsRequest other = (com.google.cloud.apigeeregistry.v1.ListArtifactsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + 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) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest 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.apigeeregistry.v1.ListArtifactsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest 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.apigeeregistry.v1.ListArtifactsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListArtifactsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ListArtifacts.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListArtifactsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListArtifactsRequest) - com.google.cloud.apigeeregistry.v1.ListArtifactsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.class, com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListArtifactsRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListArtifactsRequest build() { - com.google.cloud.apigeeregistry.v1.ListArtifactsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListArtifactsRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.ListArtifactsRequest result = new com.google.cloud.apigeeregistry.v1.ListArtifactsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.filter_ = filter_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListArtifactsRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListArtifactsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListArtifactsRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.ListArtifactsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListArtifactsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListArtifactsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent, which owns this collection of artifacts.
-     * Format: `{parent}`
-     * 
- * - * 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 artifacts.
-     * Format: `{parent}`
-     * 
- * - * 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 artifacts.
-     * Format: `{parent}`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of artifacts.
-     * Format: `{parent}`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent, which owns this collection of artifacts.
-     * Format: `{parent}`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of artifacts to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of artifacts to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of artifacts to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 50 values will be returned.
-     * The maximum is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * A page token, received from a previous `ListArtifacts` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListArtifacts` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * A page token, received from a previous `ListArtifacts` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListArtifacts` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @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; - } - } - /** - *
-     * A page token, received from a previous `ListArtifacts` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListArtifacts` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * A page token, received from a previous `ListArtifacts` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListArtifacts` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * A page token, received from a previous `ListArtifacts` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListArtifacts` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields except contents.
-     * 
- * - * string filter = 4; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields except contents.
-     * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields except contents.
-     * 
- * - * string filter = 4; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields except contents.
-     * 
- * - * string filter = 4; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * An expression that can be used to filter the list. Filters use the Common
-     * Expression Language and can refer to all message fields except contents.
-     * 
- * - * string filter = 4; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListArtifactsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListArtifactsRequest) - private static final com.google.cloud.apigeeregistry.v1.ListArtifactsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListArtifactsRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.ListArtifactsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListArtifactsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListArtifactsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListArtifactsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequestOrBuilder.java deleted file mode 100644 index 111dbbb9a126..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsRequestOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListArtifactsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListArtifactsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent, which owns this collection of artifacts.
-   * Format: `{parent}`
-   * 
- * - * 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 artifacts.
-   * Format: `{parent}`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of artifacts to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 50 values will be returned.
-   * The maximum is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * A page token, received from a previous `ListArtifacts` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListArtifacts` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * A page token, received from a previous `ListArtifacts` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListArtifacts` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields except contents.
-   * 
- * - * string filter = 4; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * An expression that can be used to filter the list. Filters use the Common
-   * Expression Language and can refer to all message fields except contents.
-   * 
- * - * string filter = 4; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponse.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponse.java deleted file mode 100644 index 49972c4d6a10..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Response message for ListArtifacts.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListArtifactsResponse} - */ -public final class ListArtifactsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ListArtifactsResponse) - ListArtifactsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListArtifactsResponse.newBuilder() to construct. - private ListArtifactsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListArtifactsResponse() { - artifacts_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListArtifactsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListArtifactsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - artifacts_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - artifacts_.add( - input.readMessage(com.google.cloud.apigeeregistry.v1.Artifact.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - artifacts_ = java.util.Collections.unmodifiableList(artifacts_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.class, com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.Builder.class); - } - - public static final int ARTIFACTS_FIELD_NUMBER = 1; - private java.util.List artifacts_; - /** - *
-   * The artifacts from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - @java.lang.Override - public java.util.List getArtifactsList() { - return artifacts_; - } - /** - *
-   * The artifacts from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - @java.lang.Override - public java.util.List - getArtifactsOrBuilderList() { - return artifacts_; - } - /** - *
-   * The artifacts from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - @java.lang.Override - public int getArtifactsCount() { - return artifacts_.size(); - } - /** - *
-   * The artifacts from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Artifact getArtifacts(int index) { - return artifacts_.get(index); - } - /** - *
-   * The artifacts from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactsOrBuilder( - int index) { - return artifacts_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If 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, which can be sent as `page_token` to retrieve the next page.
-   * If 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 < artifacts_.size(); i++) { - output.writeMessage(1, artifacts_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < artifacts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, artifacts_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ListArtifactsResponse)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ListArtifactsResponse other = (com.google.cloud.apigeeregistry.v1.ListArtifactsResponse) obj; - - if (!getArtifactsList() - .equals(other.getArtifactsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getArtifactsCount() > 0) { - hash = (37 * hash) + ARTIFACTS_FIELD_NUMBER; - hash = (53 * hash) + getArtifactsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse 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.apigeeregistry.v1.ListArtifactsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse 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.apigeeregistry.v1.ListArtifactsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ListArtifactsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for ListArtifacts.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ListArtifactsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ListArtifactsResponse) - com.google.cloud.apigeeregistry.v1.ListArtifactsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.class, com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getArtifactsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (artifactsBuilder_ == null) { - artifacts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - artifactsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListArtifactsResponse getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListArtifactsResponse build() { - com.google.cloud.apigeeregistry.v1.ListArtifactsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListArtifactsResponse buildPartial() { - com.google.cloud.apigeeregistry.v1.ListArtifactsResponse result = new com.google.cloud.apigeeregistry.v1.ListArtifactsResponse(this); - int from_bitField0_ = bitField0_; - if (artifactsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - artifacts_ = java.util.Collections.unmodifiableList(artifacts_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.artifacts_ = artifacts_; - } else { - result.artifacts_ = artifactsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ListArtifactsResponse) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ListArtifactsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ListArtifactsResponse other) { - if (other == com.google.cloud.apigeeregistry.v1.ListArtifactsResponse.getDefaultInstance()) return this; - if (artifactsBuilder_ == null) { - if (!other.artifacts_.isEmpty()) { - if (artifacts_.isEmpty()) { - artifacts_ = other.artifacts_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureArtifactsIsMutable(); - artifacts_.addAll(other.artifacts_); - } - onChanged(); - } - } else { - if (!other.artifacts_.isEmpty()) { - if (artifactsBuilder_.isEmpty()) { - artifactsBuilder_.dispose(); - artifactsBuilder_ = null; - artifacts_ = other.artifacts_; - bitField0_ = (bitField0_ & ~0x00000001); - artifactsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getArtifactsFieldBuilder() : null; - } else { - artifactsBuilder_.addAllMessages(other.artifacts_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ListArtifactsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ListArtifactsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List artifacts_ = - java.util.Collections.emptyList(); - private void ensureArtifactsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - artifacts_ = new java.util.ArrayList(artifacts_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> artifactsBuilder_; - - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public java.util.List getArtifactsList() { - if (artifactsBuilder_ == null) { - return java.util.Collections.unmodifiableList(artifacts_); - } else { - return artifactsBuilder_.getMessageList(); - } - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public int getArtifactsCount() { - if (artifactsBuilder_ == null) { - return artifacts_.size(); - } else { - return artifactsBuilder_.getCount(); - } - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public com.google.cloud.apigeeregistry.v1.Artifact getArtifacts(int index) { - if (artifactsBuilder_ == null) { - return artifacts_.get(index); - } else { - return artifactsBuilder_.getMessage(index); - } - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public Builder setArtifacts( - int index, com.google.cloud.apigeeregistry.v1.Artifact value) { - if (artifactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureArtifactsIsMutable(); - artifacts_.set(index, value); - onChanged(); - } else { - artifactsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public Builder setArtifacts( - int index, com.google.cloud.apigeeregistry.v1.Artifact.Builder builderForValue) { - if (artifactsBuilder_ == null) { - ensureArtifactsIsMutable(); - artifacts_.set(index, builderForValue.build()); - onChanged(); - } else { - artifactsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public Builder addArtifacts(com.google.cloud.apigeeregistry.v1.Artifact value) { - if (artifactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureArtifactsIsMutable(); - artifacts_.add(value); - onChanged(); - } else { - artifactsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public Builder addArtifacts( - int index, com.google.cloud.apigeeregistry.v1.Artifact value) { - if (artifactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureArtifactsIsMutable(); - artifacts_.add(index, value); - onChanged(); - } else { - artifactsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public Builder addArtifacts( - com.google.cloud.apigeeregistry.v1.Artifact.Builder builderForValue) { - if (artifactsBuilder_ == null) { - ensureArtifactsIsMutable(); - artifacts_.add(builderForValue.build()); - onChanged(); - } else { - artifactsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public Builder addArtifacts( - int index, com.google.cloud.apigeeregistry.v1.Artifact.Builder builderForValue) { - if (artifactsBuilder_ == null) { - ensureArtifactsIsMutable(); - artifacts_.add(index, builderForValue.build()); - onChanged(); - } else { - artifactsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public Builder addAllArtifacts( - java.lang.Iterable values) { - if (artifactsBuilder_ == null) { - ensureArtifactsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, artifacts_); - onChanged(); - } else { - artifactsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public Builder clearArtifacts() { - if (artifactsBuilder_ == null) { - artifacts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - artifactsBuilder_.clear(); - } - return this; - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public Builder removeArtifacts(int index) { - if (artifactsBuilder_ == null) { - ensureArtifactsIsMutable(); - artifacts_.remove(index); - onChanged(); - } else { - artifactsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public com.google.cloud.apigeeregistry.v1.Artifact.Builder getArtifactsBuilder( - int index) { - return getArtifactsFieldBuilder().getBuilder(index); - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactsOrBuilder( - int index) { - if (artifactsBuilder_ == null) { - return artifacts_.get(index); } else { - return artifactsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public java.util.List - getArtifactsOrBuilderList() { - if (artifactsBuilder_ != null) { - return artifactsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(artifacts_); - } - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public com.google.cloud.apigeeregistry.v1.Artifact.Builder addArtifactsBuilder() { - return getArtifactsFieldBuilder().addBuilder( - com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance()); - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public com.google.cloud.apigeeregistry.v1.Artifact.Builder addArtifactsBuilder( - int index) { - return getArtifactsFieldBuilder().addBuilder( - index, com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance()); - } - /** - *
-     * The artifacts from the specified publisher.
-     * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - public java.util.List - getArtifactsBuilderList() { - return getArtifactsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> - getArtifactsFieldBuilder() { - if (artifactsBuilder_ == null) { - artifactsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder>( - artifacts_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - artifacts_ = null; - } - return artifactsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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, which can be sent as `page_token` to retrieve the next page.
-     * If 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, which can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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(); - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If 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; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ListArtifactsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ListArtifactsResponse) - private static final com.google.cloud.apigeeregistry.v1.ListArtifactsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ListArtifactsResponse(); - } - - public static com.google.cloud.apigeeregistry.v1.ListArtifactsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListArtifactsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListArtifactsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ListArtifactsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponseOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponseOrBuilder.java deleted file mode 100644 index 6e158639a9a8..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ListArtifactsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ListArtifactsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ListArtifactsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The artifacts from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - java.util.List - getArtifactsList(); - /** - *
-   * The artifacts from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - com.google.cloud.apigeeregistry.v1.Artifact getArtifacts(int index); - /** - *
-   * The artifacts from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - int getArtifactsCount(); - /** - *
-   * The artifacts from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - java.util.List - getArtifactsOrBuilderList(); - /** - *
-   * The artifacts from the specified publisher.
-   * 
- * - * repeated .google.cloud.apigeeregistry.v1.Artifact artifacts = 1; - */ - com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactsOrBuilder( - int index); - - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If 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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/LocationName.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/LocationName.java deleted file mode 100644 index 4c3cc35bc06e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/LocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.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; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@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 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 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(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/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadata.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadata.java deleted file mode 100644 index 26d783d1a263..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadata.java +++ /dev/null @@ -1,1658 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Represents the metadata of the long-running operation.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.OperationMetadata} - */ -public final class OperationMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.OperationMetadata) - OperationMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OperationMetadata() { - target_ = ""; - verb_ = ""; - statusMessage_ = ""; - apiVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - verb_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - statusMessage_ = s; - break; - } - case 48: { - - cancellationRequested_ = input.readBool(); - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - apiVersion_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.OperationMetadata.class, com.google.cloud.apigeeregistry.v1.OperationMetadata.Builder.class); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - public static final int TARGET_FIELD_NUMBER = 3; - private volatile java.lang.Object target_; - /** - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * @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; - } - } - /** - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * @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; - private volatile java.lang.Object verb_; - /** - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * @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; - } - } - /** - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * @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; - private volatile java.lang.Object statusMessage_; - /** - *
-   * Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5; - * @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; - } - } - /** - *
-   * Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5; - * @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 CANCELLATION_REQUESTED_FIELD_NUMBER = 6; - private boolean cancellationRequested_; - /** - *
-   * Identifies whether the user has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-   * corresponding to `Code.CANCELLED`.
-   * 
- * - * bool cancellation_requested = 6; - * @return The cancellationRequested. - */ - @java.lang.Override - public boolean getCancellationRequested() { - return cancellationRequested_; - } - - public static final int API_VERSION_FIELD_NUMBER = 7; - private volatile java.lang.Object apiVersion_; - /** - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 7; - * @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; - } - } - /** - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 7; - * @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 (createTime_ != null) { - output.writeMessage(1, getCreateTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); - } - if (cancellationRequested_ != false) { - output.writeBool(6, cancellationRequested_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getCreateTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); - } - if (cancellationRequested_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, cancellationRequested_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.OperationMetadata other = (com.google.cloud.apigeeregistry.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 (getCancellationRequested() - != other.getCancellationRequested()) return false; - if (!getApiVersion() - .equals(other.getApiVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (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) + CANCELLATION_REQUESTED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getCancellationRequested()); - hash = (37 * hash) + API_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getApiVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.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.apigeeregistry.v1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.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.apigeeregistry.v1.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.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.apigeeregistry.v1.OperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.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.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Represents the metadata of the long-running operation.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.OperationMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.OperationMetadata) - com.google.cloud.apigeeregistry.v1.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.OperationMetadata.class, com.google.cloud.apigeeregistry.v1.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.OperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - target_ = ""; - - verb_ = ""; - - statusMessage_ = ""; - - cancellationRequested_ = false; - - apiVersion_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.ProvisioningServiceProto.internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.OperationMetadata build() { - com.google.cloud.apigeeregistry.v1.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.OperationMetadata buildPartial() { - com.google.cloud.apigeeregistry.v1.OperationMetadata result = new com.google.cloud.apigeeregistry.v1.OperationMetadata(this); - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - result.target_ = target_; - result.verb_ = verb_; - result.statusMessage_ = statusMessage_; - result.cancellationRequested_ = cancellationRequested_; - result.apiVersion_ = apiVersion_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.OperationMetadata) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.OperationMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.OperationMetadata other) { - if (other == com.google.cloud.apigeeregistry.v1.OperationMetadata.getDefaultInstance()) return this; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getTarget().isEmpty()) { - target_ = other.target_; - onChanged(); - } - if (!other.getVerb().isEmpty()) { - verb_ = other.verb_; - onChanged(); - } - if (!other.getStatusMessage().isEmpty()) { - statusMessage_ = other.statusMessage_; - onChanged(); - } - if (other.getCancellationRequested() != false) { - setCancellationRequested(other.getCancellationRequested()); - } - if (!other.getApiVersion().isEmpty()) { - apiVersion_ = other.apiVersion_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.OperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.OperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - * @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(); - } - } - /** - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @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(); - } - } - /** - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private java.lang.Object target_ = ""; - /** - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * @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; - } - } - /** - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * @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; - } - } - /** - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * @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; - onChanged(); - return this; - } - /** - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * @return This builder for chaining. - */ - public Builder clearTarget() { - - target_ = getDefaultInstance().getTarget(); - onChanged(); - return this; - } - /** - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * @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; - onChanged(); - return this; - } - - private java.lang.Object verb_ = ""; - /** - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * @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; - } - } - /** - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * @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; - } - } - /** - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * @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; - onChanged(); - return this; - } - /** - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * @return This builder for chaining. - */ - public Builder clearVerb() { - - verb_ = getDefaultInstance().getVerb(); - onChanged(); - return this; - } - /** - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * @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; - onChanged(); - return this; - } - - private java.lang.Object statusMessage_ = ""; - /** - *
-     * Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5; - * @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; - } - } - /** - *
-     * Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5; - * @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; - } - } - /** - *
-     * Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5; - * @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; - onChanged(); - return this; - } - /** - *
-     * Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5; - * @return This builder for chaining. - */ - public Builder clearStatusMessage() { - - statusMessage_ = getDefaultInstance().getStatusMessage(); - onChanged(); - return this; - } - /** - *
-     * Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5; - * @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; - onChanged(); - return this; - } - - private boolean cancellationRequested_ ; - /** - *
-     * Identifies whether the user has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool cancellation_requested = 6; - * @return The cancellationRequested. - */ - @java.lang.Override - public boolean getCancellationRequested() { - return cancellationRequested_; - } - /** - *
-     * Identifies whether the user has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool cancellation_requested = 6; - * @param value The cancellationRequested to set. - * @return This builder for chaining. - */ - public Builder setCancellationRequested(boolean value) { - - cancellationRequested_ = value; - onChanged(); - return this; - } - /** - *
-     * Identifies whether the user has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool cancellation_requested = 6; - * @return This builder for chaining. - */ - public Builder clearCancellationRequested() { - - cancellationRequested_ = false; - onChanged(); - return this; - } - - private java.lang.Object apiVersion_ = ""; - /** - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 7; - * @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; - } - } - /** - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 7; - * @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; - } - } - /** - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 7; - * @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; - onChanged(); - return this; - } - /** - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 7; - * @return This builder for chaining. - */ - public Builder clearApiVersion() { - - apiVersion_ = getDefaultInstance().getApiVersion(); - onChanged(); - return this; - } - /** - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 7; - * @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; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.OperationMetadata) - private static final com.google.cloud.apigeeregistry.v1.OperationMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.OperationMetadata(); - } - - public static com.google.cloud.apigeeregistry.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 { - return new OperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadataOrBuilder.java deleted file mode 100644 index 6c8392780a0d..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,156 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface OperationMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * @return The target. - */ - java.lang.String getTarget(); - /** - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * @return The bytes for target. - */ - com.google.protobuf.ByteString - getTargetBytes(); - - /** - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * @return The verb. - */ - java.lang.String getVerb(); - /** - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * @return The bytes for verb. - */ - com.google.protobuf.ByteString - getVerbBytes(); - - /** - *
-   * Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5; - * @return The statusMessage. - */ - java.lang.String getStatusMessage(); - /** - *
-   * Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5; - * @return The bytes for statusMessage. - */ - com.google.protobuf.ByteString - getStatusMessageBytes(); - - /** - *
-   * Identifies whether the user has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-   * corresponding to `Code.CANCELLED`.
-   * 
- * - * bool cancellation_requested = 6; - * @return The cancellationRequested. - */ - boolean getCancellationRequested(); - - /** - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 7; - * @return The apiVersion. - */ - java.lang.String getApiVersion(); - /** - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 7; - * @return The bytes for apiVersion. - */ - com.google.protobuf.ByteString - getApiVersionBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningServiceProto.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningServiceProto.java deleted file mode 100644 index f5117eb9a12c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ProvisioningServiceProto.java +++ /dev/null @@ -1,184 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public final class ProvisioningServiceProto { - private ProvisioningServiceProto() {} - 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_apigeeregistry_v1_CreateInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_apigeeregistry_v1_CreateInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_apigeeregistry_v1_DeleteInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_apigeeregistry_v1_GetInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_apigeeregistry_v1_OperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_apigeeregistry_v1_Instance_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_apigeeregistry_v1_Instance_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_apigeeregistry_v1_Instance_Config_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_apigeeregistry_v1_Instance_Config_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n9google/cloud/apigeeregistry/v1/provisi" + - "oning_service.proto\022\036google.cloud.apigee" + - "registry.v1\032\034google/api/annotations.prot" + - "o\032\027google/api/client.proto\032\037google/api/f" + - "ield_behavior.proto\032\031google/api/resource" + - ".proto\032#google/longrunning/operations.pr" + - "oto\032\037google/protobuf/timestamp.proto\"\255\001\n" + - "\025CreateInstanceRequest\0229\n\006parent\030\001 \001(\tB)" + - "\340A\002\372A#\n!locations.googleapis.com/Locatio" + - "n\022\030\n\013instance_id\030\002 \001(\tB\003\340A\002\022?\n\010instance\030" + - "\003 \001(\0132(.google.cloud.apigeeregistry.v1.I" + - "nstanceB\003\340A\002\"U\n\025DeleteInstanceRequest\022<\n" + - "\004name\030\001 \001(\tB.\340A\002\372A(\n&apigeeregistry.goog" + - "leapis.com/Instance\"R\n\022GetInstanceReques" + - "t\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&apigeeregistry." + - "googleapis.com/Instance\"\335\001\n\021OperationMet" + - "adata\022/\n\013create_time\030\001 \001(\0132\032.google.prot" + - "obuf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.googl" + - "e.protobuf.Timestamp\022\016\n\006target\030\003 \001(\t\022\014\n\004" + - "verb\030\004 \001(\t\022\026\n\016status_message\030\005 \001(\t\022\036\n\026ca" + - "ncellation_requested\030\006 \001(\010\022\023\n\013api_versio" + - "n\030\007 \001(\t\"\302\004\n\010Instance\022\014\n\004name\030\001 \001(\t\0224\n\013cr" + - "eate_time\030\002 \001(\0132\032.google.protobuf.Timest" + - "ampB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.google.p" + - "rotobuf.TimestampB\003\340A\003\022B\n\005state\030\004 \001(\0162.." + - "google.cloud.apigeeregistry.v1.Instance." + - "StateB\003\340A\003\022\032\n\rstate_message\030\005 \001(\tB\003\340A\003\022D" + - "\n\006config\030\006 \001(\0132/.google.cloud.apigeeregi" + - "stry.v1.Instance.ConfigB\003\340A\002\032;\n\006Config\022\025" + - "\n\010location\030\001 \001(\tB\003\340A\003\022\032\n\rcmek_key_name\030\002" + - " \001(\tB\003\340A\002\"n\n\005State\022\025\n\021STATE_UNSPECIFIED\020" + - "\000\022\014\n\010INACTIVE\020\001\022\014\n\010CREATING\020\002\022\n\n\006ACTIVE\020" + - "\003\022\014\n\010UPDATING\020\004\022\014\n\010DELETING\020\005\022\n\n\006FAILED\020" + - "\006:i\352Af\n&apigeeregistry.googleapis.com/In" + - "stance\022.google.cloud.apige" + - "eregistry.v1.ApiDeployment.AnnotationsEn" + - "try\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + - "\030\002 \001(\t:\0028\001\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 " + - "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:}\352Az\n+apigeeregis" + - "try.googleapis.com/ApiDeployment\022Kprojec" + - "ts/{project}/locations/{location}/apis/{" + - "api}/deployments/{deployment}\"\267\005\n\010Artifa" + - "ct\022\014\n\004name\030\001 \001(\t\0224\n\013create_time\030\002 \001(\0132\032." + - "google.protobuf.TimestampB\003\340A\003\0224\n\013update" + - "_time\030\003 \001(\0132\032.google.protobuf.TimestampB" + - "\003\340A\003\022\021\n\tmime_type\030\004 \001(\t\022\027\n\nsize_bytes\030\005 " + - "\001(\005B\003\340A\003\022\021\n\004hash\030\006 \001(\tB\003\340A\003\022\025\n\010contents\030" + - "\007 \001(\014B\003\340A\004:\332\003\352A\326\003\n&apigeeregistry.google" + - "apis.com/Artifact\022\n\004name\030\001 \001(\tB0\340A\002\372A*\n(" + - "apigeeregistry.googleapis.com/ApiVersion" + - "\"\276\001\n\027CreateApiVersionRequest\022@\n\006parent\030\001" + - " \001(\tB0\340A\002\372A*\022(apigeeregistry.googleapis." + - "com/ApiVersion\022D\n\013api_version\030\002 \001(\0132*.go" + - "ogle.cloud.apigeeregistry.v1.ApiVersionB" + - "\003\340A\002\022\033\n\016api_version_id\030\003 \001(\tB\003\340A\002\"\247\001\n\027Up" + - "dateApiVersionRequest\022D\n\013api_version\030\001 \001" + - "(\0132*.google.cloud.apigeeregistry.v1.ApiV" + - "ersionB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.googl" + - "e.protobuf.FieldMask\022\025\n\rallow_missing\030\003 " + - "\001(\010\"h\n\027DeleteApiVersionRequest\022>\n\004name\030\001" + - " \001(\tB0\340A\002\372A*\n(apigeeregistry.googleapis." + - "com/ApiVersion\022\r\n\005force\030\002 \001(\010\"\213\001\n\023ListAp" + - "iSpecsRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\022%a" + - "pigeeregistry.googleapis.com/ApiSpec\022\021\n\t" + - "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006f" + - "ilter\030\004 \001(\t\"k\n\024ListApiSpecsResponse\022:\n\ta" + - "pi_specs\030\001 \003(\0132\'.google.cloud.apigeeregi" + - "stry.v1.ApiSpec\022\027\n\017next_page_token\030\002 \001(\t" + - "\"P\n\021GetApiSpecRequest\022;\n\004name\030\001 \001(\tB-\340A\002" + - "\372A\'\n%apigeeregistry.googleapis.com/ApiSp" + - "ec\"X\n\031GetApiSpecContentsRequest\022;\n\004name\030" + - "\001 \001(\tB-\340A\002\372A\'\n%apigeeregistry.googleapis" + - ".com/ApiSpec\"\257\001\n\024CreateApiSpecRequest\022=\n" + - "\006parent\030\001 \001(\tB-\340A\002\372A\'\022%apigeeregistry.go" + - "ogleapis.com/ApiSpec\022>\n\010api_spec\030\002 \001(\0132\'" + - ".google.cloud.apigeeregistry.v1.ApiSpecB" + - "\003\340A\002\022\030\n\013api_spec_id\030\003 \001(\tB\003\340A\002\"\236\001\n\024Updat" + - "eApiSpecRequest\022>\n\010api_spec\030\001 \001(\0132\'.goog" + - "le.cloud.apigeeregistry.v1.ApiSpecB\003\340A\002\022" + - "/\n\013update_mask\030\002 \001(\0132\032.google.protobuf.F" + - "ieldMask\022\025\n\rallow_missing\030\003 \001(\010\"b\n\024Delet" + - "eApiSpecRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%a" + - "pigeeregistry.googleapis.com/ApiSpec\022\r\n\005" + - "force\030\002 \001(\010\"j\n\031TagApiSpecRevisionRequest" + - "\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%apigeeregistry.g" + - "oogleapis.com/ApiSpec\022\020\n\003tag\030\002 \001(\tB\003\340A\002\"" + - "\201\001\n\033ListApiSpecRevisionsRequest\022;\n\004name\030" + - "\001 \001(\tB-\340A\002\372A\'\n%apigeeregistry.googleapis" + - ".com/ApiSpec\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" + - "token\030\003 \001(\t\"s\n\034ListApiSpecRevisionsRespo" + - "nse\022:\n\tapi_specs\030\001 \003(\0132\'.google.cloud.ap" + - "igeeregistry.v1.ApiSpec\022\027\n\017next_page_tok" + - "en\030\002 \001(\t\"o\n\026RollbackApiSpecRequest\022;\n\004na" + - "me\030\001 \001(\tB-\340A\002\372A\'\n%apigeeregistry.googlea" + - "pis.com/ApiSpec\022\030\n\013revision_id\030\002 \001(\tB\003\340A" + - "\002\"[\n\034DeleteApiSpecRevisionRequest\022;\n\004nam" + - "e\030\001 \001(\tB-\340A\002\372A\'\n%apigeeregistry.googleap" + - "is.com/ApiSpec\"\227\001\n\031ListApiDeploymentsReq" + - "uest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\022+apigeeregi" + - "stry.googleapis.com/ApiDeployment\022\021\n\tpag" + - "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filt" + - "er\030\004 \001(\t\"}\n\032ListApiDeploymentsResponse\022F" + - "\n\017api_deployments\030\001 \003(\0132-.google.cloud.a" + - "pigeeregistry.v1.ApiDeployment\022\027\n\017next_p" + - "age_token\030\002 \001(\t\"\\\n\027GetApiDeploymentReque" + - "st\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apigeeregistry" + - ".googleapis.com/ApiDeployment\"\315\001\n\032Create" + - "ApiDeploymentRequest\022C\n\006parent\030\001 \001(\tB3\340A" + - "\002\372A-\022+apigeeregistry.googleapis.com/ApiD" + - "eployment\022J\n\016api_deployment\030\002 \001(\0132-.goog" + - "le.cloud.apigeeregistry.v1.ApiDeployment" + - "B\003\340A\002\022\036\n\021api_deployment_id\030\003 \001(\tB\003\340A\002\"\260\001" + - "\n\032UpdateApiDeploymentRequest\022J\n\016api_depl" + - "oyment\030\001 \001(\0132-.google.cloud.apigeeregist" + - "ry.v1.ApiDeploymentB\003\340A\002\022/\n\013update_mask\030" + - "\002 \001(\0132\032.google.protobuf.FieldMask\022\025\n\rall" + - "ow_missing\030\003 \001(\010\"n\n\032DeleteApiDeploymentR" + - "equest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apigeeregi" + - "stry.googleapis.com/ApiDeployment\022\r\n\005for" + - "ce\030\002 \001(\010\"v\n\037TagApiDeploymentRevisionRequ" + - "est\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apigeeregistr" + - "y.googleapis.com/ApiDeployment\022\020\n\003tag\030\002 " + - "\001(\tB\003\340A\002\"\215\001\n!ListApiDeploymentRevisionsR" + - "equest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apigeeregi" + - "stry.googleapis.com/ApiDeployment\022\021\n\tpag" + - "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\205\001\n\"Lis" + - "tApiDeploymentRevisionsResponse\022F\n\017api_d" + - "eployments\030\001 \003(\0132-.google.cloud.apigeere" + - "gistry.v1.ApiDeployment\022\027\n\017next_page_tok" + - "en\030\002 \001(\t\"{\n\034RollbackApiDeploymentRequest" + - "\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apigeeregistry.g" + - "oogleapis.com/ApiDeployment\022\030\n\013revision_" + - "id\030\002 \001(\tB\003\340A\002\"g\n\"DeleteApiDeploymentRevi" + - "sionRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+apige" + - "eregistry.googleapis.com/ApiDeployment\"\215" + - "\001\n\024ListArtifactsRequest\022>\n\006parent\030\001 \001(\tB" + - ".\340A\002\372A(\022&apigeeregistry.googleapis.com/A" + - "rtifact\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + - "\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"m\n\025ListArtifactsR" + - "esponse\022;\n\tartifacts\030\001 \003(\0132(.google.clou" + - "d.apigeeregistry.v1.Artifact\022\027\n\017next_pag" + - "e_token\030\002 \001(\t\"R\n\022GetArtifactRequest\022<\n\004n" + - "ame\030\001 \001(\tB.\340A\002\372A(\n&apigeeregistry.google" + - "apis.com/Artifact\"Z\n\032GetArtifactContents" + - "Request\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&apigeereg" + - "istry.googleapis.com/Artifact\"\262\001\n\025Create" + - "ArtifactRequest\022>\n\006parent\030\001 \001(\tB.\340A\002\372A(\022" + - "&apigeeregistry.googleapis.com/Artifact\022" + - "?\n\010artifact\030\002 \001(\0132(.google.cloud.apigeer" + - "egistry.v1.ArtifactB\003\340A\002\022\030\n\013artifact_id\030" + - "\003 \001(\tB\003\340A\002\"Y\n\026ReplaceArtifactRequest\022?\n\010" + - "artifact\030\001 \001(\0132(.google.cloud.apigeeregi" + - "stry.v1.ArtifactB\003\340A\002\"U\n\025DeleteArtifactR" + - "equest\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&apigeeregi" + - "stry.googleapis.com/Artifact2\300E\n\010Registr" + - "y\022\250\001\n\010ListApis\022/.google.cloud.apigeeregi" + - "stry.v1.ListApisRequest\0320.google.cloud.a" + - "pigeeregistry.v1.ListApisResponse\"9\202\323\344\223\002" + - "*\022(/v1/{parent=projects/*/locations/*}/a" + - "pis\332A\006parent\022\225\001\n\006GetApi\022-.google.cloud.a" + - "pigeeregistry.v1.GetApiRequest\032#.google." + - "cloud.apigeeregistry.v1.Api\"7\202\323\344\223\002*\022(/v1" + - "/{name=projects/*/locations/*/apis/*}\332A\004" + - "name\022\255\001\n\tCreateApi\0220.google.cloud.apigee" + - "registry.v1.CreateApiRequest\032#.google.cl" + - "oud.apigeeregistry.v1.Api\"I\202\323\344\223\002/\"(/v1/{" + - "parent=projects/*/locations/*}/apis:\003api" + - "\332A\021parent,api,api_id\022\257\001\n\tUpdateApi\0220.goo" + - "gle.cloud.apigeeregistry.v1.UpdateApiReq" + - "uest\032#.google.cloud.apigeeregistry.v1.Ap" + - "i\"K\202\323\344\223\00232,/v1/{api.name=projects/*/loca" + - "tions/*/apis/*}:\003api\332A\017api,update_mask\022\216" + - "\001\n\tDeleteApi\0220.google.cloud.apigeeregist" + - "ry.v1.DeleteApiRequest\032\026.google.protobuf" + - ".Empty\"7\202\323\344\223\002**(/v1/{name=projects/*/loc" + - "ations/*/apis/*}\332A\004name\022\310\001\n\017ListApiVersi" + - "ons\0226.google.cloud.apigeeregistry.v1.Lis" + - "tApiVersionsRequest\0327.google.cloud.apige" + - "eregistry.v1.ListApiVersionsResponse\"D\202\323" + - "\344\223\0025\0223/v1/{parent=projects/*/locations/*" + - "/apis/*}/versions\332A\006parent\022\265\001\n\rGetApiVer" + - "sion\0224.google.cloud.apigeeregistry.v1.Ge" + - "tApiVersionRequest\032*.google.cloud.apigee" + - "registry.v1.ApiVersion\"B\202\323\344\223\0025\0223/v1/{nam" + - "e=projects/*/locations/*/apis/*/versions" + - "/*}\332A\004name\022\345\001\n\020CreateApiVersion\0227.google" + - ".cloud.apigeeregistry.v1.CreateApiVersio" + - "nRequest\032*.google.cloud.apigeeregistry.v" + - "1.ApiVersion\"l\202\323\344\223\002B\"3/v1/{parent=projec" + - "ts/*/locations/*/apis/*}/versions:\013api_v" + - "ersion\332A!parent,api_version,api_version_" + - "id\022\347\001\n\020UpdateApiVersion\0227.google.cloud.a" + - "pigeeregistry.v1.UpdateApiVersionRequest" + - "\032*.google.cloud.apigeeregistry.v1.ApiVer" + - "sion\"n\202\323\344\223\002N2?/v1/{api_version.name=proj" + - "ects/*/locations/*/apis/*/versions/*}:\013a" + - "pi_version\332A\027api_version,update_mask\022\247\001\n" + - "\020DeleteApiVersion\0227.google.cloud.apigeer" + - "egistry.v1.DeleteApiVersionRequest\032\026.goo" + - "gle.protobuf.Empty\"B\202\323\344\223\0025*3/v1/{name=pr" + - "ojects/*/locations/*/apis/*/versions/*}\332" + - "A\004name\022\307\001\n\014ListApiSpecs\0223.google.cloud.a" + - "pigeeregistry.v1.ListApiSpecsRequest\0324.g" + - "oogle.cloud.apigeeregistry.v1.ListApiSpe" + - "csResponse\"L\202\323\344\223\002=\022;/v1/{parent=projects" + - "/*/locations/*/apis/*/versions/*}/specs\332" + - "A\006parent\022\264\001\n\nGetApiSpec\0221.google.cloud.a" + - "pigeeregistry.v1.GetApiSpecRequest\032\'.goo" + - "gle.cloud.apigeeregistry.v1.ApiSpec\"J\202\323\344" + - "\223\002=\022;/v1/{name=projects/*/locations/*/ap" + - "is/*/versions/*/specs/*}\332A\004name\022\275\001\n\022GetA" + - "piSpecContents\0229.google.cloud.apigeeregi" + - "stry.v1.GetApiSpecContentsRequest\032\024.goog" + - "le.api.HttpBody\"V\202\323\344\223\002I\022G/v1/{name=proje" + - "cts/*/locations/*/apis/*/versions/*/spec" + - "s/*}:getContents\332A\004name\022\333\001\n\rCreateApiSpe" + - "c\0224.google.cloud.apigeeregistry.v1.Creat" + - "eApiSpecRequest\032\'.google.cloud.apigeereg" + - "istry.v1.ApiSpec\"k\202\323\344\223\002G\";/v1/{parent=pr" + - "ojects/*/locations/*/apis/*/versions/*}/" + - "specs:\010api_spec\332A\033parent,api_spec,api_sp" + - "ec_id\022\335\001\n\rUpdateApiSpec\0224.google.cloud.a" + - "pigeeregistry.v1.UpdateApiSpecRequest\032\'." + - "google.cloud.apigeeregistry.v1.ApiSpec\"m" + - "\202\323\344\223\002P2D/v1/{api_spec.name=projects/*/lo" + - "cations/*/apis/*/versions/*/specs/*}:\010ap" + - "i_spec\332A\024api_spec,update_mask\022\251\001\n\rDelete" + - "ApiSpec\0224.google.cloud.apigeeregistry.v1" + - ".DeleteApiSpecRequest\032\026.google.protobuf." + - "Empty\"J\202\323\344\223\002=*;/v1/{name=projects/*/loca" + - "tions/*/apis/*/versions/*/specs/*}\332A\004nam" + - "e\022\314\001\n\022TagApiSpecRevision\0229.google.cloud." + - "apigeeregistry.v1.TagApiSpecRevisionRequ" + - "est\032\'.google.cloud.apigeeregistry.v1.Api" + - "Spec\"R\202\323\344\223\002L\"G/v1/{name=projects/*/locat" + - "ions/*/apis/*/versions/*/specs/*}:tagRev" + - "ision:\001*\022\344\001\n\024ListApiSpecRevisions\022;.goog" + - "le.cloud.apigeeregistry.v1.ListApiSpecRe" + - "visionsRequest\032<.google.cloud.apigeeregi" + - "stry.v1.ListApiSpecRevisionsResponse\"Q\202\323" + - "\344\223\002K\022I/v1/{name=projects/*/locations/*/a" + - "pis/*/versions/*/specs/*}:listRevisions\022" + - "\303\001\n\017RollbackApiSpec\0226.google.cloud.apige" + - "eregistry.v1.RollbackApiSpecRequest\032\'.go" + - "ogle.cloud.apigeeregistry.v1.ApiSpec\"O\202\323" + - "\344\223\002I\"D/v1/{name=projects/*/locations/*/a" + - "pis/*/versions/*/specs/*}:rollback:\001*\022\331\001" + - "\n\025DeleteApiSpecRevision\022<.google.cloud.a" + - "pigeeregistry.v1.DeleteApiSpecRevisionRe" + - "quest\032\'.google.cloud.apigeeregistry.v1.A" + - "piSpec\"Y\202\323\344\223\002L*J/v1/{name=projects/*/loc" + - "ations/*/apis/*/versions/*/specs/*}:dele" + - "teRevision\332A\004name\022\324\001\n\022ListApiDeployments" + - "\0229.google.cloud.apigeeregistry.v1.ListAp" + - "iDeploymentsRequest\032:.google.cloud.apige" + - "eregistry.v1.ListApiDeploymentsResponse\"" + - "G\202\323\344\223\0028\0226/v1/{parent=projects/*/location" + - "s/*/apis/*}/deployments\332A\006parent\022\301\001\n\020Get" + - "ApiDeployment\0227.google.cloud.apigeeregis" + - "try.v1.GetApiDeploymentRequest\032-.google." + - "cloud.apigeeregistry.v1.ApiDeployment\"E\202" + - "\323\344\223\0028\0226/v1/{name=projects/*/locations/*/" + - "apis/*/deployments/*}\332A\004name\022\372\001\n\023CreateA" + - "piDeployment\022:.google.cloud.apigeeregist" + - "ry.v1.CreateApiDeploymentRequest\032-.googl" + - "e.cloud.apigeeregistry.v1.ApiDeployment\"" + - "x\202\323\344\223\002H\"6/v1/{parent=projects/*/location" + - "s/*/apis/*}/deployments:\016api_deployment\332" + - "A\'parent,api_deployment,api_deployment_i" + - "d\022\374\001\n\023UpdateApiDeployment\022:.google.cloud" + - ".apigeeregistry.v1.UpdateApiDeploymentRe" + - "quest\032-.google.cloud.apigeeregistry.v1.A" + - "piDeployment\"z\202\323\344\223\002W2E/v1/{api_deploymen" + - "t.name=projects/*/locations/*/apis/*/dep" + - "loyments/*}:\016api_deployment\332A\032api_deploy" + - "ment,update_mask\022\260\001\n\023DeleteApiDeployment" + - "\022:.google.cloud.apigeeregistry.v1.Delete" + - "ApiDeploymentRequest\032\026.google.protobuf.E" + - "mpty\"E\202\323\344\223\0028*6/v1/{name=projects/*/locat" + - "ions/*/apis/*/deployments/*}\332A\004name\022\331\001\n\030" + - "TagApiDeploymentRevision\022?.google.cloud." + - "apigeeregistry.v1.TagApiDeploymentRevisi" + - "onRequest\032-.google.cloud.apigeeregistry." + - "v1.ApiDeployment\"M\202\323\344\223\002G\"B/v1/{name=proj" + - "ects/*/locations/*/apis/*/deployments/*}" + - ":tagRevision:\001*\022\361\001\n\032ListApiDeploymentRev" + - "isions\022A.google.cloud.apigeeregistry.v1." + - "ListApiDeploymentRevisionsRequest\032B.goog" + - "le.cloud.apigeeregistry.v1.ListApiDeploy" + - "mentRevisionsResponse\"L\202\323\344\223\002F\022D/v1/{name" + - "=projects/*/locations/*/apis/*/deploymen" + - "ts/*}:listRevisions\022\320\001\n\025RollbackApiDeplo" + - "yment\022<.google.cloud.apigeeregistry.v1.R" + - "ollbackApiDeploymentRequest\032-.google.clo" + - "ud.apigeeregistry.v1.ApiDeployment\"J\202\323\344\223" + - "\002D\"?/v1/{name=projects/*/locations/*/api" + - "s/*/deployments/*}:rollback:\001*\022\346\001\n\033Delet" + - "eApiDeploymentRevision\022B.google.cloud.ap" + - "igeeregistry.v1.DeleteApiDeploymentRevis" + - "ionRequest\032-.google.cloud.apigeeregistry" + - ".v1.ApiDeployment\"T\202\323\344\223\002G*E/v1/{name=pro" + - "jects/*/locations/*/apis/*/deployments/*" + - "}:deleteRevision\332A\004name\022\312\003\n\rListArtifact" + - "s\0224.google.cloud.apigeeregistry.v1.ListA" + - "rtifactsRequest\0325.google.cloud.apigeereg" + - "istry.v1.ListArtifactsResponse\"\313\002\202\323\344\223\002\273\002" + - "\022-/v1/{parent=projects/*/locations/*}/ar" + - "tifactsZ6\0224/v1/{parent=projects/*/locati" + - "ons/*/apis/*}/artifactsZA\022?/v1/{parent=p" + - "rojects/*/locations/*/apis/*/versions/*}" + - "/artifactsZI\022G/v1/{parent=projects/*/loc" + - "ations/*/apis/*/versions/*/specs/*}/arti" + - "factsZD\022B/v1/{parent=projects/*/location" + - "s/*/apis/*/deployments/*}/artifacts\332A\006pa" + - "rent\022\267\003\n\013GetArtifact\0222.google.cloud.apig" + - "eeregistry.v1.GetArtifactRequest\032(.googl" + - "e.cloud.apigeeregistry.v1.Artifact\"\311\002\202\323\344" + - "\223\002\273\002\022-/v1/{name=projects/*/locations/*/a" + - "rtifacts/*}Z6\0224/v1/{name=projects/*/loca" + - "tions/*/apis/*/artifacts/*}ZA\022?/v1/{name" + - "=projects/*/locations/*/apis/*/versions/" + - "*/artifacts/*}ZI\022G/v1/{name=projects/*/l" + - "ocations/*/apis/*/versions/*/specs/*/art" + - "ifacts/*}ZD\022B/v1/{name=projects/*/locati" + - "ons/*/apis/*/deployments/*/artifacts/*}\332" + - "A\004name\022\357\003\n\023GetArtifactContents\022:.google." + - "cloud.apigeeregistry.v1.GetArtifactConte" + - "ntsRequest\032\024.google.api.HttpBody\"\205\003\202\323\344\223\002" + - "\367\002\0229/v1/{name=projects/*/locations/*/art" + - "ifacts/*}:getContentsZB\022@/v1/{name=proje" + - "cts/*/locations/*/apis/*/artifacts/*}:ge" + - "tContentsZM\022K/v1/{name=projects/*/locati" + - "ons/*/apis/*/versions/*/artifacts/*}:get" + - "ContentsZU\022S/v1/{name=projects/*/locatio" + - "ns/*/apis/*/versions/*/specs/*/artifacts" + - "/*}:getContentsZP\022N/v1/{name=projects/*/" + - "locations/*/apis/*/deployments/*/artifac" + - "ts/*}:getContents\332A\004name\022\206\004\n\016CreateArtif" + - "act\0225.google.cloud.apigeeregistry.v1.Cre" + - "ateArtifactRequest\032(.google.cloud.apigee" + - "registry.v1.Artifact\"\222\003\202\323\344\223\002\355\002\"-/v1/{par" + - "ent=projects/*/locations/*}/artifacts:\010a" + - "rtifactZ@\"4/v1/{parent=projects/*/locati" + - "ons/*/apis/*}/artifacts:\010artifactZK\"?/v1" + - "/{parent=projects/*/locations/*/apis/*/v" + - "ersions/*}/artifacts:\010artifactZS\"G/v1/{p" + - "arent=projects/*/locations/*/apis/*/vers" + - "ions/*/specs/*}/artifacts:\010artifactZN\"B/" + - "v1/{parent=projects/*/locations/*/apis/*" + - "/deployments/*}/artifacts:\010artifact\332A\033pa" + - "rent,artifact,artifact_id\022\242\004\n\017ReplaceArt" + - "ifact\0226.google.cloud.apigeeregistry.v1.R" + - "eplaceArtifactRequest\032(.google.cloud.api" + - "geeregistry.v1.Artifact\"\254\003\202\323\344\223\002\232\003\0326/v1/{" + - "artifact.name=projects/*/locations/*/art" + - "ifacts/*}:\010artifactZI\032=/v1/{artifact.nam" + - "e=projects/*/locations/*/apis/*/artifact" + - "s/*}:\010artifactZT\032H/v1/{artifact.name=pro" + - "jects/*/locations/*/apis/*/versions/*/ar" + - "tifacts/*}:\010artifactZ\\\032P/v1/{artifact.na" + - "me=projects/*/locations/*/apis/*/version" + - "s/*/specs/*/artifacts/*}:\010artifactZW\032K/v" + - "1/{artifact.name=projects/*/locations/*/" + - "apis/*/deployments/*/artifacts/*}:\010artif" + - "act\332A\010artifact\022\253\003\n\016DeleteArtifact\0225.goog" + - "le.cloud.apigeeregistry.v1.DeleteArtifac" + - "tRequest\032\026.google.protobuf.Empty\"\311\002\202\323\344\223\002" + - "\273\002*-/v1/{name=projects/*/locations/*/art" + - "ifacts/*}Z6*4/v1/{name=projects/*/locati" + - "ons/*/apis/*/artifacts/*}ZA*?/v1/{name=p" + - "rojects/*/locations/*/apis/*/versions/*/" + - "artifacts/*}ZI*G/v1/{name=projects/*/loc" + - "ations/*/apis/*/versions/*/specs/*/artif" + - "acts/*}ZD*B/v1/{name=projects/*/location" + - "s/*/apis/*/deployments/*/artifacts/*}\332A\004" + - "name\032Q\312A\035apigeeregistry.googleapis.com\322A" + - ".https://www.googleapis.com/auth/cloud-p" + - "latformB\360\001\n\"com.google.cloud.apigeeregis" + - "try.v1B\024RegistryServiceProtoP\001ZLgoogle.g" + - "olang.org/genproto/googleapis/cloud/apig" + - "eeregistry/v1;apigeeregistry\252\002\036Google.Cl" + - "oud.ApigeeRegistry.V1\312\002\036Google\\Cloud\\Api" + - "geeRegistry\\V1\352\002!Google::Cloud::ApigeeRe" + - "gistry::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.HttpBodyProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.apigeeregistry.v1.RegistryModelsProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - }); - internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApisRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", }); - internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApisResponse_descriptor, - new java.lang.String[] { "Apis", "NextPageToken", }); - internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_GetApiRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_CreateApiRequest_descriptor, - new java.lang.String[] { "Parent", "Api", "ApiId", }); - internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_descriptor, - new java.lang.String[] { "Api", "UpdateMask", "AllowMissing", }); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_DeleteApiRequest_descriptor, - new java.lang.String[] { "Name", "Force", }); - internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", }); - internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApiVersionsResponse_descriptor, - new java.lang.String[] { "ApiVersions", "NextPageToken", }); - internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_GetApiVersionRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_CreateApiVersionRequest_descriptor, - new java.lang.String[] { "Parent", "ApiVersion", "ApiVersionId", }); - internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_descriptor, - new java.lang.String[] { "ApiVersion", "UpdateMask", "AllowMissing", }); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_DeleteApiVersionRequest_descriptor, - new java.lang.String[] { "Name", "Force", }); - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", }); - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecsResponse_descriptor, - new java.lang.String[] { "ApiSpecs", "NextPageToken", }); - internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_GetApiSpecRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_GetApiSpecContentsRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_CreateApiSpecRequest_descriptor, - new java.lang.String[] { "Parent", "ApiSpec", "ApiSpecId", }); - internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_descriptor, - new java.lang.String[] { "ApiSpec", "UpdateMask", "AllowMissing", }); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRequest_descriptor, - new java.lang.String[] { "Name", "Force", }); - internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_descriptor, - new java.lang.String[] { "Name", "Tag", }); - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsRequest_descriptor, - new java.lang.String[] { "Name", "PageSize", "PageToken", }); - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApiSpecRevisionsResponse_descriptor, - new java.lang.String[] { "ApiSpecs", "NextPageToken", }); - internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_descriptor, - new java.lang.String[] { "Name", "RevisionId", }); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_DeleteApiSpecRevisionRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", }); - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentsResponse_descriptor, - new java.lang.String[] { "ApiDeployments", "NextPageToken", }); - internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_GetApiDeploymentRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_CreateApiDeploymentRequest_descriptor, - new java.lang.String[] { "Parent", "ApiDeployment", "ApiDeploymentId", }); - internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_descriptor, - new java.lang.String[] { "ApiDeployment", "UpdateMask", "AllowMissing", }); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRequest_descriptor, - new java.lang.String[] { "Name", "Force", }); - internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_descriptor, - new java.lang.String[] { "Name", "Tag", }); - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsRequest_descriptor, - new java.lang.String[] { "Name", "PageSize", "PageToken", }); - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListApiDeploymentRevisionsResponse_descriptor, - new java.lang.String[] { "ApiDeployments", "NextPageToken", }); - internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_descriptor, - new java.lang.String[] { "Name", "RevisionId", }); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_DeleteApiDeploymentRevisionRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListArtifactsRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", }); - internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ListArtifactsResponse_descriptor, - new java.lang.String[] { "Artifacts", "NextPageToken", }); - internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_GetArtifactRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_descriptor = - getDescriptor().getMessageTypes().get(38); - internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_GetArtifactContentsRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_descriptor = - getDescriptor().getMessageTypes().get(39); - internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_CreateArtifactRequest_descriptor, - new java.lang.String[] { "Parent", "Artifact", "ArtifactId", }); - internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_descriptor = - getDescriptor().getMessageTypes().get(40); - internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_descriptor, - new java.lang.String[] { "Artifact", }); - internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_descriptor = - getDescriptor().getMessageTypes().get(41); - internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_apigeeregistry_v1_DeleteArtifactRequest_descriptor, - new java.lang.String[] { "Name", }); - 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.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.HttpBodyProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.apigeeregistry.v1.RegistryModelsProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequest.java deleted file mode 100644 index a23347f99215..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequest.java +++ /dev/null @@ -1,689 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for ReplaceArtifact.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ReplaceArtifactRequest} - */ -public final class ReplaceArtifactRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) - ReplaceArtifactRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ReplaceArtifactRequest.newBuilder() to construct. - private ReplaceArtifactRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ReplaceArtifactRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ReplaceArtifactRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReplaceArtifactRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.apigeeregistry.v1.Artifact.Builder subBuilder = null; - if (artifact_ != null) { - subBuilder = artifact_.toBuilder(); - } - artifact_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Artifact.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(artifact_); - artifact_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.class, com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.Builder.class); - } - - public static final int ARTIFACT_FIELD_NUMBER = 1; - private com.google.cloud.apigeeregistry.v1.Artifact artifact_; - /** - *
-   * Required. The artifact to replace.
-   * The `name` field is used to identify the artifact to replace.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the artifact field is set. - */ - @java.lang.Override - public boolean hasArtifact() { - return artifact_ != null; - } - /** - *
-   * Required. The artifact to replace.
-   * The `name` field is used to identify the artifact to replace.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The artifact. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Artifact getArtifact() { - return artifact_ == null ? com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; - } - /** - *
-   * Required. The artifact to replace.
-   * The `name` field is used to identify the artifact to replace.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder() { - return getArtifact(); - } - - 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 (artifact_ != null) { - output.writeMessage(1, getArtifact()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (artifact_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getArtifact()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest other = (com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) obj; - - if (hasArtifact() != other.hasArtifact()) return false; - if (hasArtifact()) { - if (!getArtifact() - .equals(other.getArtifact())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasArtifact()) { - hash = (37 * hash) + ARTIFACT_FIELD_NUMBER; - hash = (53 * hash) + getArtifact().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest 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.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest 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.apigeeregistry.v1.ReplaceArtifactRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ReplaceArtifact.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.ReplaceArtifactRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) - com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.class, com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (artifactBuilder_ == null) { - artifact_ = null; - } else { - artifact_ = null; - artifactBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_ReplaceArtifactRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest build() { - com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest result = new com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest(this); - if (artifactBuilder_ == null) { - result.artifact_ = artifact_; - } else { - result.artifact_ = artifactBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.getDefaultInstance()) return this; - if (other.hasArtifact()) { - mergeArtifact(other.getArtifact()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.apigeeregistry.v1.Artifact artifact_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> artifactBuilder_; - /** - *
-     * Required. The artifact to replace.
-     * The `name` field is used to identify the artifact to replace.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the artifact field is set. - */ - public boolean hasArtifact() { - return artifactBuilder_ != null || artifact_ != null; - } - /** - *
-     * Required. The artifact to replace.
-     * The `name` field is used to identify the artifact to replace.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The artifact. - */ - public com.google.cloud.apigeeregistry.v1.Artifact getArtifact() { - if (artifactBuilder_ == null) { - return artifact_ == null ? com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; - } else { - return artifactBuilder_.getMessage(); - } - } - /** - *
-     * Required. The artifact to replace.
-     * The `name` field is used to identify the artifact to replace.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setArtifact(com.google.cloud.apigeeregistry.v1.Artifact value) { - if (artifactBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - artifact_ = value; - onChanged(); - } else { - artifactBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The artifact to replace.
-     * The `name` field is used to identify the artifact to replace.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setArtifact( - com.google.cloud.apigeeregistry.v1.Artifact.Builder builderForValue) { - if (artifactBuilder_ == null) { - artifact_ = builderForValue.build(); - onChanged(); - } else { - artifactBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The artifact to replace.
-     * The `name` field is used to identify the artifact to replace.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeArtifact(com.google.cloud.apigeeregistry.v1.Artifact value) { - if (artifactBuilder_ == null) { - if (artifact_ != null) { - artifact_ = - com.google.cloud.apigeeregistry.v1.Artifact.newBuilder(artifact_).mergeFrom(value).buildPartial(); - } else { - artifact_ = value; - } - onChanged(); - } else { - artifactBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The artifact to replace.
-     * The `name` field is used to identify the artifact to replace.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearArtifact() { - if (artifactBuilder_ == null) { - artifact_ = null; - onChanged(); - } else { - artifact_ = null; - artifactBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The artifact to replace.
-     * The `name` field is used to identify the artifact to replace.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.Artifact.Builder getArtifactBuilder() { - - onChanged(); - return getArtifactFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The artifact to replace.
-     * The `name` field is used to identify the artifact to replace.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder() { - if (artifactBuilder_ != null) { - return artifactBuilder_.getMessageOrBuilder(); - } else { - return artifact_ == null ? - com.google.cloud.apigeeregistry.v1.Artifact.getDefaultInstance() : artifact_; - } - } - /** - *
-     * Required. The artifact to replace.
-     * The `name` field is used to identify the artifact to replace.
-     * Format: `{parent}/artifacts/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder> - getArtifactFieldBuilder() { - if (artifactBuilder_ == null) { - artifactBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Artifact, com.google.cloud.apigeeregistry.v1.Artifact.Builder, com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder>( - getArtifact(), - getParentForChildren(), - isClean()); - artifact_ = null; - } - return artifactBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) - private static final com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReplaceArtifactRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReplaceArtifactRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequestOrBuilder.java deleted file mode 100644 index bf7c70fa60b1..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/ReplaceArtifactRequestOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface ReplaceArtifactRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The artifact to replace.
-   * The `name` field is used to identify the artifact to replace.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the artifact field is set. - */ - boolean hasArtifact(); - /** - *
-   * Required. The artifact to replace.
-   * The `name` field is used to identify the artifact to replace.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The artifact. - */ - com.google.cloud.apigeeregistry.v1.Artifact getArtifact(); - /** - *
-   * Required. The artifact to replace.
-   * The `name` field is used to identify the artifact to replace.
-   * Format: `{parent}/artifacts/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Artifact artifact = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.ArtifactOrBuilder getArtifactOrBuilder(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequest.java deleted file mode 100644 index efe37867d375..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequest.java +++ /dev/null @@ -1,775 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for RollbackApiDeployment.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest} - */ -public final class RollbackApiDeploymentRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) - RollbackApiDeploymentRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use RollbackApiDeploymentRequest.newBuilder() to construct. - private RollbackApiDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RollbackApiDeploymentRequest() { - name_ = ""; - revisionId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RollbackApiDeploymentRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RollbackApiDeploymentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - revisionId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The deployment being rolled back.
-   * 
- * - * 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 deployment being rolled back.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object revisionId_; - /** - *
-   * Required. The revision ID to roll back to.
-   * It must be a revision of the same deployment.
-   *   Example: `c7cfa2a8`
-   * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - 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(); - revisionId_ = s; - return s; - } - } - /** - *
-   * Required. The revision ID to roll back to.
-   * It must be a revision of the same deployment.
-   *   Example: `c7cfa2a8`
-   * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revisionId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revisionId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest other = (com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getRevisionId() - .equals(other.getRevisionId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest 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.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest 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.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for RollbackApiDeployment.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) - com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - revisionId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiDeploymentRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest build() { - com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest result = new com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest(this); - result.name_ = name_; - result.revisionId_ = revisionId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getRevisionId().isEmpty()) { - revisionId_ = other.revisionId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The deployment being rolled back.
-     * 
- * - * 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 deployment being rolled back.
-     * 
- * - * 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 deployment being rolled back.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The deployment being rolled back.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The deployment being rolled back.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object revisionId_ = ""; - /** - *
-     * Required. The revision ID to roll back to.
-     * It must be a revision of the same deployment.
-     *   Example: `c7cfa2a8`
-     * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The revision ID to roll back to.
-     * It must be a revision of the same deployment.
-     *   Example: `c7cfa2a8`
-     * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The revision ID to roll back to.
-     * It must be a revision of the same deployment.
-     *   Example: `c7cfa2a8`
-     * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - revisionId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The revision ID to roll back to.
-     * It must be a revision of the same deployment.
-     *   Example: `c7cfa2a8`
-     * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - - revisionId_ = getDefaultInstance().getRevisionId(); - onChanged(); - return this; - } - /** - *
-     * Required. The revision ID to roll back to.
-     * It must be a revision of the same deployment.
-     *   Example: `c7cfa2a8`
-     * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - revisionId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) - private static final com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RollbackApiDeploymentRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RollbackApiDeploymentRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequestOrBuilder.java deleted file mode 100644 index a5f0850588e1..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiDeploymentRequestOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface RollbackApiDeploymentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The deployment being rolled back.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The deployment being rolled back.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The revision ID to roll back to.
-   * It must be a revision of the same deployment.
-   *   Example: `c7cfa2a8`
-   * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - *
-   * Required. The revision ID to roll back to.
-   * It must be a revision of the same deployment.
-   *   Example: `c7cfa2a8`
-   * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString - getRevisionIdBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequest.java deleted file mode 100644 index 2300d903b9d5..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequest.java +++ /dev/null @@ -1,775 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for RollbackApiSpec.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.RollbackApiSpecRequest} - */ -public final class RollbackApiSpecRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) - RollbackApiSpecRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use RollbackApiSpecRequest.newBuilder() to construct. - private RollbackApiSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RollbackApiSpecRequest() { - name_ = ""; - revisionId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RollbackApiSpecRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RollbackApiSpecRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - revisionId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The spec being rolled back.
-   * 
- * - * 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 spec being rolled back.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object revisionId_; - /** - *
-   * Required. The revision ID to roll back to.
-   * It must be a revision of the same spec.
-   *   Example: `c7cfa2a8`
-   * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - 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(); - revisionId_ = s; - return s; - } - } - /** - *
-   * Required. The revision ID to roll back to.
-   * It must be a revision of the same spec.
-   *   Example: `c7cfa2a8`
-   * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revisionId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revisionId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest other = (com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getRevisionId() - .equals(other.getRevisionId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest 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.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest 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.apigeeregistry.v1.RollbackApiSpecRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for RollbackApiSpec.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.RollbackApiSpecRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) - com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - revisionId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_RollbackApiSpecRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest build() { - com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest result = new com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest(this); - result.name_ = name_; - result.revisionId_ = revisionId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getRevisionId().isEmpty()) { - revisionId_ = other.revisionId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The spec being rolled back.
-     * 
- * - * 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 spec being rolled back.
-     * 
- * - * 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 spec being rolled back.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The spec being rolled back.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The spec being rolled back.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object revisionId_ = ""; - /** - *
-     * Required. The revision ID to roll back to.
-     * It must be a revision of the same spec.
-     *   Example: `c7cfa2a8`
-     * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The revision ID to roll back to.
-     * It must be a revision of the same spec.
-     *   Example: `c7cfa2a8`
-     * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The revision ID to roll back to.
-     * It must be a revision of the same spec.
-     *   Example: `c7cfa2a8`
-     * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - revisionId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The revision ID to roll back to.
-     * It must be a revision of the same spec.
-     *   Example: `c7cfa2a8`
-     * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - - revisionId_ = getDefaultInstance().getRevisionId(); - onChanged(); - return this; - } - /** - *
-     * Required. The revision ID to roll back to.
-     * It must be a revision of the same spec.
-     *   Example: `c7cfa2a8`
-     * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - revisionId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) - private static final com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RollbackApiSpecRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RollbackApiSpecRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequestOrBuilder.java deleted file mode 100644 index eb92cc220edb..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/RollbackApiSpecRequestOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface RollbackApiSpecRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The spec being rolled back.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The spec being rolled back.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The revision ID to roll back to.
-   * It must be a revision of the same spec.
-   *   Example: `c7cfa2a8`
-   * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - *
-   * Required. The revision ID to roll back to.
-   * It must be a revision of the same spec.
-   *   Example: `c7cfa2a8`
-   * 
- * - * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString - getRevisionIdBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequest.java deleted file mode 100644 index e4425d52902b..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequest.java +++ /dev/null @@ -1,768 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for TagApiDeploymentRevision.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest} - */ -public final class TagApiDeploymentRevisionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) - TagApiDeploymentRevisionRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use TagApiDeploymentRevisionRequest.newBuilder() to construct. - private TagApiDeploymentRevisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TagApiDeploymentRevisionRequest() { - name_ = ""; - tag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TagApiDeploymentRevisionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TagApiDeploymentRevisionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - tag_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.class, com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the deployment to be tagged, including the revision ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the deployment to be tagged, including the revision 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; - } - } - - public static final int TAG_FIELD_NUMBER = 2; - private volatile java.lang.Object tag_; - /** - *
-   * Required. The tag to apply.
-   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-   * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The tag. - */ - @java.lang.Override - public java.lang.String getTag() { - java.lang.Object ref = tag_; - 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(); - tag_ = s; - return s; - } - } - /** - *
-   * Required. The tag to apply.
-   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-   * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for tag. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTagBytes() { - java.lang.Object ref = tag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tag_ = 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest other = (com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getTag() - .equals(other.getTag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + TAG_FIELD_NUMBER; - hash = (53 * hash) + getTag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest 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.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest 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.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for TagApiDeploymentRevision.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) - com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.class, com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - tag_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiDeploymentRevisionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest build() { - com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest result = new com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest(this); - result.name_ = name_; - result.tag_ = tag_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getTag().isEmpty()) { - tag_ = other.tag_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the deployment to be tagged, including the revision ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the deployment to be tagged, including the revision ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the deployment to be tagged, including the revision ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the deployment to be tagged, including the revision ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the deployment to be tagged, including the revision ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object tag_ = ""; - /** - *
-     * Required. The tag to apply.
-     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-     * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The tag. - */ - public java.lang.String getTag() { - java.lang.Object ref = tag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The tag to apply.
-     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-     * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for tag. - */ - public com.google.protobuf.ByteString - getTagBytes() { - java.lang.Object ref = tag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The tag to apply.
-     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-     * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The tag to set. - * @return This builder for chaining. - */ - public Builder setTag( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - tag_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The tag to apply.
-     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-     * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearTag() { - - tag_ = getDefaultInstance().getTag(); - onChanged(); - return this; - } - /** - *
-     * Required. The tag to apply.
-     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-     * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for tag to set. - * @return This builder for chaining. - */ - public Builder setTagBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - tag_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) - private static final com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TagApiDeploymentRevisionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TagApiDeploymentRevisionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequestOrBuilder.java deleted file mode 100644 index 639ec269f3a7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiDeploymentRevisionRequestOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface TagApiDeploymentRevisionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the deployment to be tagged, including the revision ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the deployment to be tagged, including the revision ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The tag to apply.
-   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-   * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The tag. - */ - java.lang.String getTag(); - /** - *
-   * Required. The tag to apply.
-   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-   * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for tag. - */ - com.google.protobuf.ByteString - getTagBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequest.java deleted file mode 100644 index ef9b4a9c17e4..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequest.java +++ /dev/null @@ -1,768 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for TagApiSpecRevision.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest} - */ -public final class TagApiSpecRevisionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) - TagApiSpecRevisionRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use TagApiSpecRevisionRequest.newBuilder() to construct. - private TagApiSpecRevisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TagApiSpecRevisionRequest() { - name_ = ""; - tag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TagApiSpecRevisionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TagApiSpecRevisionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - tag_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.class, com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the spec to be tagged, including the revision ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the spec to be tagged, including the revision 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; - } - } - - public static final int TAG_FIELD_NUMBER = 2; - private volatile java.lang.Object tag_; - /** - *
-   * Required. The tag to apply.
-   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-   * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The tag. - */ - @java.lang.Override - public java.lang.String getTag() { - java.lang.Object ref = tag_; - 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(); - tag_ = s; - return s; - } - } - /** - *
-   * Required. The tag to apply.
-   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-   * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for tag. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTagBytes() { - java.lang.Object ref = tag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tag_ = 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.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest other = (com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getTag() - .equals(other.getTag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + TAG_FIELD_NUMBER; - hash = (53 * hash) + getTag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest 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.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest 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.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for TagApiSpecRevision.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) - com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.class, com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - tag_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_TagApiSpecRevisionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest build() { - com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest result = new com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest(this); - result.name_ = name_; - result.tag_ = tag_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getTag().isEmpty()) { - tag_ = other.tag_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the spec to be tagged, including the revision ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the spec to be tagged, including the revision ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the spec to be tagged, including the revision ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec to be tagged, including the revision ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the spec to be tagged, including the revision ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object tag_ = ""; - /** - *
-     * Required. The tag to apply.
-     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-     * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The tag. - */ - public java.lang.String getTag() { - java.lang.Object ref = tag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The tag to apply.
-     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-     * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for tag. - */ - public com.google.protobuf.ByteString - getTagBytes() { - java.lang.Object ref = tag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The tag to apply.
-     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-     * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The tag to set. - * @return This builder for chaining. - */ - public Builder setTag( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - tag_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The tag to apply.
-     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-     * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearTag() { - - tag_ = getDefaultInstance().getTag(); - onChanged(); - return this; - } - /** - *
-     * Required. The tag to apply.
-     * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-     * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for tag to set. - * @return This builder for chaining. - */ - public Builder setTagBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - tag_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) - private static final com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TagApiSpecRevisionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TagApiSpecRevisionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequestOrBuilder.java deleted file mode 100644 index 70227dbf3d49..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/TagApiSpecRevisionRequestOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface TagApiSpecRevisionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the spec to be tagged, including the revision ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the spec to be tagged, including the revision ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The tag to apply.
-   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-   * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The tag. - */ - java.lang.String getTag(); - /** - *
-   * Required. The tag to apply.
-   * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
-   * 
- * - * string tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for tag. - */ - com.google.protobuf.ByteString - getTagBytes(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequest.java deleted file mode 100644 index 531de8cad8b3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequest.java +++ /dev/null @@ -1,1046 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for UpdateApiDeployment.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest} - */ -public final class UpdateApiDeploymentRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) - UpdateApiDeploymentRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateApiDeploymentRequest.newBuilder() to construct. - private UpdateApiDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateApiDeploymentRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateApiDeploymentRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateApiDeploymentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder subBuilder = null; - if (apiDeployment_ != null) { - subBuilder = apiDeployment_.toBuilder(); - } - apiDeployment_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiDeployment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(apiDeployment_); - apiDeployment_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { - - allowMissing_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.Builder.class); - } - - public static final int API_DEPLOYMENT_FIELD_NUMBER = 1; - private com.google.cloud.apigeeregistry.v1.ApiDeployment apiDeployment_; - /** - *
-   * Required. The deployment to update.
-   * The `name` field is used to identify the deployment to update.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiDeployment field is set. - */ - @java.lang.Override - public boolean hasApiDeployment() { - return apiDeployment_ != null; - } - /** - *
-   * Required. The deployment to update.
-   * The `name` field is used to identify the deployment to update.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiDeployment. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment() { - return apiDeployment_ == null ? com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; - } - /** - *
-   * Required. The deployment to update.
-   * The `name` field is used to identify the deployment to update.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder() { - return getApiDeployment(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - public static final int ALLOW_MISSING_FIELD_NUMBER = 3; - private boolean allowMissing_; - /** - *
-   * If set to true, and the deployment is not found, a new deployment will be
-   * created. In this situation, `update_mask` is ignored.
-   * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - @java.lang.Override - public boolean getAllowMissing() { - return allowMissing_; - } - - 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 (apiDeployment_ != null) { - output.writeMessage(1, getApiDeployment()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - if (allowMissing_ != false) { - output.writeBool(3, allowMissing_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (apiDeployment_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getApiDeployment()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - if (allowMissing_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, allowMissing_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest other = (com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) obj; - - if (hasApiDeployment() != other.hasApiDeployment()) return false; - if (hasApiDeployment()) { - if (!getApiDeployment() - .equals(other.getApiDeployment())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (getAllowMissing() - != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasApiDeployment()) { - hash = (37 * hash) + API_DEPLOYMENT_FIELD_NUMBER; - hash = (53 * hash) + getApiDeployment().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest 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.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest 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.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for UpdateApiDeployment.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) - com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (apiDeploymentBuilder_ == null) { - apiDeployment_ = null; - } else { - apiDeployment_ = null; - apiDeploymentBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - allowMissing_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiDeploymentRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest build() { - com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest result = new com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest(this); - if (apiDeploymentBuilder_ == null) { - result.apiDeployment_ = apiDeployment_; - } else { - result.apiDeployment_ = apiDeploymentBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - result.allowMissing_ = allowMissing_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.getDefaultInstance()) return this; - if (other.hasApiDeployment()) { - mergeApiDeployment(other.getApiDeployment()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.getAllowMissing() != false) { - setAllowMissing(other.getAllowMissing()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.apigeeregistry.v1.ApiDeployment apiDeployment_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> apiDeploymentBuilder_; - /** - *
-     * Required. The deployment to update.
-     * The `name` field is used to identify the deployment to update.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiDeployment field is set. - */ - public boolean hasApiDeployment() { - return apiDeploymentBuilder_ != null || apiDeployment_ != null; - } - /** - *
-     * Required. The deployment to update.
-     * The `name` field is used to identify the deployment to update.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiDeployment. - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment() { - if (apiDeploymentBuilder_ == null) { - return apiDeployment_ == null ? com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; - } else { - return apiDeploymentBuilder_.getMessage(); - } - } - /** - *
-     * Required. The deployment to update.
-     * The `name` field is used to identify the deployment to update.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiDeployment(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { - if (apiDeploymentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - apiDeployment_ = value; - onChanged(); - } else { - apiDeploymentBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The deployment to update.
-     * The `name` field is used to identify the deployment to update.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiDeployment( - com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder builderForValue) { - if (apiDeploymentBuilder_ == null) { - apiDeployment_ = builderForValue.build(); - onChanged(); - } else { - apiDeploymentBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The deployment to update.
-     * The `name` field is used to identify the deployment to update.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeApiDeployment(com.google.cloud.apigeeregistry.v1.ApiDeployment value) { - if (apiDeploymentBuilder_ == null) { - if (apiDeployment_ != null) { - apiDeployment_ = - com.google.cloud.apigeeregistry.v1.ApiDeployment.newBuilder(apiDeployment_).mergeFrom(value).buildPartial(); - } else { - apiDeployment_ = value; - } - onChanged(); - } else { - apiDeploymentBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The deployment to update.
-     * The `name` field is used to identify the deployment to update.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearApiDeployment() { - if (apiDeploymentBuilder_ == null) { - apiDeployment_ = null; - onChanged(); - } else { - apiDeployment_ = null; - apiDeploymentBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The deployment to update.
-     * The `name` field is used to identify the deployment to update.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder getApiDeploymentBuilder() { - - onChanged(); - return getApiDeploymentFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The deployment to update.
-     * The `name` field is used to identify the deployment to update.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder() { - if (apiDeploymentBuilder_ != null) { - return apiDeploymentBuilder_.getMessageOrBuilder(); - } else { - return apiDeployment_ == null ? - com.google.cloud.apigeeregistry.v1.ApiDeployment.getDefaultInstance() : apiDeployment_; - } - } - /** - *
-     * Required. The deployment to update.
-     * The `name` field is used to identify the deployment to update.
-     * Format: `projects/*/locations/*/apis/*/deployments/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder> - getApiDeploymentFieldBuilder() { - if (apiDeploymentBuilder_ == null) { - apiDeploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiDeployment, com.google.cloud.apigeeregistry.v1.ApiDeployment.Builder, com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder>( - getApiDeployment(), - getParentForChildren(), - isClean()); - apiDeployment_ = null; - } - return apiDeploymentBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @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(); - } - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private boolean allowMissing_ ; - /** - *
-     * If set to true, and the deployment is not found, a new deployment will be
-     * created. In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - @java.lang.Override - public boolean getAllowMissing() { - return allowMissing_; - } - /** - *
-     * If set to true, and the deployment is not found, a new deployment will be
-     * created. In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @param value The allowMissing to set. - * @return This builder for chaining. - */ - public Builder setAllowMissing(boolean value) { - - allowMissing_ = value; - onChanged(); - return this; - } - /** - *
-     * If set to true, and the deployment is not found, a new deployment will be
-     * created. In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @return This builder for chaining. - */ - public Builder clearAllowMissing() { - - allowMissing_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) - private static final com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateApiDeploymentRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateApiDeploymentRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequestOrBuilder.java deleted file mode 100644 index b1999f194b95..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiDeploymentRequestOrBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface UpdateApiDeploymentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The deployment to update.
-   * The `name` field is used to identify the deployment to update.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiDeployment field is set. - */ - boolean hasApiDeployment(); - /** - *
-   * Required. The deployment to update.
-   * The `name` field is used to identify the deployment to update.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiDeployment. - */ - com.google.cloud.apigeeregistry.v1.ApiDeployment getApiDeployment(); - /** - *
-   * Required. The deployment to update.
-   * The `name` field is used to identify the deployment to update.
-   * Format: `projects/*/locations/*/apis/*/deployments/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.ApiDeploymentOrBuilder getApiDeploymentOrBuilder(); - - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - *
-   * If set to true, and the deployment is not found, a new deployment will be
-   * created. In this situation, `update_mask` is ignored.
-   * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - boolean getAllowMissing(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequest.java deleted file mode 100644 index 93956dcac044..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequest.java +++ /dev/null @@ -1,1046 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for UpdateApi.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiRequest} - */ -public final class UpdateApiRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.UpdateApiRequest) - UpdateApiRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateApiRequest.newBuilder() to construct. - private UpdateApiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateApiRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateApiRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateApiRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.apigeeregistry.v1.Api.Builder subBuilder = null; - if (api_ != null) { - subBuilder = api_.toBuilder(); - } - api_ = input.readMessage(com.google.cloud.apigeeregistry.v1.Api.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(api_); - api_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { - - allowMissing_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.UpdateApiRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiRequest.Builder.class); - } - - public static final int API_FIELD_NUMBER = 1; - private com.google.cloud.apigeeregistry.v1.Api api_; - /** - *
-   * Required. The API to update.
-   * The `name` field is used to identify the API to update.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the api field is set. - */ - @java.lang.Override - public boolean hasApi() { - return api_ != null; - } - /** - *
-   * Required. The API to update.
-   * The `name` field is used to identify the API to update.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The api. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.Api getApi() { - return api_ == null ? com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; - } - /** - *
-   * Required. The API to update.
-   * The `name` field is used to identify the API to update.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder() { - return getApi(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - public static final int ALLOW_MISSING_FIELD_NUMBER = 3; - private boolean allowMissing_; - /** - *
-   * If set to true, and the API is not found, a new API will be created.
-   * In this situation, `update_mask` is ignored.
-   * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - @java.lang.Override - public boolean getAllowMissing() { - return allowMissing_; - } - - 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 (api_ != null) { - output.writeMessage(1, getApi()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - if (allowMissing_ != false) { - output.writeBool(3, allowMissing_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (api_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getApi()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - if (allowMissing_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, allowMissing_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.UpdateApiRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.UpdateApiRequest other = (com.google.cloud.apigeeregistry.v1.UpdateApiRequest) obj; - - if (hasApi() != other.hasApi()) return false; - if (hasApi()) { - if (!getApi() - .equals(other.getApi())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (getAllowMissing() - != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasApi()) { - hash = (37 * hash) + API_FIELD_NUMBER; - hash = (53 * hash) + getApi().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest 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.apigeeregistry.v1.UpdateApiRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest 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.apigeeregistry.v1.UpdateApiRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.UpdateApiRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for UpdateApi.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.UpdateApiRequest) - com.google.cloud.apigeeregistry.v1.UpdateApiRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.UpdateApiRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.UpdateApiRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (apiBuilder_ == null) { - api_ = null; - } else { - api_ = null; - apiBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - allowMissing_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.UpdateApiRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiRequest build() { - com.google.cloud.apigeeregistry.v1.UpdateApiRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.UpdateApiRequest result = new com.google.cloud.apigeeregistry.v1.UpdateApiRequest(this); - if (apiBuilder_ == null) { - result.api_ = api_; - } else { - result.api_ = apiBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - result.allowMissing_ = allowMissing_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.UpdateApiRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.UpdateApiRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.UpdateApiRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.UpdateApiRequest.getDefaultInstance()) return this; - if (other.hasApi()) { - mergeApi(other.getApi()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.getAllowMissing() != false) { - setAllowMissing(other.getAllowMissing()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.UpdateApiRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.UpdateApiRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.apigeeregistry.v1.Api api_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> apiBuilder_; - /** - *
-     * Required. The API to update.
-     * The `name` field is used to identify the API to update.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the api field is set. - */ - public boolean hasApi() { - return apiBuilder_ != null || api_ != null; - } - /** - *
-     * Required. The API to update.
-     * The `name` field is used to identify the API to update.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The api. - */ - public com.google.cloud.apigeeregistry.v1.Api getApi() { - if (apiBuilder_ == null) { - return api_ == null ? com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; - } else { - return apiBuilder_.getMessage(); - } - } - /** - *
-     * Required. The API to update.
-     * The `name` field is used to identify the API to update.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApi(com.google.cloud.apigeeregistry.v1.Api value) { - if (apiBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - api_ = value; - onChanged(); - } else { - apiBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The API to update.
-     * The `name` field is used to identify the API to update.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApi( - com.google.cloud.apigeeregistry.v1.Api.Builder builderForValue) { - if (apiBuilder_ == null) { - api_ = builderForValue.build(); - onChanged(); - } else { - apiBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The API to update.
-     * The `name` field is used to identify the API to update.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeApi(com.google.cloud.apigeeregistry.v1.Api value) { - if (apiBuilder_ == null) { - if (api_ != null) { - api_ = - com.google.cloud.apigeeregistry.v1.Api.newBuilder(api_).mergeFrom(value).buildPartial(); - } else { - api_ = value; - } - onChanged(); - } else { - apiBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The API to update.
-     * The `name` field is used to identify the API to update.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearApi() { - if (apiBuilder_ == null) { - api_ = null; - onChanged(); - } else { - api_ = null; - apiBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The API to update.
-     * The `name` field is used to identify the API to update.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.Api.Builder getApiBuilder() { - - onChanged(); - return getApiFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The API to update.
-     * The `name` field is used to identify the API to update.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder() { - if (apiBuilder_ != null) { - return apiBuilder_.getMessageOrBuilder(); - } else { - return api_ == null ? - com.google.cloud.apigeeregistry.v1.Api.getDefaultInstance() : api_; - } - } - /** - *
-     * Required. The API to update.
-     * The `name` field is used to identify the API to update.
-     * Format: `projects/*/locations/*/apis/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder> - getApiFieldBuilder() { - if (apiBuilder_ == null) { - apiBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.Api, com.google.cloud.apigeeregistry.v1.Api.Builder, com.google.cloud.apigeeregistry.v1.ApiOrBuilder>( - getApi(), - getParentForChildren(), - isClean()); - api_ = null; - } - return apiBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @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(); - } - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private boolean allowMissing_ ; - /** - *
-     * If set to true, and the API is not found, a new API will be created.
-     * In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - @java.lang.Override - public boolean getAllowMissing() { - return allowMissing_; - } - /** - *
-     * If set to true, and the API is not found, a new API will be created.
-     * In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @param value The allowMissing to set. - * @return This builder for chaining. - */ - public Builder setAllowMissing(boolean value) { - - allowMissing_ = value; - onChanged(); - return this; - } - /** - *
-     * If set to true, and the API is not found, a new API will be created.
-     * In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @return This builder for chaining. - */ - public Builder clearAllowMissing() { - - allowMissing_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.UpdateApiRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.UpdateApiRequest) - private static final com.google.cloud.apigeeregistry.v1.UpdateApiRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.UpdateApiRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.UpdateApiRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateApiRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateApiRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequestOrBuilder.java deleted file mode 100644 index 9a5df215bf40..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiRequestOrBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface UpdateApiRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.UpdateApiRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The API to update.
-   * The `name` field is used to identify the API to update.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the api field is set. - */ - boolean hasApi(); - /** - *
-   * Required. The API to update.
-   * The `name` field is used to identify the API to update.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The api. - */ - com.google.cloud.apigeeregistry.v1.Api getApi(); - /** - *
-   * Required. The API to update.
-   * The `name` field is used to identify the API to update.
-   * Format: `projects/*/locations/*/apis/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.ApiOrBuilder getApiOrBuilder(); - - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - *
-   * If set to true, and the API is not found, a new API will be created.
-   * In this situation, `update_mask` is ignored.
-   * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - boolean getAllowMissing(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequest.java deleted file mode 100644 index cebba06da545..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequest.java +++ /dev/null @@ -1,1046 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for UpdateApiSpec.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiSpecRequest} - */ -public final class UpdateApiSpecRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) - UpdateApiSpecRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateApiSpecRequest.newBuilder() to construct. - private UpdateApiSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateApiSpecRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateApiSpecRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateApiSpecRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.apigeeregistry.v1.ApiSpec.Builder subBuilder = null; - if (apiSpec_ != null) { - subBuilder = apiSpec_.toBuilder(); - } - apiSpec_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(apiSpec_); - apiSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { - - allowMissing_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.Builder.class); - } - - public static final int API_SPEC_FIELD_NUMBER = 1; - private com.google.cloud.apigeeregistry.v1.ApiSpec apiSpec_; - /** - *
-   * Required. The spec to update.
-   * The `name` field is used to identify the spec to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiSpec field is set. - */ - @java.lang.Override - public boolean hasApiSpec() { - return apiSpec_ != null; - } - /** - *
-   * Required. The spec to update.
-   * The `name` field is used to identify the spec to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiSpec. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec() { - return apiSpec_ == null ? com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; - } - /** - *
-   * Required. The spec to update.
-   * The `name` field is used to identify the spec to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder() { - return getApiSpec(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - public static final int ALLOW_MISSING_FIELD_NUMBER = 3; - private boolean allowMissing_; - /** - *
-   * If set to true, and the spec is not found, a new spec will be created.
-   * In this situation, `update_mask` is ignored.
-   * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - @java.lang.Override - public boolean getAllowMissing() { - return allowMissing_; - } - - 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 (apiSpec_ != null) { - output.writeMessage(1, getApiSpec()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - if (allowMissing_ != false) { - output.writeBool(3, allowMissing_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (apiSpec_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getApiSpec()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - if (allowMissing_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, allowMissing_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest other = (com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) obj; - - if (hasApiSpec() != other.hasApiSpec()) return false; - if (hasApiSpec()) { - if (!getApiSpec() - .equals(other.getApiSpec())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (getAllowMissing() - != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasApiSpec()) { - hash = (37 * hash) + API_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getApiSpec().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest 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.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest 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.apigeeregistry.v1.UpdateApiSpecRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for UpdateApiSpec.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiSpecRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) - com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (apiSpecBuilder_ == null) { - apiSpec_ = null; - } else { - apiSpec_ = null; - apiSpecBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - allowMissing_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiSpecRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest build() { - com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest result = new com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest(this); - if (apiSpecBuilder_ == null) { - result.apiSpec_ = apiSpec_; - } else { - result.apiSpec_ = apiSpecBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - result.allowMissing_ = allowMissing_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.getDefaultInstance()) return this; - if (other.hasApiSpec()) { - mergeApiSpec(other.getApiSpec()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.getAllowMissing() != false) { - setAllowMissing(other.getAllowMissing()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.apigeeregistry.v1.ApiSpec apiSpec_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> apiSpecBuilder_; - /** - *
-     * Required. The spec to update.
-     * The `name` field is used to identify the spec to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiSpec field is set. - */ - public boolean hasApiSpec() { - return apiSpecBuilder_ != null || apiSpec_ != null; - } - /** - *
-     * Required. The spec to update.
-     * The `name` field is used to identify the spec to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiSpec. - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec() { - if (apiSpecBuilder_ == null) { - return apiSpec_ == null ? com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; - } else { - return apiSpecBuilder_.getMessage(); - } - } - /** - *
-     * Required. The spec to update.
-     * The `name` field is used to identify the spec to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiSpec(com.google.cloud.apigeeregistry.v1.ApiSpec value) { - if (apiSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - apiSpec_ = value; - onChanged(); - } else { - apiSpecBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The spec to update.
-     * The `name` field is used to identify the spec to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiSpec( - com.google.cloud.apigeeregistry.v1.ApiSpec.Builder builderForValue) { - if (apiSpecBuilder_ == null) { - apiSpec_ = builderForValue.build(); - onChanged(); - } else { - apiSpecBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The spec to update.
-     * The `name` field is used to identify the spec to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeApiSpec(com.google.cloud.apigeeregistry.v1.ApiSpec value) { - if (apiSpecBuilder_ == null) { - if (apiSpec_ != null) { - apiSpec_ = - com.google.cloud.apigeeregistry.v1.ApiSpec.newBuilder(apiSpec_).mergeFrom(value).buildPartial(); - } else { - apiSpec_ = value; - } - onChanged(); - } else { - apiSpecBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The spec to update.
-     * The `name` field is used to identify the spec to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearApiSpec() { - if (apiSpecBuilder_ == null) { - apiSpec_ = null; - onChanged(); - } else { - apiSpec_ = null; - apiSpecBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The spec to update.
-     * The `name` field is used to identify the spec to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpec.Builder getApiSpecBuilder() { - - onChanged(); - return getApiSpecFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The spec to update.
-     * The `name` field is used to identify the spec to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder() { - if (apiSpecBuilder_ != null) { - return apiSpecBuilder_.getMessageOrBuilder(); - } else { - return apiSpec_ == null ? - com.google.cloud.apigeeregistry.v1.ApiSpec.getDefaultInstance() : apiSpec_; - } - } - /** - *
-     * Required. The spec to update.
-     * The `name` field is used to identify the spec to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder> - getApiSpecFieldBuilder() { - if (apiSpecBuilder_ == null) { - apiSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiSpec, com.google.cloud.apigeeregistry.v1.ApiSpec.Builder, com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder>( - getApiSpec(), - getParentForChildren(), - isClean()); - apiSpec_ = null; - } - return apiSpecBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @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(); - } - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private boolean allowMissing_ ; - /** - *
-     * If set to true, and the spec is not found, a new spec will be created.
-     * In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - @java.lang.Override - public boolean getAllowMissing() { - return allowMissing_; - } - /** - *
-     * If set to true, and the spec is not found, a new spec will be created.
-     * In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @param value The allowMissing to set. - * @return This builder for chaining. - */ - public Builder setAllowMissing(boolean value) { - - allowMissing_ = value; - onChanged(); - return this; - } - /** - *
-     * If set to true, and the spec is not found, a new spec will be created.
-     * In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @return This builder for chaining. - */ - public Builder clearAllowMissing() { - - allowMissing_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) - private static final com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateApiSpecRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateApiSpecRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequestOrBuilder.java deleted file mode 100644 index 861f3f7a9945..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiSpecRequestOrBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface UpdateApiSpecRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The spec to update.
-   * The `name` field is used to identify the spec to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiSpec field is set. - */ - boolean hasApiSpec(); - /** - *
-   * Required. The spec to update.
-   * The `name` field is used to identify the spec to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiSpec. - */ - com.google.cloud.apigeeregistry.v1.ApiSpec getApiSpec(); - /** - *
-   * Required. The spec to update.
-   * The `name` field is used to identify the spec to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiSpec api_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.ApiSpecOrBuilder getApiSpecOrBuilder(); - - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - *
-   * If set to true, and the spec is not found, a new spec will be created.
-   * In this situation, `update_mask` is ignored.
-   * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - boolean getAllowMissing(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequest.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequest.java deleted file mode 100644 index 3ce4158ca094..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequest.java +++ /dev/null @@ -1,1046 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -/** - *
- * Request message for UpdateApiVersion.
- * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiVersionRequest} - */ -public final class UpdateApiVersionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) - UpdateApiVersionRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateApiVersionRequest.newBuilder() to construct. - private UpdateApiVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateApiVersionRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateApiVersionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateApiVersionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.apigeeregistry.v1.ApiVersion.Builder subBuilder = null; - if (apiVersion_ != null) { - subBuilder = apiVersion_.toBuilder(); - } - apiVersion_ = input.readMessage(com.google.cloud.apigeeregistry.v1.ApiVersion.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(apiVersion_); - apiVersion_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { - - allowMissing_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.Builder.class); - } - - public static final int API_VERSION_FIELD_NUMBER = 1; - private com.google.cloud.apigeeregistry.v1.ApiVersion apiVersion_; - /** - *
-   * Required. The version to update.
-   * The `name` field is used to identify the version to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiVersion field is set. - */ - @java.lang.Override - public boolean hasApiVersion() { - return apiVersion_ != null; - } - /** - *
-   * Required. The version to update.
-   * The `name` field is used to identify the version to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiVersion. - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion() { - return apiVersion_ == null ? com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; - } - /** - *
-   * Required. The version to update.
-   * The `name` field is used to identify the version to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder() { - return getApiVersion(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - public static final int ALLOW_MISSING_FIELD_NUMBER = 3; - private boolean allowMissing_; - /** - *
-   * If set to true, and the version is not found, a new version will be
-   * created. In this situation, `update_mask` is ignored.
-   * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - @java.lang.Override - public boolean getAllowMissing() { - return allowMissing_; - } - - 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 (apiVersion_ != null) { - output.writeMessage(1, getApiVersion()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - if (allowMissing_ != false) { - output.writeBool(3, allowMissing_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (apiVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getApiVersion()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - if (allowMissing_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, allowMissing_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest)) { - return super.equals(obj); - } - com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest other = (com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) obj; - - if (hasApiVersion() != other.hasApiVersion()) return false; - if (hasApiVersion()) { - if (!getApiVersion() - .equals(other.getApiVersion())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (getAllowMissing() - != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasApiVersion()) { - hash = (37 * hash) + API_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getApiVersion().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest 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.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest 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.apigeeregistry.v1.UpdateApiVersionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for UpdateApiVersion.
-   * 
- * - * Protobuf type {@code google.cloud.apigeeregistry.v1.UpdateApiVersionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) - com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.class, com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.Builder.class); - } - - // Construct using com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (apiVersionBuilder_ == null) { - apiVersion_ = null; - } else { - apiVersion_ = null; - apiVersionBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - allowMissing_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.apigeeregistry.v1.RegistryServiceProto.internal_static_google_cloud_apigeeregistry_v1_UpdateApiVersionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest getDefaultInstanceForType() { - return com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest build() { - com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest buildPartial() { - com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest result = new com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest(this); - if (apiVersionBuilder_ == null) { - result.apiVersion_ = apiVersion_; - } else { - result.apiVersion_ = apiVersionBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - result.allowMissing_ = allowMissing_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) { - return mergeFrom((com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest other) { - if (other == com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.getDefaultInstance()) return this; - if (other.hasApiVersion()) { - mergeApiVersion(other.getApiVersion()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.getAllowMissing() != false) { - setAllowMissing(other.getAllowMissing()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.apigeeregistry.v1.ApiVersion apiVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> apiVersionBuilder_; - /** - *
-     * Required. The version to update.
-     * The `name` field is used to identify the version to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiVersion field is set. - */ - public boolean hasApiVersion() { - return apiVersionBuilder_ != null || apiVersion_ != null; - } - /** - *
-     * Required. The version to update.
-     * The `name` field is used to identify the version to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiVersion. - */ - public com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion() { - if (apiVersionBuilder_ == null) { - return apiVersion_ == null ? com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; - } else { - return apiVersionBuilder_.getMessage(); - } - } - /** - *
-     * Required. The version to update.
-     * The `name` field is used to identify the version to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiVersion(com.google.cloud.apigeeregistry.v1.ApiVersion value) { - if (apiVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - apiVersion_ = value; - onChanged(); - } else { - apiVersionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The version to update.
-     * The `name` field is used to identify the version to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setApiVersion( - com.google.cloud.apigeeregistry.v1.ApiVersion.Builder builderForValue) { - if (apiVersionBuilder_ == null) { - apiVersion_ = builderForValue.build(); - onChanged(); - } else { - apiVersionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The version to update.
-     * The `name` field is used to identify the version to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeApiVersion(com.google.cloud.apigeeregistry.v1.ApiVersion value) { - if (apiVersionBuilder_ == null) { - if (apiVersion_ != null) { - apiVersion_ = - com.google.cloud.apigeeregistry.v1.ApiVersion.newBuilder(apiVersion_).mergeFrom(value).buildPartial(); - } else { - apiVersion_ = value; - } - onChanged(); - } else { - apiVersionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The version to update.
-     * The `name` field is used to identify the version to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearApiVersion() { - if (apiVersionBuilder_ == null) { - apiVersion_ = null; - onChanged(); - } else { - apiVersion_ = null; - apiVersionBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The version to update.
-     * The `name` field is used to identify the version to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiVersion.Builder getApiVersionBuilder() { - - onChanged(); - return getApiVersionFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The version to update.
-     * The `name` field is used to identify the version to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder() { - if (apiVersionBuilder_ != null) { - return apiVersionBuilder_.getMessageOrBuilder(); - } else { - return apiVersion_ == null ? - com.google.cloud.apigeeregistry.v1.ApiVersion.getDefaultInstance() : apiVersion_; - } - } - /** - *
-     * Required. The version to update.
-     * The `name` field is used to identify the version to update.
-     * Format: `projects/*/locations/*/apis/*/versions/*`
-     * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder> - getApiVersionFieldBuilder() { - if (apiVersionBuilder_ == null) { - apiVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.apigeeregistry.v1.ApiVersion, com.google.cloud.apigeeregistry.v1.ApiVersion.Builder, com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder>( - getApiVersion(), - getParentForChildren(), - isClean()); - apiVersion_ = null; - } - return apiVersionBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @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(); - } - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The list of fields to be updated. If omitted, all fields are updated that
-     * are set in the request message (fields set to default values are ignored).
-     * If an asterisk "*" is specified, all fields are updated, including fields
-     * that are unspecified/default in the request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private boolean allowMissing_ ; - /** - *
-     * If set to true, and the version is not found, a new version will be
-     * created. In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - @java.lang.Override - public boolean getAllowMissing() { - return allowMissing_; - } - /** - *
-     * If set to true, and the version is not found, a new version will be
-     * created. In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @param value The allowMissing to set. - * @return This builder for chaining. - */ - public Builder setAllowMissing(boolean value) { - - allowMissing_ = value; - onChanged(); - return this; - } - /** - *
-     * If set to true, and the version is not found, a new version will be
-     * created. In this situation, `update_mask` is ignored.
-     * 
- * - * bool allow_missing = 3; - * @return This builder for chaining. - */ - public Builder clearAllowMissing() { - - allowMissing_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) - private static final com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest(); - } - - public static com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateApiVersionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateApiVersionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequestOrBuilder.java b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequestOrBuilder.java deleted file mode 100644 index 3c6d21a9379f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/java/com/google/cloud/apigeeregistry/v1/UpdateApiVersionRequestOrBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/apigeeregistry/v1/registry_service.proto - -package com.google.cloud.apigeeregistry.v1; - -public interface UpdateApiVersionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The version to update.
-   * The `name` field is used to identify the version to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the apiVersion field is set. - */ - boolean hasApiVersion(); - /** - *
-   * Required. The version to update.
-   * The `name` field is used to identify the version to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The apiVersion. - */ - com.google.cloud.apigeeregistry.v1.ApiVersion getApiVersion(); - /** - *
-   * Required. The version to update.
-   * The `name` field is used to identify the version to update.
-   * Format: `projects/*/locations/*/apis/*/versions/*`
-   * 
- * - * .google.cloud.apigeeregistry.v1.ApiVersion api_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.apigeeregistry.v1.ApiVersionOrBuilder getApiVersionOrBuilder(); - - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The list of fields to be updated. If omitted, all fields are updated that
-   * are set in the request message (fields set to default values are ignored).
-   * If an asterisk "*" is specified, all fields are updated, including fields
-   * that are unspecified/default in the request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - *
-   * If set to true, and the version is not found, a new version will be
-   * created. In this situation, `update_mask` is ignored.
-   * 
- * - * bool allow_missing = 3; - * @return The allowMissing. - */ - boolean getAllowMissing(); -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/provisioning_service.proto b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/provisioning_service.proto deleted file mode 100644 index 9e7baee5866a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/provisioning_service.proto +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.apigeeregistry.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/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; -option java_multiple_files = true; -option java_outer_classname = "ProvisioningServiceProto"; -option java_package = "com.google.cloud.apigeeregistry.v1"; -option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1"; -option ruby_package = "Google::Cloud::ApigeeRegistry::V1"; - -// The service that is used for managing the data plane provisioning of the -// Registry. -service Provisioning { - option (google.api.default_host) = "apigeeregistry.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Provisions instance resources for the Registry. - rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/instances" - body: "instance" - }; - option (google.api.method_signature) = "parent,instance,instance_id"; - option (google.longrunning.operation_info) = { - response_type: "Instance" - metadata_type: "OperationMetadata" - }; - } - - // Deletes the Registry instance. - rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/instances/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Gets details of a single Instance. - rpc GetInstance(GetInstanceRequest) returns (Instance) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/instances/*}" - }; - option (google.api.method_signature) = "name"; - } -} - -// Request message for CreateInstance. -message CreateInstanceRequest { - // Required. Parent resource of the Instance, of the form: `projects/*/locations/*` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. Identifier to assign to the Instance. Must be unique within scope of the - // parent resource. - string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Instance. - Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for DeleteInstance. -message DeleteInstanceRequest { - // Required. The name of the Instance to delete. - // Format: `projects/*/locations/*/instances/*`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/Instance" - } - ]; -} - -// Request message for GetInstance. -message GetInstanceRequest { - // Required. The name of the Instance to retrieve. - // Format: `projects/*/locations/*/instances/*`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/Instance" - } - ]; -} - -// Represents the metadata of the long-running operation. -message OperationMetadata { - // The time the operation was created. - google.protobuf.Timestamp create_time = 1; - - // The time the operation finished running. - google.protobuf.Timestamp end_time = 2; - - // Server-defined resource path for the target of the operation. - string target = 3; - - // Name of the verb executed by the operation. - string verb = 4; - - // Human-readable status of the operation, if any. - string status_message = 5; - - // Identifies whether the user has requested cancellation - // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. - bool cancellation_requested = 6; - - // API version used to start the operation. - string api_version = 7; -} - -// An Instance represents the instance resources of the Registry. -// Currently, only one instance is allowed for each project. -message Instance { - option (google.api.resource) = { - type: "apigeeregistry.googleapis.com/Instance" - pattern: "projects/{project}/locations/{location}/instances/{instance}" - }; - - // State of the Instance. - enum State { - // The default value. This value is used if the state is omitted. - STATE_UNSPECIFIED = 0; - - // The Instance has not been initialized or has been deleted. - INACTIVE = 1; - - // The Instance is being created. - CREATING = 2; - - // The Instance has been created and is ready for use. - ACTIVE = 3; - - // The Instance is being updated. - UPDATING = 4; - - // The Instance is being deleted. - DELETING = 5; - - // The Instance encountered an error during a state change. - FAILED = 6; - } - - // Available configurations to provision an Instance. - message Config { - // Output only. The GCP location where the Instance resides. - string location = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The Customer Managed Encryption Key (CMEK) used for data encryption. - // The CMEK name should follow the format of - // `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`, - // where the `location` must match InstanceConfig.location. - string cmek_key_name = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Format: `projects/*/locations/*/instance`. - // Currently only `locations/global` is supported. - string name = 1; - - // Output only. Creation timestamp. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Last update timestamp. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the Instance. - State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Extra information of Instance.State if the state is `FAILED`. - string state_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Config of the Instance. - Config config = 6 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_models.proto b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_models.proto deleted file mode 100644 index 8411f9ecf7ff..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_models.proto +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.apigeeregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; -option java_multiple_files = true; -option java_outer_classname = "RegistryModelsProto"; -option java_package = "com.google.cloud.apigeeregistry.v1"; -option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1"; -option ruby_package = "Google::Cloud::ApigeeRegistry::V1"; - -// A top-level description of an API. -// Produced by producers and are commitments to provide services. -message Api { - option (google.api.resource) = { - type: "apigeeregistry.googleapis.com/Api" - pattern: "projects/{project}/locations/{location}/apis/{api}" - }; - - // Resource name. - string name = 1; - - // Human-meaningful name. - string display_name = 2; - - // A detailed description. - string description = 3; - - // Output only. Creation timestamp. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Last update timestamp. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A user-definable description of the availability of this service. - // Format: free-form, but we expect single words that describe availability, - // e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN". - string availability = 6; - - // The recommended version of the API. - // Format: `apis/{api}/versions/{version}` - string recommended_version = 7 [(google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiVersion" - }]; - - // The recommended deployment of the API. - // Format: `apis/{api}/deployments/{deployment}` - string recommended_deployment = 8 [(google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiDeployment" - }]; - - // Labels attach identifying metadata to resources. Identifying metadata can - // be used to filter list operations. - // - // Label keys and values can be no longer than 64 characters - // (Unicode codepoints), can only contain lowercase letters, numeric - // characters, underscores, and dashes. International characters are allowed. - // No more than 64 user labels can be associated with one resource (System - // labels are excluded). - // - // See https://goo.gl/xmQnxf for more information and examples of labels. - // System reserved label keys are prefixed with - // `apigeeregistry.googleapis.com/` and cannot be changed. - map labels = 9; - - // Annotations attach non-identifying metadata to resources. - // - // Annotation keys and values are less restricted than those of labels, but - // should be generally used for small values of broad interest. Larger, topic- - // specific metadata should be stored in Artifacts. - map annotations = 10; -} - -// Describes a particular version of an API. -// ApiVersions are what consumers actually use. -message ApiVersion { - option (google.api.resource) = { - type: "apigeeregistry.googleapis.com/ApiVersion" - pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}" - }; - - // Resource name. - string name = 1; - - // Human-meaningful name. - string display_name = 2; - - // A detailed description. - string description = 3; - - // Output only. Creation timestamp. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Last update timestamp. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A user-definable description of the lifecycle phase of this API version. - // Format: free-form, but we expect single words that describe API maturity, - // e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", - // "DEPRECATED", "RETIRED". - string state = 6; - - // Labels attach identifying metadata to resources. Identifying metadata can - // be used to filter list operations. - // - // Label keys and values can be no longer than 64 characters - // (Unicode codepoints), can only contain lowercase letters, numeric - // characters, underscores and dashes. International characters are allowed. - // No more than 64 user labels can be associated with one resource (System - // labels are excluded). - // - // See https://goo.gl/xmQnxf for more information and examples of labels. - // System reserved label keys are prefixed with - // `apigeeregistry.googleapis.com/` and cannot be changed. - map labels = 7; - - // Annotations attach non-identifying metadata to resources. - // - // Annotation keys and values are less restricted than those of labels, but - // should be generally used for small values of broad interest. Larger, topic- - // specific metadata should be stored in Artifacts. - map annotations = 8; -} - -// Describes a version of an API in a structured way. -// ApiSpecs provide formal descriptions that consumers can use to use a version. -// ApiSpec resources are intended to be fully-resolved descriptions of an -// ApiVersion. When specs consist of multiple files, these should be bundled -// together (e.g., in a zip archive) and stored as a unit. Multiple specs can -// exist to provide representations in different API description formats. -// Synchronization of these representations would be provided by tooling and -// background services. -message ApiSpec { - option (google.api.resource) = { - type: "apigeeregistry.googleapis.com/ApiSpec" - pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}" - }; - - // Resource name. - string name = 1; - - // A possibly-hierarchical name used to refer to the spec from other specs. - string filename = 2; - - // A detailed description. - string description = 3; - - // Output only. Immutable. The revision ID of the spec. - // A new revision is committed whenever the spec contents are changed. - // The format is an 8-character hexadecimal string. - string revision_id = 4 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Output only. Creation timestamp; when the spec resource was created. - google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Revision creation timestamp; when the represented revision was created. - google.protobuf.Timestamp revision_create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Last update timestamp: when the represented revision was last modified. - google.protobuf.Timestamp revision_update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A style (format) descriptor for this spec that is specified as a Media Type - // (https://en.wikipedia.org/wiki/Media_type). Possible values include - // `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and - // `application/vnd.apigee.graphql`, with possible suffixes representing - // compression types. These hypothetical names are defined in the vendor tree - // defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. - // Content types can specify compression. Currently only GZip compression is - // supported (indicated with "+gzip"). - string mime_type = 8; - - // Output only. The size of the spec file in bytes. If the spec is gzipped, this is the - // size of the uncompressed spec. - int32 size_bytes = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is - // the hash of the uncompressed spec. - string hash = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The original source URI of the spec (if one exists). - // This is an external location that can be used for reference purposes - // but which may not be authoritative since this external resource may - // change after the spec is retrieved. - string source_uri = 11; - - // Input only. The contents of the spec. - // Provided by API callers when specs are created or updated. - // To access the contents of a spec, use GetApiSpecContents. - bytes contents = 12 [(google.api.field_behavior) = INPUT_ONLY]; - - // Labels attach identifying metadata to resources. Identifying metadata can - // be used to filter list operations. - // - // Label keys and values can be no longer than 64 characters - // (Unicode codepoints), can only contain lowercase letters, numeric - // characters, underscores and dashes. International characters are allowed. - // No more than 64 user labels can be associated with one resource (System - // labels are excluded). - // - // See https://goo.gl/xmQnxf for more information and examples of labels. - // System reserved label keys are prefixed with - // `apigeeregistry.googleapis.com/` and cannot be changed. - map labels = 14; - - // Annotations attach non-identifying metadata to resources. - // - // Annotation keys and values are less restricted than those of labels, but - // should be generally used for small values of broad interest. Larger, topic- - // specific metadata should be stored in Artifacts. - map annotations = 15; -} - -// Describes a service running at particular address that -// provides a particular version of an API. ApiDeployments have revisions which -// correspond to different configurations of a single deployment in time. -// Revision identifiers should be updated whenever the served API spec or -// endpoint address changes. -message ApiDeployment { - option (google.api.resource) = { - type: "apigeeregistry.googleapis.com/ApiDeployment" - pattern: "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}" - }; - - // Resource name. - string name = 1; - - // Human-meaningful name. - string display_name = 2; - - // A detailed description. - string description = 3; - - // Output only. Immutable. The revision ID of the deployment. - // A new revision is committed whenever the deployment contents are changed. - // The format is an 8-character hexadecimal string. - string revision_id = 4 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Output only. Creation timestamp; when the deployment resource was created. - google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Revision creation timestamp; when the represented revision was created. - google.protobuf.Timestamp revision_create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Last update timestamp: when the represented revision was last modified. - google.protobuf.Timestamp revision_update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The full resource name (including revision ID) of the spec of the API being - // served by the deployment. Changes to this value will update the revision. - // Format: `apis/{api}/deployments/{deployment}` - string api_spec_revision = 8 [(google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiSpec" - }]; - - // The address where the deployment is serving. Changes to this value will - // update the revision. - string endpoint_uri = 9; - - // The address of the external channel of the API (e.g., the Developer - // Portal). Changes to this value will not affect the revision. - string external_channel_uri = 10; - - // Text briefly identifying the intended audience of the API. Changes to this - // value will not affect the revision. - string intended_audience = 11; - - // Text briefly describing how to access the endpoint. Changes to this value - // will not affect the revision. - string access_guidance = 12; - - // Labels attach identifying metadata to resources. Identifying metadata can - // be used to filter list operations. - // - // Label keys and values can be no longer than 64 characters - // (Unicode codepoints), can only contain lowercase letters, numeric - // characters, underscores and dashes. International characters are allowed. - // No more than 64 user labels can be associated with one resource (System - // labels are excluded). - // - // See https://goo.gl/xmQnxf for more information and examples of labels. - // System reserved label keys are prefixed with - // `apigeeregistry.googleapis.com/` and cannot be changed. - map labels = 14; - - // Annotations attach non-identifying metadata to resources. - // - // Annotation keys and values are less restricted than those of labels, but - // should be generally used for small values of broad interest. Larger, topic- - // specific metadata should be stored in Artifacts. - map annotations = 15; -} - -// Artifacts of resources. Artifacts are unique (single-value) per resource -// and are used to store metadata that is too large or numerous to be stored -// directly on the resource. Since artifacts are stored separately from parent -// resources, they should generally be used for metadata that is needed -// infrequently, i.e., not for display in primary views of the resource but -// perhaps displayed or downloaded upon request. The `ListArtifacts` method -// allows artifacts to be quickly enumerated and checked for presence without -// downloading their (potentially-large) contents. -message Artifact { - option (google.api.resource) = { - type: "apigeeregistry.googleapis.com/Artifact" - pattern: "projects/{project}/locations/{location}/artifacts/{artifact}" - pattern: "projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}" - pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}" - pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}" - pattern: "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}" - }; - - // Resource name. - string name = 1; - - // Output only. Creation timestamp. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Last update timestamp. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A content type specifier for the artifact. - // Content type specifiers are Media Types - // (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" - // parameter that specifies a schema for the stored information. - // Content types can specify compression. Currently only GZip compression is - // supported (indicated with "+gzip"). - string mime_type = 4; - - // Output only. The size of the artifact in bytes. If the artifact is gzipped, this is - // the size of the uncompressed artifact. - int32 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, - // this is the hash of the uncompressed artifact. - string hash = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Input only. The contents of the artifact. - // Provided by API callers when artifacts are created or replaced. - // To access the contents of an artifact, use GetArtifactContents. - bytes contents = 7 [(google.api.field_behavior) = INPUT_ONLY]; -} diff --git a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_service.proto b/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_service.proto deleted file mode 100644 index 1eec64e8b8f2..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/proto-google-cloud-apigee-registry-v1/src/main/proto/google/cloud/apigeeregistry/v1/registry_service.proto +++ /dev/null @@ -1,1133 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.apigeeregistry.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/httpbody.proto"; -import "google/api/resource.proto"; -import "google/cloud/apigeeregistry/v1/registry_models.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; -option java_multiple_files = true; -option java_outer_classname = "RegistryServiceProto"; -option java_package = "com.google.cloud.apigeeregistry.v1"; -option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1"; -option ruby_package = "Google::Cloud::ApigeeRegistry::V1"; - -// The Registry service allows teams to manage descriptions of APIs. -service Registry { - option (google.api.default_host) = "apigeeregistry.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Returns matching APIs. - rpc ListApis(ListApisRequest) returns (ListApisResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/apis" - }; - option (google.api.method_signature) = "parent"; - } - - // Returns a specified API. - rpc GetApi(GetApiRequest) returns (Api) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/apis/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a specified API. - rpc CreateApi(CreateApiRequest) returns (Api) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/apis" - body: "api" - }; - option (google.api.method_signature) = "parent,api,api_id"; - } - - // Used to modify a specified API. - rpc UpdateApi(UpdateApiRequest) returns (Api) { - option (google.api.http) = { - patch: "/v1/{api.name=projects/*/locations/*/apis/*}" - body: "api" - }; - option (google.api.method_signature) = "api,update_mask"; - } - - // Removes a specified API and all of the resources that it - // owns. - rpc DeleteApi(DeleteApiRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/apis/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Returns matching versions. - rpc ListApiVersions(ListApiVersionsRequest) returns (ListApiVersionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/apis/*}/versions" - }; - option (google.api.method_signature) = "parent"; - } - - // Returns a specified version. - rpc GetApiVersion(GetApiVersionRequest) returns (ApiVersion) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/apis/*/versions/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a specified version. - rpc CreateApiVersion(CreateApiVersionRequest) returns (ApiVersion) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/apis/*}/versions" - body: "api_version" - }; - option (google.api.method_signature) = "parent,api_version,api_version_id"; - } - - // Used to modify a specified version. - rpc UpdateApiVersion(UpdateApiVersionRequest) returns (ApiVersion) { - option (google.api.http) = { - patch: "/v1/{api_version.name=projects/*/locations/*/apis/*/versions/*}" - body: "api_version" - }; - option (google.api.method_signature) = "api_version,update_mask"; - } - - // Removes a specified version and all of the resources that - // it owns. - rpc DeleteApiVersion(DeleteApiVersionRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Returns matching specs. - rpc ListApiSpecs(ListApiSpecsRequest) returns (ListApiSpecsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs" - }; - option (google.api.method_signature) = "parent"; - } - - // Returns a specified spec. - rpc GetApiSpec(GetApiSpecRequest) returns (ApiSpec) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Returns the contents of a specified spec. - // If specs are stored with GZip compression, the default behavior - // is to return the spec uncompressed (the mime_type response field - // indicates the exact format returned). - rpc GetApiSpecContents(GetApiSpecContentsRequest) returns (google.api.HttpBody) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:getContents" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a specified spec. - rpc CreateApiSpec(CreateApiSpecRequest) returns (ApiSpec) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs" - body: "api_spec" - }; - option (google.api.method_signature) = "parent,api_spec,api_spec_id"; - } - - // Used to modify a specified spec. - rpc UpdateApiSpec(UpdateApiSpecRequest) returns (ApiSpec) { - option (google.api.http) = { - patch: "/v1/{api_spec.name=projects/*/locations/*/apis/*/versions/*/specs/*}" - body: "api_spec" - }; - option (google.api.method_signature) = "api_spec,update_mask"; - } - - // Removes a specified spec, all revisions, and all child - // resources (e.g., artifacts). - rpc DeleteApiSpec(DeleteApiSpecRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Adds a tag to a specified revision of a spec. - rpc TagApiSpecRevision(TagApiSpecRevisionRequest) returns (ApiSpec) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision" - body: "*" - }; - } - - // Lists all revisions of a spec. - // Revisions are returned in descending order of revision creation time. - rpc ListApiSpecRevisions(ListApiSpecRevisionsRequest) returns (ListApiSpecRevisionsResponse) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:listRevisions" - }; - } - - // Sets the current revision to a specified prior revision. - // Note that this creates a new revision with a new revision ID. - rpc RollbackApiSpec(RollbackApiSpecRequest) returns (ApiSpec) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:rollback" - body: "*" - }; - } - - // Deletes a revision of a spec. - rpc DeleteApiSpecRevision(DeleteApiSpecRevisionRequest) returns (ApiSpec) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision" - }; - option (google.api.method_signature) = "name"; - } - - // Returns matching deployments. - rpc ListApiDeployments(ListApiDeploymentsRequest) returns (ListApiDeploymentsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/apis/*}/deployments" - }; - option (google.api.method_signature) = "parent"; - } - - // Returns a specified deployment. - rpc GetApiDeployment(GetApiDeploymentRequest) returns (ApiDeployment) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a specified deployment. - rpc CreateApiDeployment(CreateApiDeploymentRequest) returns (ApiDeployment) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/apis/*}/deployments" - body: "api_deployment" - }; - option (google.api.method_signature) = "parent,api_deployment,api_deployment_id"; - } - - // Used to modify a specified deployment. - rpc UpdateApiDeployment(UpdateApiDeploymentRequest) returns (ApiDeployment) { - option (google.api.http) = { - patch: "/v1/{api_deployment.name=projects/*/locations/*/apis/*/deployments/*}" - body: "api_deployment" - }; - option (google.api.method_signature) = "api_deployment,update_mask"; - } - - // Removes a specified deployment, all revisions, and all - // child resources (e.g., artifacts). - rpc DeleteApiDeployment(DeleteApiDeploymentRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Adds a tag to a specified revision of a - // deployment. - rpc TagApiDeploymentRevision(TagApiDeploymentRevisionRequest) returns (ApiDeployment) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:tagRevision" - body: "*" - }; - } - - // Lists all revisions of a deployment. - // Revisions are returned in descending order of revision creation time. - rpc ListApiDeploymentRevisions(ListApiDeploymentRevisionsRequest) returns (ListApiDeploymentRevisionsResponse) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:listRevisions" - }; - } - - // Sets the current revision to a specified prior - // revision. Note that this creates a new revision with a new revision ID. - rpc RollbackApiDeployment(RollbackApiDeploymentRequest) returns (ApiDeployment) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:rollback" - body: "*" - }; - } - - // Deletes a revision of a deployment. - rpc DeleteApiDeploymentRevision(DeleteApiDeploymentRevisionRequest) returns (ApiDeployment) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision" - }; - option (google.api.method_signature) = "name"; - } - - // Returns matching artifacts. - rpc ListArtifacts(ListArtifactsRequest) returns (ListArtifactsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/artifacts" - additional_bindings { - get: "/v1/{parent=projects/*/locations/*/apis/*}/artifacts" - } - additional_bindings { - get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts" - } - additional_bindings { - get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts" - } - additional_bindings { - get: "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Returns a specified artifact. - rpc GetArtifact(GetArtifactRequest) returns (Artifact) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/artifacts/*}" - additional_bindings { - get: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}" - } - additional_bindings { - get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}" - } - additional_bindings { - get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}" - } - additional_bindings { - get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Returns the contents of a specified artifact. - // If artifacts are stored with GZip compression, the default behavior - // is to return the artifact uncompressed (the mime_type response field - // indicates the exact format returned). - rpc GetArtifactContents(GetArtifactContentsRequest) returns (google.api.HttpBody) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/artifacts/*}:getContents" - additional_bindings { - get: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}:getContents" - } - additional_bindings { - get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getContents" - } - additional_bindings { - get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getContents" - } - additional_bindings { - get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:getContents" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a specified artifact. - rpc CreateArtifact(CreateArtifactRequest) returns (Artifact) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/artifacts" - body: "artifact" - additional_bindings { - post: "/v1/{parent=projects/*/locations/*/apis/*}/artifacts" - body: "artifact" - } - additional_bindings { - post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts" - body: "artifact" - } - additional_bindings { - post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts" - body: "artifact" - } - additional_bindings { - post: "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts" - body: "artifact" - } - }; - option (google.api.method_signature) = "parent,artifact,artifact_id"; - } - - // Used to replace a specified artifact. - rpc ReplaceArtifact(ReplaceArtifactRequest) returns (Artifact) { - option (google.api.http) = { - put: "/v1/{artifact.name=projects/*/locations/*/artifacts/*}" - body: "artifact" - additional_bindings { - put: "/v1/{artifact.name=projects/*/locations/*/apis/*/artifacts/*}" - body: "artifact" - } - additional_bindings { - put: "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/artifacts/*}" - body: "artifact" - } - additional_bindings { - put: "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}" - body: "artifact" - } - additional_bindings { - put: "/v1/{artifact.name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}" - body: "artifact" - } - }; - option (google.api.method_signature) = "artifact"; - } - - // Removes a specified artifact. - rpc DeleteArtifact(DeleteArtifactRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/artifacts/*}" - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}" - } - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}" - } - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}" - } - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// Request message for ListApis. -message ListApisRequest { - // Required. The parent, which owns this collection of APIs. - // Format: `projects/*/locations/*` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "apigeeregistry.googleapis.com/Api" - } - ]; - - // The maximum number of APIs to return. - // The service may return fewer than this value. - // If unspecified, at most 50 values will be returned. - // The maximum is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2; - - // A page token, received from a previous `ListApis` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListApis` must match - // the call that provided the page token. - string page_token = 3; - - // An expression that can be used to filter the list. Filters use the Common - // Expression Language and can refer to all message fields. - string filter = 4; -} - -// Response message for ListApis. -message ListApisResponse { - // The APIs from the specified publisher. - repeated Api apis = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// Request message for GetApi. -message GetApiRequest { - // Required. The name of the API to retrieve. - // Format: `projects/*/locations/*/apis/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/Api" - } - ]; -} - -// Request message for CreateApi. -message CreateApiRequest { - // Required. The parent, which owns this collection of APIs. - // Format: `projects/*/locations/*` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "apigeeregistry.googleapis.com/Api" - } - ]; - - // Required. The API to create. - Api api = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID to use for the API, which will become the final component of - // the API's resource name. - // - // This value should be 4-63 characters, and valid characters - // are /[a-z][0-9]-/. - // - // Following AIP-162, IDs must not have the form of a UUID. - string api_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for UpdateApi. -message UpdateApiRequest { - // Required. The API to update. - // - // The `name` field is used to identify the API to update. - // Format: `projects/*/locations/*/apis/*` - Api api = 1 [(google.api.field_behavior) = REQUIRED]; - - // The list of fields to be updated. If omitted, all fields are updated that - // are set in the request message (fields set to default values are ignored). - // If an asterisk "*" is specified, all fields are updated, including fields - // that are unspecified/default in the request. - google.protobuf.FieldMask update_mask = 2; - - // If set to true, and the API is not found, a new API will be created. - // In this situation, `update_mask` is ignored. - bool allow_missing = 3; -} - -// Request message for DeleteApi. -message DeleteApiRequest { - // Required. The name of the API to delete. - // Format: `projects/*/locations/*/apis/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/Api" - } - ]; - - // If set to true, any child resources will also be deleted. - // (Otherwise, the request will only work if there are no child resources.) - bool force = 2; -} - -// Request message for ListApiVersions. -message ListApiVersionsRequest { - // Required. The parent, which owns this collection of versions. - // Format: `projects/*/locations/*/apis/*` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "apigeeregistry.googleapis.com/ApiVersion" - } - ]; - - // The maximum number of versions to return. - // The service may return fewer than this value. - // If unspecified, at most 50 values will be returned. - // The maximum is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2; - - // A page token, received from a previous `ListApiVersions` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListApiVersions` must - // match the call that provided the page token. - string page_token = 3; - - // An expression that can be used to filter the list. Filters use the Common - // Expression Language and can refer to all message fields. - string filter = 4; -} - -// Response message for ListApiVersions. -message ListApiVersionsResponse { - // The versions from the specified publisher. - repeated ApiVersion api_versions = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// Request message for GetApiVersion. -message GetApiVersionRequest { - // Required. The name of the version to retrieve. - // Format: `projects/*/locations/*/apis/*/versions/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiVersion" - } - ]; -} - -// Request message for CreateApiVersion. -message CreateApiVersionRequest { - // Required. The parent, which owns this collection of versions. - // Format: `projects/*/locations/*/apis/*` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "apigeeregistry.googleapis.com/ApiVersion" - } - ]; - - // Required. The version to create. - ApiVersion api_version = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID to use for the version, which will become the final component of - // the version's resource name. - // - // This value should be 1-63 characters, and valid characters - // are /[a-z][0-9]-/. - // - // Following AIP-162, IDs must not have the form of a UUID. - string api_version_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for UpdateApiVersion. -message UpdateApiVersionRequest { - // Required. The version to update. - // - // The `name` field is used to identify the version to update. - // Format: `projects/*/locations/*/apis/*/versions/*` - ApiVersion api_version = 1 [(google.api.field_behavior) = REQUIRED]; - - // The list of fields to be updated. If omitted, all fields are updated that - // are set in the request message (fields set to default values are ignored). - // If an asterisk "*" is specified, all fields are updated, including fields - // that are unspecified/default in the request. - google.protobuf.FieldMask update_mask = 2; - - // If set to true, and the version is not found, a new version will be - // created. In this situation, `update_mask` is ignored. - bool allow_missing = 3; -} - -// Request message for DeleteApiVersion. -message DeleteApiVersionRequest { - // Required. The name of the version to delete. - // Format: `projects/*/locations/*/apis/*/versions/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiVersion" - } - ]; - - // If set to true, any child resources will also be deleted. - // (Otherwise, the request will only work if there are no child resources.) - bool force = 2; -} - -// Request message for ListApiSpecs. -message ListApiSpecsRequest { - // Required. The parent, which owns this collection of specs. - // Format: `projects/*/locations/*/apis/*/versions/*` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "apigeeregistry.googleapis.com/ApiSpec" - } - ]; - - // The maximum number of specs to return. - // The service may return fewer than this value. - // If unspecified, at most 50 values will be returned. - // The maximum is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2; - - // A page token, received from a previous `ListApiSpecs` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListApiSpecs` must match - // the call that provided the page token. - string page_token = 3; - - // An expression that can be used to filter the list. Filters use the Common - // Expression Language and can refer to all message fields except contents. - string filter = 4; -} - -// Response message for ListApiSpecs. -message ListApiSpecsResponse { - // The specs from the specified publisher. - repeated ApiSpec api_specs = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// Request message for GetApiSpec. -message GetApiSpecRequest { - // Required. The name of the spec to retrieve. - // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiSpec" - } - ]; -} - -// Request message for GetApiSpecContents. -message GetApiSpecContentsRequest { - // Required. The name of the spec whose contents should be retrieved. - // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiSpec" - } - ]; -} - -// Request message for CreateApiSpec. -message CreateApiSpecRequest { - // Required. The parent, which owns this collection of specs. - // Format: `projects/*/locations/*/apis/*/versions/*` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "apigeeregistry.googleapis.com/ApiSpec" - } - ]; - - // Required. The spec to create. - ApiSpec api_spec = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID to use for the spec, which will become the final component of - // the spec's resource name. - // - // This value should be 4-63 characters, and valid characters - // are /[a-z][0-9]-/. - // - // Following AIP-162, IDs must not have the form of a UUID. - string api_spec_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for UpdateApiSpec. -message UpdateApiSpecRequest { - // Required. The spec to update. - // - // The `name` field is used to identify the spec to update. - // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - ApiSpec api_spec = 1 [(google.api.field_behavior) = REQUIRED]; - - // The list of fields to be updated. If omitted, all fields are updated that - // are set in the request message (fields set to default values are ignored). - // If an asterisk "*" is specified, all fields are updated, including fields - // that are unspecified/default in the request. - google.protobuf.FieldMask update_mask = 2; - - // If set to true, and the spec is not found, a new spec will be created. - // In this situation, `update_mask` is ignored. - bool allow_missing = 3; -} - -// Request message for DeleteApiSpec. -message DeleteApiSpecRequest { - // Required. The name of the spec to delete. - // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiSpec" - } - ]; - - // If set to true, any child resources will also be deleted. - // (Otherwise, the request will only work if there are no child resources.) - bool force = 2; -} - -// Request message for TagApiSpecRevision. -message TagApiSpecRevisionRequest { - // Required. The name of the spec to be tagged, including the revision ID. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiSpec" - } - ]; - - // Required. The tag to apply. - // The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - string tag = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for ListApiSpecRevisions. -message ListApiSpecRevisionsRequest { - // Required. The name of the spec to list revisions for. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiSpec" - } - ]; - - // The maximum number of revisions to return per page. - int32 page_size = 2; - - // The page token, received from a previous ListApiSpecRevisions call. - // Provide this to retrieve the subsequent page. - string page_token = 3; -} - -// Response message for ListApiSpecRevisionsResponse. -message ListApiSpecRevisionsResponse { - // The revisions of the spec. - repeated ApiSpec api_specs = 1; - - // A token that can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// Request message for RollbackApiSpec. -message RollbackApiSpecRequest { - // Required. The spec being rolled back. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiSpec" - } - ]; - - // Required. The revision ID to roll back to. - // It must be a revision of the same spec. - // - // Example: `c7cfa2a8` - string revision_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for DeleteApiSpecRevision. -message DeleteApiSpecRevisionRequest { - // Required. The name of the spec revision to be deleted, - // with a revision ID explicitly included. - // - // Example: - // `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiSpec" - } - ]; -} - -// Request message for ListApiDeployments. -message ListApiDeploymentsRequest { - // Required. The parent, which owns this collection of deployments. - // Format: `projects/*/locations/*/apis/*` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "apigeeregistry.googleapis.com/ApiDeployment" - } - ]; - - // The maximum number of deployments to return. - // The service may return fewer than this value. - // If unspecified, at most 50 values will be returned. - // The maximum is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2; - - // A page token, received from a previous `ListApiDeployments` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListApiDeployments` must - // match the call that provided the page token. - string page_token = 3; - - // An expression that can be used to filter the list. Filters use the Common - // Expression Language and can refer to all message fields. - string filter = 4; -} - -// Response message for ListApiDeployments. -message ListApiDeploymentsResponse { - // The deployments from the specified publisher. - repeated ApiDeployment api_deployments = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// Request message for GetApiDeployment. -message GetApiDeploymentRequest { - // Required. The name of the deployment to retrieve. - // Format: `projects/*/locations/*/apis/*/deployments/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiDeployment" - } - ]; -} - -// Request message for CreateApiDeployment. -message CreateApiDeploymentRequest { - // Required. The parent, which owns this collection of deployments. - // Format: `projects/*/locations/*/apis/*` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "apigeeregistry.googleapis.com/ApiDeployment" - } - ]; - - // Required. The deployment to create. - ApiDeployment api_deployment = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID to use for the deployment, which will become the final component of - // the deployment's resource name. - // - // This value should be 4-63 characters, and valid characters - // are /[a-z][0-9]-/. - // - // Following AIP-162, IDs must not have the form of a UUID. - string api_deployment_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for UpdateApiDeployment. -message UpdateApiDeploymentRequest { - // Required. The deployment to update. - // - // The `name` field is used to identify the deployment to update. - // Format: `projects/*/locations/*/apis/*/deployments/*` - ApiDeployment api_deployment = 1 [(google.api.field_behavior) = REQUIRED]; - - // The list of fields to be updated. If omitted, all fields are updated that - // are set in the request message (fields set to default values are ignored). - // If an asterisk "*" is specified, all fields are updated, including fields - // that are unspecified/default in the request. - google.protobuf.FieldMask update_mask = 2; - - // If set to true, and the deployment is not found, a new deployment will be - // created. In this situation, `update_mask` is ignored. - bool allow_missing = 3; -} - -// Request message for DeleteApiDeployment. -message DeleteApiDeploymentRequest { - // Required. The name of the deployment to delete. - // Format: `projects/*/locations/*/apis/*/deployments/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiDeployment" - } - ]; - - // If set to true, any child resources will also be deleted. - // (Otherwise, the request will only work if there are no child resources.) - bool force = 2; -} - -// Request message for TagApiDeploymentRevision. -message TagApiDeploymentRevisionRequest { - // Required. The name of the deployment to be tagged, including the revision ID. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiDeployment" - } - ]; - - // Required. The tag to apply. - // The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - string tag = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for ListApiDeploymentRevisions. -message ListApiDeploymentRevisionsRequest { - // Required. The name of the deployment to list revisions for. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiDeployment" - } - ]; - - // The maximum number of revisions to return per page. - int32 page_size = 2; - - // The page token, received from a previous ListApiDeploymentRevisions call. - // Provide this to retrieve the subsequent page. - string page_token = 3; -} - -// Response message for ListApiDeploymentRevisionsResponse. -message ListApiDeploymentRevisionsResponse { - // The revisions of the deployment. - repeated ApiDeployment api_deployments = 1; - - // A token that can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// Request message for RollbackApiDeployment. -message RollbackApiDeploymentRequest { - // Required. The deployment being rolled back. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiDeployment" - } - ]; - - // Required. The revision ID to roll back to. - // It must be a revision of the same deployment. - // - // Example: `c7cfa2a8` - string revision_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for DeleteApiDeploymentRevision. -message DeleteApiDeploymentRevisionRequest { - // Required. The name of the deployment revision to be deleted, - // with a revision ID explicitly included. - // - // Example: - // `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/ApiDeployment" - } - ]; -} - -// Request message for ListArtifacts. -message ListArtifactsRequest { - // Required. The parent, which owns this collection of artifacts. - // Format: `{parent}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "apigeeregistry.googleapis.com/Artifact" - } - ]; - - // The maximum number of artifacts to return. - // The service may return fewer than this value. - // If unspecified, at most 50 values will be returned. - // The maximum is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2; - - // A page token, received from a previous `ListArtifacts` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListArtifacts` must - // match the call that provided the page token. - string page_token = 3; - - // An expression that can be used to filter the list. Filters use the Common - // Expression Language and can refer to all message fields except contents. - string filter = 4; -} - -// Response message for ListArtifacts. -message ListArtifactsResponse { - // The artifacts from the specified publisher. - repeated Artifact artifacts = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// Request message for GetArtifact. -message GetArtifactRequest { - // Required. The name of the artifact to retrieve. - // Format: `{parent}/artifacts/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/Artifact" - } - ]; -} - -// Request message for GetArtifactContents. -message GetArtifactContentsRequest { - // Required. The name of the artifact whose contents should be retrieved. - // Format: `{parent}/artifacts/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/Artifact" - } - ]; -} - -// Request message for CreateArtifact. -message CreateArtifactRequest { - // Required. The parent, which owns this collection of artifacts. - // Format: `{parent}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "apigeeregistry.googleapis.com/Artifact" - } - ]; - - // Required. The artifact to create. - Artifact artifact = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID to use for the artifact, which will become the final component of - // the artifact's resource name. - // - // This value should be 4-63 characters, and valid characters - // are /[a-z][0-9]-/. - // - // Following AIP-162, IDs must not have the form of a UUID. - string artifact_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for ReplaceArtifact. -message ReplaceArtifactRequest { - // Required. The artifact to replace. - // - // The `name` field is used to identify the artifact to replace. - // Format: `{parent}/artifacts/*` - Artifact artifact = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for DeleteArtifact. -message DeleteArtifactRequest { - // Required. The name of the artifact to delete. - // Format: `{parent}/artifacts/*` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "apigeeregistry.googleapis.com/Artifact" - } - ]; -} diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 7ed2b66cc1a2..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.cloud.apigeeregistry.v1.ProvisioningSettings; -import com.google.cloud.apigeeregistry.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 for illustrative purposes only. - // It may require modifications to work in your environment. - ProvisioningSettings provisioningSettings = - ProvisioningSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings); - } -} -// [END apigeeregistry_v1_generated_provisioningclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 9c595e67ae4c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_create_setcredentialsprovider1_sync] -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.cloud.apigeeregistry.v1.ProvisioningSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - ProvisioningSettings provisioningSettings = - ProvisioningSettings.newBuilder() - .setTransportChannelProvider( - ProvisioningSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings); - } -} -// [END apigeeregistry_v1_generated_provisioningclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index a7932a245133..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_create_setendpoint_sync] -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.cloud.apigeeregistry.v1.ProvisioningSettings; -import com.google.cloud.apigeeregistry.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 for illustrative purposes only. - // It may require modifications to work in your environment. - ProvisioningSettings provisioningSettings = - ProvisioningSettings.newBuilder().setEndpoint(myEndpoint).build(); - ProvisioningClient provisioningClient = ProvisioningClient.create(provisioningSettings); - } -} -// [END apigeeregistry_v1_generated_provisioningclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstance.java deleted file mode 100644 index 2f07bdb318e7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstance.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_createinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.CreateInstanceRequest; -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.longrunning.Operation; - -public class AsyncCreateInstance { - - public static void main(String[] args) throws Exception { - asyncCreateInstance(); - } - - public static void asyncCreateInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInstanceId("instanceId902024336") - .setInstance(Instance.newBuilder().build()) - .build(); - ApiFuture future = provisioningClient.createInstanceCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_createinstance_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstanceLRO.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstanceLRO.java deleted file mode 100644 index c833e9369536..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/AsyncCreateInstanceLRO.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_createinstance_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.apigeeregistry.v1.CreateInstanceRequest; -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.OperationMetadata; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; - -public class AsyncCreateInstanceLRO { - - public static void main(String[] args) throws Exception { - asyncCreateInstanceLRO(); - } - - public static void asyncCreateInstanceLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInstanceId("instanceId902024336") - .setInstance(Instance.newBuilder().build()) - .build(); - OperationFuture future = - provisioningClient.createInstanceOperationCallable().futureCall(request); - // Do something. - Instance response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_createinstance_lro_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstance.java deleted file mode 100644 index 92c93e247bf8..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstance.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_createinstance_sync] -import com.google.cloud.apigeeregistry.v1.CreateInstanceRequest; -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; - -public class SyncCreateInstance { - - public static void main(String[] args) throws Exception { - syncCreateInstance(); - } - - public static void syncCreateInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInstanceId("instanceId902024336") - .setInstance(Instance.newBuilder().build()) - .build(); - Instance response = provisioningClient.createInstanceAsync(request).get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_createinstance_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java deleted file mode 100644 index 90ddc8d13351..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_createinstance_locationnameinstancestring_sync] -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; - -public class SyncCreateInstanceLocationnameInstanceString { - - public static void main(String[] args) throws Exception { - syncCreateInstanceLocationnameInstanceString(); - } - - public static void syncCreateInstanceLocationnameInstanceString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - Instance response = - provisioningClient.createInstanceAsync(parent, instance, instanceId).get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_createinstance_locationnameinstancestring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceStringInstanceString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceStringInstanceString.java deleted file mode 100644 index 85d8fe03fc92..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/createinstance/SyncCreateInstanceStringInstanceString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_createinstance_stringinstancestring_sync] -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; - -public class SyncCreateInstanceStringInstanceString { - - public static void main(String[] args) throws Exception { - syncCreateInstanceStringInstanceString(); - } - - public static void syncCreateInstanceStringInstanceString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - Instance response = - provisioningClient.createInstanceAsync(parent, instance, instanceId).get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_createinstance_stringinstancestring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstance.java deleted file mode 100644 index 0d9e7c478a5d..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstance.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_deleteinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; -import com.google.cloud.apigeeregistry.v1.InstanceName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.longrunning.Operation; - -public class AsyncDeleteInstance { - - public static void main(String[] args) throws Exception { - asyncDeleteInstance(); - } - - public static void asyncDeleteInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - ApiFuture future = provisioningClient.deleteInstanceCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_deleteinstance_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstanceLRO.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstanceLRO.java deleted file mode 100644 index 5aee2bfab73a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/AsyncDeleteInstanceLRO.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_deleteinstance_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; -import com.google.cloud.apigeeregistry.v1.InstanceName; -import com.google.cloud.apigeeregistry.v1.OperationMetadata; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.protobuf.Empty; - -public class AsyncDeleteInstanceLRO { - - public static void main(String[] args) throws Exception { - asyncDeleteInstanceLRO(); - } - - public static void asyncDeleteInstanceLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - OperationFuture future = - provisioningClient.deleteInstanceOperationCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_deleteinstance_lro_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstance.java deleted file mode 100644 index 20d0aa3b3852..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstance.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_deleteinstance_sync] -import com.google.cloud.apigeeregistry.v1.DeleteInstanceRequest; -import com.google.cloud.apigeeregistry.v1.InstanceName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.protobuf.Empty; - -public class SyncDeleteInstance { - - public static void main(String[] args) throws Exception { - syncDeleteInstance(); - } - - public static void syncDeleteInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - provisioningClient.deleteInstanceAsync(request).get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_deleteinstance_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceInstancename.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceInstancename.java deleted file mode 100644 index c78a6ea34202..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceInstancename.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_deleteinstance_instancename_sync] -import com.google.cloud.apigeeregistry.v1.InstanceName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.protobuf.Empty; - -public class SyncDeleteInstanceInstancename { - - public static void main(String[] args) throws Exception { - syncDeleteInstanceInstancename(); - } - - public static void syncDeleteInstanceInstancename() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - provisioningClient.deleteInstanceAsync(name).get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_deleteinstance_instancename_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceString.java deleted file mode 100644 index 723e84892037..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/deleteinstance/SyncDeleteInstanceString.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_deleteinstance_string_sync] -import com.google.cloud.apigeeregistry.v1.InstanceName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.protobuf.Empty; - -public class SyncDeleteInstanceString { - - public static void main(String[] args) throws Exception { - syncDeleteInstanceString(); - } - - public static void syncDeleteInstanceString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); - provisioningClient.deleteInstanceAsync(name).get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_deleteinstance_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/AsyncGetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/AsyncGetIamPolicy.java deleted file mode 100644 index 71633093c27e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/AsyncGetIamPolicy.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_getiampolicy_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; - -public class AsyncGetIamPolicy { - - public static void main(String[] args) throws Exception { - asyncGetIamPolicy(); - } - - public static void asyncGetIamPolicy() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - ApiFuture future = provisioningClient.getIamPolicyCallable().futureCall(request); - // Do something. - Policy response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_getiampolicy_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/SyncGetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/SyncGetIamPolicy.java deleted file mode 100644 index 1d2d226fc301..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getiampolicy/SyncGetIamPolicy.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_getiampolicy_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; - -public class SyncGetIamPolicy { - - public static void main(String[] args) throws Exception { - syncGetIamPolicy(); - } - - public static void syncGetIamPolicy() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - Policy response = provisioningClient.getIamPolicy(request); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_getiampolicy_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/AsyncGetInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/AsyncGetInstance.java deleted file mode 100644 index cc2907bc093b..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/AsyncGetInstance.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_getinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.InstanceName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; - -public class AsyncGetInstance { - - public static void main(String[] args) throws Exception { - asyncGetInstance(); - } - - public static void asyncGetInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - GetInstanceRequest request = - GetInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - ApiFuture future = provisioningClient.getInstanceCallable().futureCall(request); - // Do something. - Instance response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_getinstance_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstance.java deleted file mode 100644 index 59af41717ec3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstance.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_getinstance_sync] -import com.google.cloud.apigeeregistry.v1.GetInstanceRequest; -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.InstanceName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; - -public class SyncGetInstance { - - public static void main(String[] args) throws Exception { - syncGetInstance(); - } - - public static void syncGetInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - GetInstanceRequest request = - GetInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - Instance response = provisioningClient.getInstance(request); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_getinstance_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceInstancename.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceInstancename.java deleted file mode 100644 index 99c07baa87b2..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceInstancename.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_getinstance_instancename_sync] -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.InstanceName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; - -public class SyncGetInstanceInstancename { - - public static void main(String[] args) throws Exception { - syncGetInstanceInstancename(); - } - - public static void syncGetInstanceInstancename() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - Instance response = provisioningClient.getInstance(name); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_getinstance_instancename_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceString.java deleted file mode 100644 index c37db372518c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getinstance/SyncGetInstanceString.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_getinstance_string_sync] -import com.google.cloud.apigeeregistry.v1.Instance; -import com.google.cloud.apigeeregistry.v1.InstanceName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; - -public class SyncGetInstanceString { - - public static void main(String[] args) throws Exception { - syncGetInstanceString(); - } - - public static void syncGetInstanceString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); - Instance response = provisioningClient.getInstance(name); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_getinstance_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/AsyncGetLocation.java deleted file mode 100644 index b82b9c9e4d5a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/AsyncGetLocation.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_getlocation_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.cloud.location.GetLocationRequest; -import com.google.cloud.location.Location; - -public class AsyncGetLocation { - - public static void main(String[] args) throws Exception { - asyncGetLocation(); - } - - public static void asyncGetLocation() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - ApiFuture future = provisioningClient.getLocationCallable().futureCall(request); - // Do something. - Location response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_getlocation_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/SyncGetLocation.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/SyncGetLocation.java deleted file mode 100644 index 93c4fd8b7417..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/getlocation/SyncGetLocation.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_getlocation_sync] -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.cloud.location.GetLocationRequest; -import com.google.cloud.location.Location; - -public class SyncGetLocation { - - public static void main(String[] args) throws Exception { - syncGetLocation(); - } - - public static void syncGetLocation() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - Location response = provisioningClient.getLocation(request); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_getlocation_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocations.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocations.java deleted file mode 100644 index 3474f4eedc53..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocations.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_listlocations_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.cloud.location.ListLocationsRequest; -import com.google.cloud.location.Location; - -public class AsyncListLocations { - - public static void main(String[] args) throws Exception { - asyncListLocations(); - } - - public static void asyncListLocations() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - ListLocationsRequest request = - ListLocationsRequest.newBuilder() - .setName("name3373707") - .setFilter("filter-1274492040") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - provisioningClient.listLocationsPagedCallable().futureCall(request); - // Do something. - for (Location element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_listlocations_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocationsPaged.java deleted file mode 100644 index b15ebe2d2d2c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/AsyncListLocationsPaged.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_listlocations_paged_async] -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.cloud.location.ListLocationsRequest; -import com.google.cloud.location.ListLocationsResponse; -import com.google.cloud.location.Location; -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 for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - ListLocationsRequest request = - ListLocationsRequest.newBuilder() - .setName("name3373707") - .setFilter("filter-1274492040") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListLocationsResponse response = provisioningClient.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 apigeeregistry_v1_generated_provisioningclient_listlocations_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/SyncListLocations.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/SyncListLocations.java deleted file mode 100644 index c65c77944d6c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/listlocations/SyncListLocations.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_listlocations_sync] -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.cloud.location.ListLocationsRequest; -import com.google.cloud.location.Location; - -public class SyncListLocations { - - public static void main(String[] args) throws Exception { - syncListLocations(); - } - - public static void syncListLocations() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - ListLocationsRequest request = - ListLocationsRequest.newBuilder() - .setName("name3373707") - .setFilter("filter-1274492040") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (Location element : provisioningClient.listLocations(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_listlocations_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/AsyncSetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/AsyncSetIamPolicy.java deleted file mode 100644 index 3c154c08e0fb..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/AsyncSetIamPolicy.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_setiampolicy_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.protobuf.FieldMask; - -public class AsyncSetIamPolicy { - - public static void main(String[] args) throws Exception { - asyncSetIamPolicy(); - } - - public static void asyncSetIamPolicy() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = provisioningClient.setIamPolicyCallable().futureCall(request); - // Do something. - Policy response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_setiampolicy_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/SyncSetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/SyncSetIamPolicy.java deleted file mode 100644 index 875bc7b1ebb1..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/setiampolicy/SyncSetIamPolicy.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_setiampolicy_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.protobuf.FieldMask; - -public class SyncSetIamPolicy { - - public static void main(String[] args) throws Exception { - syncSetIamPolicy(); - } - - public static void syncSetIamPolicy() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - Policy response = provisioningClient.setIamPolicy(request); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_setiampolicy_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/AsyncTestIamPermissions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/AsyncTestIamPermissions.java deleted file mode 100644 index 402d314655c7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/AsyncTestIamPermissions.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_testiampermissions_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import java.util.ArrayList; - -public class AsyncTestIamPermissions { - - public static void main(String[] args) throws Exception { - asyncTestIamPermissions(); - } - - public static void asyncTestIamPermissions() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - ApiFuture future = - provisioningClient.testIamPermissionsCallable().futureCall(request); - // Do something. - TestIamPermissionsResponse response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_testiampermissions_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/SyncTestIamPermissions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/SyncTestIamPermissions.java deleted file mode 100644 index e64ccfdf8e27..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningclient/testiampermissions/SyncTestIamPermissions.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningclient_testiampermissions_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ProvisioningClient; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import java.util.ArrayList; - -public class SyncTestIamPermissions { - - public static void main(String[] args) throws Exception { - syncTestIamPermissions(); - } - - public static void syncTestIamPermissions() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (ProvisioningClient provisioningClient = ProvisioningClient.create()) { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - TestIamPermissionsResponse response = provisioningClient.testIamPermissions(request); - } - } -} -// [END apigeeregistry_v1_generated_provisioningclient_testiampermissions_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningsettings/getinstance/SyncGetInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningsettings/getinstance/SyncGetInstance.java deleted file mode 100644 index 12ae495cc54f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/provisioningsettings/getinstance/SyncGetInstance.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_provisioningsettings_getinstance_sync] -import com.google.cloud.apigeeregistry.v1.ProvisioningSettings; -import java.time.Duration; - -public class SyncGetInstance { - - public static void main(String[] args) throws Exception { - syncGetInstance(); - } - - public static void syncGetInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - ProvisioningSettings.Builder provisioningSettingsBuilder = ProvisioningSettings.newBuilder(); - provisioningSettingsBuilder - .getInstanceSettings() - .setRetrySettings( - provisioningSettingsBuilder - .getInstanceSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ProvisioningSettings provisioningSettings = provisioningSettingsBuilder.build(); - } -} -// [END apigeeregistry_v1_generated_provisioningsettings_getinstance_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index e50c1c96865c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.RegistrySettings; -import com.google.cloud.apigeeregistry.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 for illustrative purposes only. - // It may require modifications to work in your environment. - RegistrySettings registrySettings = - RegistrySettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - RegistryClient registryClient = RegistryClient.create(registrySettings); - } -} -// [END apigeeregistry_v1_generated_registryclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index ec90195c9f28..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_create_setcredentialsprovider1_sync] -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.RegistrySettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - RegistrySettings registrySettings = - RegistrySettings.newBuilder() - .setTransportChannelProvider( - RegistrySettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - RegistryClient registryClient = RegistryClient.create(registrySettings); - } -} -// [END apigeeregistry_v1_generated_registryclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index 68bff4bde6ba..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_create_setendpoint_sync] -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.RegistrySettings; -import com.google.cloud.apigeeregistry.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 for illustrative purposes only. - // It may require modifications to work in your environment. - RegistrySettings registrySettings = - RegistrySettings.newBuilder().setEndpoint(myEndpoint).build(); - RegistryClient registryClient = RegistryClient.create(registrySettings); - } -} -// [END apigeeregistry_v1_generated_registryclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/AsyncCreateApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/AsyncCreateApi.java deleted file mode 100644 index fd41b160e7ee..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/AsyncCreateApi.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapi_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.CreateApiRequest; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncCreateApi { - - public static void main(String[] args) throws Exception { - asyncCreateApi(); - } - - public static void asyncCreateApi() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - CreateApiRequest request = - CreateApiRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setApi(Api.newBuilder().build()) - .setApiId("apiId93021397") - .build(); - ApiFuture future = registryClient.createApiCallable().futureCall(request); - // Do something. - Api response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapi_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApi.java deleted file mode 100644 index 8089157dcd0c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApi.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapi_sync] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.CreateApiRequest; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApi { - - public static void main(String[] args) throws Exception { - syncCreateApi(); - } - - public static void syncCreateApi() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - CreateApiRequest request = - CreateApiRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setApi(Api.newBuilder().build()) - .setApiId("apiId93021397") - .build(); - Api response = registryClient.createApi(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapi_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiLocationnameApiString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiLocationnameApiString.java deleted file mode 100644 index b51e77ec5858..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiLocationnameApiString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapi_locationnameapistring_sync] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApiLocationnameApiString { - - public static void main(String[] args) throws Exception { - syncCreateApiLocationnameApiString(); - } - - public static void syncCreateApiLocationnameApiString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Api api = Api.newBuilder().build(); - String apiId = "apiId93021397"; - Api response = registryClient.createApi(parent, api, apiId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapi_locationnameapistring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiStringApiString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiStringApiString.java deleted file mode 100644 index 7c597efbd903..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapi/SyncCreateApiStringApiString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapi_stringapistring_sync] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApiStringApiString { - - public static void main(String[] args) throws Exception { - syncCreateApiStringApiString(); - } - - public static void syncCreateApiStringApiString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Api api = Api.newBuilder().build(); - String apiId = "apiId93021397"; - Api response = registryClient.createApi(parent, api, apiId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapi_stringapistring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/AsyncCreateApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/AsyncCreateApiDeployment.java deleted file mode 100644 index 415c10bdc0ba..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/AsyncCreateApiDeployment.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapideployment_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncCreateApiDeployment { - - public static void main(String[] args) throws Exception { - asyncCreateApiDeployment(); - } - - public static void asyncCreateApiDeployment() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - CreateApiDeploymentRequest request = - CreateApiDeploymentRequest.newBuilder() - .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setApiDeployment(ApiDeployment.newBuilder().build()) - .setApiDeploymentId("apiDeploymentId-1299472902") - .build(); - ApiFuture future = - registryClient.createApiDeploymentCallable().futureCall(request); - // Do something. - ApiDeployment response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapideployment_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeployment.java deleted file mode 100644 index 4a71057d1471..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeployment.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapideployment_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApiDeployment { - - public static void main(String[] args) throws Exception { - syncCreateApiDeployment(); - } - - public static void syncCreateApiDeployment() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - CreateApiDeploymentRequest request = - CreateApiDeploymentRequest.newBuilder() - .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setApiDeployment(ApiDeployment.newBuilder().build()) - .setApiDeploymentId("apiDeploymentId-1299472902") - .build(); - ApiDeployment response = registryClient.createApiDeployment(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapideployment_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentApinameApideploymentString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentApinameApideploymentString.java deleted file mode 100644 index bf231533b502..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentApinameApideploymentString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapideployment_apinameapideploymentstring_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApiDeploymentApinameApideploymentString { - - public static void main(String[] args) throws Exception { - syncCreateApiDeploymentApinameApideploymentString(); - } - - public static void syncCreateApiDeploymentApinameApideploymentString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - String apiDeploymentId = "apiDeploymentId-1299472902"; - ApiDeployment response = - registryClient.createApiDeployment(parent, apiDeployment, apiDeploymentId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapideployment_apinameapideploymentstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentStringApideploymentString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentStringApideploymentString.java deleted file mode 100644 index 53a011ccdc95..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapideployment/SyncCreateApiDeploymentStringApideploymentString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapideployment_stringapideploymentstring_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApiDeploymentStringApideploymentString { - - public static void main(String[] args) throws Exception { - syncCreateApiDeploymentStringApideploymentString(); - } - - public static void syncCreateApiDeploymentStringApideploymentString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - String apiDeploymentId = "apiDeploymentId-1299472902"; - ApiDeployment response = - registryClient.createApiDeployment(parent, apiDeployment, apiDeploymentId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapideployment_stringapideploymentstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/AsyncCreateApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/AsyncCreateApiSpec.java deleted file mode 100644 index cb8bef21fdb1..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/AsyncCreateApiSpec.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapispec_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncCreateApiSpec { - - public static void main(String[] args) throws Exception { - asyncCreateApiSpec(); - } - - public static void asyncCreateApiSpec() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - CreateApiSpecRequest request = - CreateApiSpecRequest.newBuilder() - .setParent( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setApiSpec(ApiSpec.newBuilder().build()) - .setApiSpecId("apiSpecId-421795600") - .build(); - ApiFuture future = registryClient.createApiSpecCallable().futureCall(request); - // Do something. - ApiSpec response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapispec_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpec.java deleted file mode 100644 index 3365e22240f7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpec.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapispec_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.CreateApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApiSpec { - - public static void main(String[] args) throws Exception { - syncCreateApiSpec(); - } - - public static void syncCreateApiSpec() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - CreateApiSpecRequest request = - CreateApiSpecRequest.newBuilder() - .setParent( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setApiSpec(ApiSpec.newBuilder().build()) - .setApiSpecId("apiSpecId-421795600") - .build(); - ApiSpec response = registryClient.createApiSpec(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapispec_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecApiversionnameApispecString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecApiversionnameApispecString.java deleted file mode 100644 index b17dc25e9cd9..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecApiversionnameApispecString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapispec_apiversionnameapispecstring_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApiSpecApiversionnameApispecString { - - public static void main(String[] args) throws Exception { - syncCreateApiSpecApiversionnameApispecString(); - } - - public static void syncCreateApiSpecApiversionnameApispecString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - String apiSpecId = "apiSpecId-421795600"; - ApiSpec response = registryClient.createApiSpec(parent, apiSpec, apiSpecId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapispec_apiversionnameapispecstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecStringApispecString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecStringApispecString.java deleted file mode 100644 index 7f78f9ee8dd7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapispec/SyncCreateApiSpecStringApispecString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapispec_stringapispecstring_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApiSpecStringApispecString { - - public static void main(String[] args) throws Exception { - syncCreateApiSpecStringApispecString(); - } - - public static void syncCreateApiSpecStringApispecString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString(); - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - String apiSpecId = "apiSpecId-421795600"; - ApiSpec response = registryClient.createApiSpec(parent, apiSpec, apiSpecId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapispec_stringapispecstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/AsyncCreateApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/AsyncCreateApiVersion.java deleted file mode 100644 index c1053618f9b6..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/AsyncCreateApiVersion.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapiversion_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncCreateApiVersion { - - public static void main(String[] args) throws Exception { - asyncCreateApiVersion(); - } - - public static void asyncCreateApiVersion() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - CreateApiVersionRequest request = - CreateApiVersionRequest.newBuilder() - .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setApiVersion(ApiVersion.newBuilder().build()) - .setApiVersionId("apiVersionId1678816025") - .build(); - ApiFuture future = registryClient.createApiVersionCallable().futureCall(request); - // Do something. - ApiVersion response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapiversion_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersion.java deleted file mode 100644 index eefb57b8da37..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersion.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapiversion_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.CreateApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApiVersion { - - public static void main(String[] args) throws Exception { - syncCreateApiVersion(); - } - - public static void syncCreateApiVersion() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - CreateApiVersionRequest request = - CreateApiVersionRequest.newBuilder() - .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setApiVersion(ApiVersion.newBuilder().build()) - .setApiVersionId("apiVersionId1678816025") - .build(); - ApiVersion response = registryClient.createApiVersion(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapiversion_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionApinameApiversionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionApinameApiversionString.java deleted file mode 100644 index 6947ef7ab89f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionApinameApiversionString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapiversion_apinameapiversionstring_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApiVersionApinameApiversionString { - - public static void main(String[] args) throws Exception { - syncCreateApiVersionApinameApiversionString(); - } - - public static void syncCreateApiVersionApinameApiversionString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - String apiVersionId = "apiVersionId1678816025"; - ApiVersion response = registryClient.createApiVersion(parent, apiVersion, apiVersionId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapiversion_apinameapiversionstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionStringApiversionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionStringApiversionString.java deleted file mode 100644 index 0de7d3cbb518..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createapiversion/SyncCreateApiVersionStringApiversionString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createapiversion_stringapiversionstring_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateApiVersionStringApiversionString { - - public static void main(String[] args) throws Exception { - syncCreateApiVersionStringApiversionString(); - } - - public static void syncCreateApiVersionStringApiversionString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - String apiVersionId = "apiVersionId1678816025"; - ApiVersion response = registryClient.createApiVersion(parent, apiVersion, apiVersionId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createapiversion_stringapiversionstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/AsyncCreateArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/AsyncCreateArtifact.java deleted file mode 100644 index 9fe5fb79229b..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/AsyncCreateArtifact.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createartifact_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncCreateArtifact { - - public static void main(String[] args) throws Exception { - asyncCreateArtifact(); - } - - public static void asyncCreateArtifact() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - CreateArtifactRequest request = - CreateArtifactRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setArtifact(Artifact.newBuilder().build()) - .setArtifactId("artifactId240640653") - .build(); - ApiFuture future = registryClient.createArtifactCallable().futureCall(request); - // Do something. - Artifact response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createartifact_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifact.java deleted file mode 100644 index c3476ddd686c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifact.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createartifact_sync] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.CreateArtifactRequest; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateArtifact { - - public static void main(String[] args) throws Exception { - syncCreateArtifact(); - } - - public static void syncCreateArtifact() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - CreateArtifactRequest request = - CreateArtifactRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setArtifact(Artifact.newBuilder().build()) - .setArtifactId("artifactId240640653") - .build(); - Artifact response = registryClient.createArtifact(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createartifact_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApideploymentnameArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApideploymentnameArtifactString.java deleted file mode 100644 index 09b7ea8bc941..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApideploymentnameArtifactString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createartifact_apideploymentnameartifactstring_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateArtifactApideploymentnameArtifactString { - - public static void main(String[] args) throws Exception { - syncCreateArtifactApideploymentnameArtifactString(); - } - - public static void syncCreateArtifactApideploymentnameArtifactString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiDeploymentName parent = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - Artifact response = registryClient.createArtifact(parent, artifact, artifactId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createartifact_apideploymentnameartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApinameArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApinameArtifactString.java deleted file mode 100644 index e4f7e7f6ddc1..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApinameArtifactString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createartifact_apinameartifactstring_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateArtifactApinameArtifactString { - - public static void main(String[] args) throws Exception { - syncCreateArtifactApinameArtifactString(); - } - - public static void syncCreateArtifactApinameArtifactString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - Artifact response = registryClient.createArtifact(parent, artifact, artifactId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createartifact_apinameartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApispecnameArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApispecnameArtifactString.java deleted file mode 100644 index f9c7c988ef6f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApispecnameArtifactString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createartifact_apispecnameartifactstring_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateArtifactApispecnameArtifactString { - - public static void main(String[] args) throws Exception { - syncCreateArtifactApispecnameArtifactString(); - } - - public static void syncCreateArtifactApispecnameArtifactString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiSpecName parent = - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - Artifact response = registryClient.createArtifact(parent, artifact, artifactId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createartifact_apispecnameartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApiversionnameArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApiversionnameArtifactString.java deleted file mode 100644 index 381f39304b02..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactApiversionnameArtifactString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createartifact_apiversionnameartifactstring_sync] -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateArtifactApiversionnameArtifactString { - - public static void main(String[] args) throws Exception { - syncCreateArtifactApiversionnameArtifactString(); - } - - public static void syncCreateArtifactApiversionnameArtifactString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - Artifact response = registryClient.createArtifact(parent, artifact, artifactId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createartifact_apiversionnameartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactLocationnameArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactLocationnameArtifactString.java deleted file mode 100644 index 47dc2d0db256..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactLocationnameArtifactString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createartifact_locationnameartifactstring_sync] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateArtifactLocationnameArtifactString { - - public static void main(String[] args) throws Exception { - syncCreateArtifactLocationnameArtifactString(); - } - - public static void syncCreateArtifactLocationnameArtifactString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - Artifact response = registryClient.createArtifact(parent, artifact, artifactId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createartifact_locationnameartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactStringArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactStringArtifactString.java deleted file mode 100644 index 14511f423099..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/createartifact/SyncCreateArtifactStringArtifactString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_createartifact_stringartifactstring_sync] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncCreateArtifactStringArtifactString { - - public static void main(String[] args) throws Exception { - syncCreateArtifactStringArtifactString(); - } - - public static void syncCreateArtifactStringArtifactString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Artifact artifact = Artifact.newBuilder().build(); - String artifactId = "artifactId240640653"; - Artifact response = registryClient.createArtifact(parent, artifact, artifactId); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_createartifact_stringartifactstring_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/AsyncDeleteApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/AsyncDeleteApi.java deleted file mode 100644 index 6a1532b484a6..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/AsyncDeleteApi.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapi_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class AsyncDeleteApi { - - public static void main(String[] args) throws Exception { - asyncDeleteApi(); - } - - public static void asyncDeleteApi() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiRequest request = - DeleteApiRequest.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setForce(true) - .build(); - ApiFuture future = registryClient.deleteApiCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapi_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApi.java deleted file mode 100644 index 15e48279a24e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApi.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapi_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.DeleteApiRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApi { - - public static void main(String[] args) throws Exception { - syncDeleteApi(); - } - - public static void syncDeleteApi() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiRequest request = - DeleteApiRequest.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setForce(true) - .build(); - registryClient.deleteApi(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapi_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiApiname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiApiname.java deleted file mode 100644 index 8dd82c61a197..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiApiname.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapi_apiname_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApiApiname { - - public static void main(String[] args) throws Exception { - syncDeleteApiApiname(); - } - - public static void syncDeleteApiApiname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - registryClient.deleteApi(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapi_apiname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiString.java deleted file mode 100644 index d650bf74db14..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapi/SyncDeleteApiString.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapi_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApiString { - - public static void main(String[] args) throws Exception { - syncDeleteApiString(); - } - - public static void syncDeleteApiString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); - registryClient.deleteApi(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapi_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/AsyncDeleteApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/AsyncDeleteApiDeployment.java deleted file mode 100644 index 27be083d6878..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/AsyncDeleteApiDeployment.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapideployment_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class AsyncDeleteApiDeployment { - - public static void main(String[] args) throws Exception { - asyncDeleteApiDeployment(); - } - - public static void asyncDeleteApiDeployment() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiDeploymentRequest request = - DeleteApiDeploymentRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setForce(true) - .build(); - ApiFuture future = registryClient.deleteApiDeploymentCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapideployment_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeployment.java deleted file mode 100644 index f0baa4d66580..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeployment.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapideployment_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApiDeployment { - - public static void main(String[] args) throws Exception { - syncDeleteApiDeployment(); - } - - public static void syncDeleteApiDeployment() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiDeploymentRequest request = - DeleteApiDeploymentRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setForce(true) - .build(); - registryClient.deleteApiDeployment(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapideployment_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentApideploymentname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentApideploymentname.java deleted file mode 100644 index b1b82c6c61d4..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentApideploymentname.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapideployment_apideploymentname_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApiDeploymentApideploymentname { - - public static void main(String[] args) throws Exception { - syncDeleteApiDeploymentApideploymentname(); - } - - public static void syncDeleteApiDeploymentApideploymentname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - registryClient.deleteApiDeployment(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapideployment_apideploymentname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentString.java deleted file mode 100644 index 63d507b77bbc..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideployment/SyncDeleteApiDeploymentString.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapideployment_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApiDeploymentString { - - public static void main(String[] args) throws Exception { - syncDeleteApiDeploymentString(); - } - - public static void syncDeleteApiDeploymentString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString(); - registryClient.deleteApiDeployment(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapideployment_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/AsyncDeleteApiDeploymentRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/AsyncDeleteApiDeploymentRevision.java deleted file mode 100644 index 1ac1515c7f13..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/AsyncDeleteApiDeploymentRevision.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncDeleteApiDeploymentRevision { - - public static void main(String[] args) throws Exception { - asyncDeleteApiDeploymentRevision(); - } - - public static void asyncDeleteApiDeploymentRevision() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiDeploymentRevisionRequest request = - DeleteApiDeploymentRevisionRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .build(); - ApiFuture future = - registryClient.deleteApiDeploymentRevisionCallable().futureCall(request); - // Do something. - ApiDeployment response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevision.java deleted file mode 100644 index a12da2314868..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevision.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncDeleteApiDeploymentRevision { - - public static void main(String[] args) throws Exception { - syncDeleteApiDeploymentRevision(); - } - - public static void syncDeleteApiDeploymentRevision() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiDeploymentRevisionRequest request = - DeleteApiDeploymentRevisionRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .build(); - ApiDeployment response = registryClient.deleteApiDeploymentRevision(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionApideploymentname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionApideploymentname.java deleted file mode 100644 index 21521f34f8b2..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionApideploymentname.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_apideploymentname_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncDeleteApiDeploymentRevisionApideploymentname { - - public static void main(String[] args) throws Exception { - syncDeleteApiDeploymentRevisionApideploymentname(); - } - - public static void syncDeleteApiDeploymentRevisionApideploymentname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - ApiDeployment response = registryClient.deleteApiDeploymentRevision(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_apideploymentname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionString.java deleted file mode 100644 index 7fd28d664d87..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapideploymentrevision/SyncDeleteApiDeploymentRevisionString.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncDeleteApiDeploymentRevisionString { - - public static void main(String[] args) throws Exception { - syncDeleteApiDeploymentRevisionString(); - } - - public static void syncDeleteApiDeploymentRevisionString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString(); - ApiDeployment response = registryClient.deleteApiDeploymentRevision(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapideploymentrevision_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/AsyncDeleteApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/AsyncDeleteApiSpec.java deleted file mode 100644 index 8e90aa7d934c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/AsyncDeleteApiSpec.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapispec_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class AsyncDeleteApiSpec { - - public static void main(String[] args) throws Exception { - asyncDeleteApiSpec(); - } - - public static void asyncDeleteApiSpec() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiSpecRequest request = - DeleteApiSpecRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setForce(true) - .build(); - ApiFuture future = registryClient.deleteApiSpecCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapispec_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpec.java deleted file mode 100644 index 0276ffb274fc..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpec.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapispec_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApiSpec { - - public static void main(String[] args) throws Exception { - syncDeleteApiSpec(); - } - - public static void syncDeleteApiSpec() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiSpecRequest request = - DeleteApiSpecRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setForce(true) - .build(); - registryClient.deleteApiSpec(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapispec_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecApispecname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecApispecname.java deleted file mode 100644 index 33bce782b715..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecApispecname.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapispec_apispecname_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApiSpecApispecname { - - public static void main(String[] args) throws Exception { - syncDeleteApiSpecApispecname(); - } - - public static void syncDeleteApiSpecApispecname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - registryClient.deleteApiSpec(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapispec_apispecname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecString.java deleted file mode 100644 index c64567740ab1..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispec/SyncDeleteApiSpecString.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapispec_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApiSpecString { - - public static void main(String[] args) throws Exception { - syncDeleteApiSpecString(); - } - - public static void syncDeleteApiSpecString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString(); - registryClient.deleteApiSpec(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapispec_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/AsyncDeleteApiSpecRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/AsyncDeleteApiSpecRevision.java deleted file mode 100644 index b0a0b64ad8bf..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/AsyncDeleteApiSpecRevision.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapispecrevision_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncDeleteApiSpecRevision { - - public static void main(String[] args) throws Exception { - asyncDeleteApiSpecRevision(); - } - - public static void asyncDeleteApiSpecRevision() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiSpecRevisionRequest request = - DeleteApiSpecRevisionRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .build(); - ApiFuture future = - registryClient.deleteApiSpecRevisionCallable().futureCall(request); - // Do something. - ApiSpec response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapispecrevision_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevision.java deleted file mode 100644 index 0f1aebec76ee..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevision.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapispecrevision_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncDeleteApiSpecRevision { - - public static void main(String[] args) throws Exception { - syncDeleteApiSpecRevision(); - } - - public static void syncDeleteApiSpecRevision() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiSpecRevisionRequest request = - DeleteApiSpecRevisionRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .build(); - ApiSpec response = registryClient.deleteApiSpecRevision(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapispecrevision_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionApispecname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionApispecname.java deleted file mode 100644 index e63a2bab158a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionApispecname.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapispecrevision_apispecname_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncDeleteApiSpecRevisionApispecname { - - public static void main(String[] args) throws Exception { - syncDeleteApiSpecRevisionApispecname(); - } - - public static void syncDeleteApiSpecRevisionApispecname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - ApiSpec response = registryClient.deleteApiSpecRevision(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapispecrevision_apispecname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionString.java deleted file mode 100644 index de1b47eb0c16..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapispecrevision/SyncDeleteApiSpecRevisionString.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapispecrevision_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncDeleteApiSpecRevisionString { - - public static void main(String[] args) throws Exception { - syncDeleteApiSpecRevisionString(); - } - - public static void syncDeleteApiSpecRevisionString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString(); - ApiSpec response = registryClient.deleteApiSpecRevision(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapispecrevision_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/AsyncDeleteApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/AsyncDeleteApiVersion.java deleted file mode 100644 index 9c85302021d3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/AsyncDeleteApiVersion.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapiversion_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class AsyncDeleteApiVersion { - - public static void main(String[] args) throws Exception { - asyncDeleteApiVersion(); - } - - public static void asyncDeleteApiVersion() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiVersionRequest request = - DeleteApiVersionRequest.newBuilder() - .setName( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setForce(true) - .build(); - ApiFuture future = registryClient.deleteApiVersionCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapiversion_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersion.java deleted file mode 100644 index 8ab9d3e91171..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersion.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapiversion_sync] -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApiVersion { - - public static void main(String[] args) throws Exception { - syncDeleteApiVersion(); - } - - public static void syncDeleteApiVersion() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteApiVersionRequest request = - DeleteApiVersionRequest.newBuilder() - .setName( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setForce(true) - .build(); - registryClient.deleteApiVersion(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapiversion_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionApiversionname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionApiversionname.java deleted file mode 100644 index e3284ac76d3d..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionApiversionname.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapiversion_apiversionname_sync] -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApiVersionApiversionname { - - public static void main(String[] args) throws Exception { - syncDeleteApiVersionApiversionname(); - } - - public static void syncDeleteApiVersionApiversionname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - registryClient.deleteApiVersion(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapiversion_apiversionname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionString.java deleted file mode 100644 index e89540340685..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteapiversion/SyncDeleteApiVersionString.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteapiversion_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteApiVersionString { - - public static void main(String[] args) throws Exception { - syncDeleteApiVersionString(); - } - - public static void syncDeleteApiVersionString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString(); - registryClient.deleteApiVersion(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteapiversion_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/AsyncDeleteArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/AsyncDeleteArtifact.java deleted file mode 100644 index b18948cbe67a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/AsyncDeleteArtifact.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteartifact_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class AsyncDeleteArtifact { - - public static void main(String[] args) throws Exception { - asyncDeleteArtifact(); - } - - public static void asyncDeleteArtifact() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteArtifactRequest request = - DeleteArtifactRequest.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName( - "[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .build(); - ApiFuture future = registryClient.deleteArtifactCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteartifact_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifact.java deleted file mode 100644 index c47b8fff0a8d..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifact.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteartifact_sync] -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.DeleteArtifactRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteArtifact { - - public static void main(String[] args) throws Exception { - syncDeleteArtifact(); - } - - public static void syncDeleteArtifact() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - DeleteArtifactRequest request = - DeleteArtifactRequest.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName( - "[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .build(); - registryClient.deleteArtifact(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteartifact_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactArtifactname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactArtifactname.java deleted file mode 100644 index b7668c84e9e8..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactArtifactname.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteartifact_artifactname_sync] -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteArtifactArtifactname { - - public static void main(String[] args) throws Exception { - syncDeleteArtifactArtifactname(); - } - - public static void syncDeleteArtifactArtifactname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - registryClient.deleteArtifact(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteartifact_artifactname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactString.java deleted file mode 100644 index 45bc803ab4f7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/deleteartifact/SyncDeleteArtifactString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_deleteartifact_string_sync] -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.Empty; - -public class SyncDeleteArtifactString { - - public static void main(String[] args) throws Exception { - syncDeleteArtifactString(); - } - - public static void syncDeleteArtifactString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString(); - registryClient.deleteArtifact(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_deleteartifact_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/AsyncGetApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/AsyncGetApi.java deleted file mode 100644 index 3f53427051ab..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/AsyncGetApi.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapi_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.GetApiRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncGetApi { - - public static void main(String[] args) throws Exception { - asyncGetApi(); - } - - public static void asyncGetApi() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetApiRequest request = - GetApiRequest.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .build(); - ApiFuture future = registryClient.getApiCallable().futureCall(request); - // Do something. - Api response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapi_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApi.java deleted file mode 100644 index 96e21d0eaeee..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApi.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapi_sync] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.GetApiRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApi { - - public static void main(String[] args) throws Exception { - syncGetApi(); - } - - public static void syncGetApi() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetApiRequest request = - GetApiRequest.newBuilder() - .setName(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .build(); - Api response = registryClient.getApi(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapi_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiApiname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiApiname.java deleted file mode 100644 index 8ef92b439fab..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiApiname.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapi_apiname_sync] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiApiname { - - public static void main(String[] args) throws Exception { - syncGetApiApiname(); - } - - public static void syncGetApiApiname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiName name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - Api response = registryClient.getApi(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapi_apiname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiString.java deleted file mode 100644 index e6653bd2ff7a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapi/SyncGetApiString.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapi_string_sync] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiString { - - public static void main(String[] args) throws Exception { - syncGetApiString(); - } - - public static void syncGetApiString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); - Api response = registryClient.getApi(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapi_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/AsyncGetApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/AsyncGetApiDeployment.java deleted file mode 100644 index 129a6f91eca7..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/AsyncGetApiDeployment.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapideployment_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncGetApiDeployment { - - public static void main(String[] args) throws Exception { - asyncGetApiDeployment(); - } - - public static void asyncGetApiDeployment() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetApiDeploymentRequest request = - GetApiDeploymentRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .build(); - ApiFuture future = - registryClient.getApiDeploymentCallable().futureCall(request); - // Do something. - ApiDeployment response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapideployment_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeployment.java deleted file mode 100644 index 47688d279679..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeployment.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapideployment_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiDeployment { - - public static void main(String[] args) throws Exception { - syncGetApiDeployment(); - } - - public static void syncGetApiDeployment() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetApiDeploymentRequest request = - GetApiDeploymentRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .build(); - ApiDeployment response = registryClient.getApiDeployment(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapideployment_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentApideploymentname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentApideploymentname.java deleted file mode 100644 index 2bff363189cc..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentApideploymentname.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapideployment_apideploymentname_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiDeploymentApideploymentname { - - public static void main(String[] args) throws Exception { - syncGetApiDeploymentApideploymentname(); - } - - public static void syncGetApiDeploymentApideploymentname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiDeploymentName name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - ApiDeployment response = registryClient.getApiDeployment(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapideployment_apideploymentname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentString.java deleted file mode 100644 index 0952cb27aca4..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapideployment/SyncGetApiDeploymentString.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapideployment_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiDeploymentString { - - public static void main(String[] args) throws Exception { - syncGetApiDeploymentString(); - } - - public static void syncGetApiDeploymentString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]").toString(); - ApiDeployment response = registryClient.getApiDeployment(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapideployment_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/AsyncGetApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/AsyncGetApiSpec.java deleted file mode 100644 index ae15cf674c9f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/AsyncGetApiSpec.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapispec_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncGetApiSpec { - - public static void main(String[] args) throws Exception { - asyncGetApiSpec(); - } - - public static void asyncGetApiSpec() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetApiSpecRequest request = - GetApiSpecRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .build(); - ApiFuture future = registryClient.getApiSpecCallable().futureCall(request); - // Do something. - ApiSpec response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapispec_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpec.java deleted file mode 100644 index e0a38647c537..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpec.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapispec_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.GetApiSpecRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiSpec { - - public static void main(String[] args) throws Exception { - syncGetApiSpec(); - } - - public static void syncGetApiSpec() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetApiSpecRequest request = - GetApiSpecRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .build(); - ApiSpec response = registryClient.getApiSpec(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapispec_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecApispecname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecApispecname.java deleted file mode 100644 index 30a6e96cd936..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecApispecname.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapispec_apispecname_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiSpecApispecname { - - public static void main(String[] args) throws Exception { - syncGetApiSpecApispecname(); - } - - public static void syncGetApiSpecApispecname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - ApiSpec response = registryClient.getApiSpec(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapispec_apispecname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecString.java deleted file mode 100644 index 59370a394473..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispec/SyncGetApiSpecString.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapispec_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiSpecString { - - public static void main(String[] args) throws Exception { - syncGetApiSpecString(); - } - - public static void syncGetApiSpecString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString(); - ApiSpec response = registryClient.getApiSpec(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapispec_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/AsyncGetApiSpecContents.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/AsyncGetApiSpecContents.java deleted file mode 100644 index 1d4a0934285e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/AsyncGetApiSpecContents.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapispeccontents_async] -import com.google.api.HttpBody; -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncGetApiSpecContents { - - public static void main(String[] args) throws Exception { - asyncGetApiSpecContents(); - } - - public static void asyncGetApiSpecContents() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetApiSpecContentsRequest request = - GetApiSpecContentsRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .build(); - ApiFuture future = registryClient.getApiSpecContentsCallable().futureCall(request); - // Do something. - HttpBody response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapispeccontents_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContents.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContents.java deleted file mode 100644 index 4263041724e3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContents.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapispeccontents_sync] -import com.google.api.HttpBody; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiSpecContents { - - public static void main(String[] args) throws Exception { - syncGetApiSpecContents(); - } - - public static void syncGetApiSpecContents() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetApiSpecContentsRequest request = - GetApiSpecContentsRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .build(); - HttpBody response = registryClient.getApiSpecContents(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapispeccontents_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsApispecname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsApispecname.java deleted file mode 100644 index c13da2b7f90f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsApispecname.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapispeccontents_apispecname_sync] -import com.google.api.HttpBody; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiSpecContentsApispecname { - - public static void main(String[] args) throws Exception { - syncGetApiSpecContentsApispecname(); - } - - public static void syncGetApiSpecContentsApispecname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiSpecName name = ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - HttpBody response = registryClient.getApiSpecContents(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapispeccontents_apispecname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsString.java deleted file mode 100644 index a6fe06f69d58..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapispeccontents/SyncGetApiSpecContentsString.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapispeccontents_string_sync] -import com.google.api.HttpBody; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiSpecContentsString { - - public static void main(String[] args) throws Exception { - syncGetApiSpecContentsString(); - } - - public static void syncGetApiSpecContentsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString(); - HttpBody response = registryClient.getApiSpecContents(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapispeccontents_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/AsyncGetApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/AsyncGetApiVersion.java deleted file mode 100644 index 392fc75b3dca..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/AsyncGetApiVersion.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapiversion_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncGetApiVersion { - - public static void main(String[] args) throws Exception { - asyncGetApiVersion(); - } - - public static void asyncGetApiVersion() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetApiVersionRequest request = - GetApiVersionRequest.newBuilder() - .setName( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .build(); - ApiFuture future = registryClient.getApiVersionCallable().futureCall(request); - // Do something. - ApiVersion response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapiversion_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersion.java deleted file mode 100644 index 9b56a77e6e40..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersion.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapiversion_sync] -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.GetApiVersionRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiVersion { - - public static void main(String[] args) throws Exception { - syncGetApiVersion(); - } - - public static void syncGetApiVersion() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetApiVersionRequest request = - GetApiVersionRequest.newBuilder() - .setName( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .build(); - ApiVersion response = registryClient.getApiVersion(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapiversion_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionApiversionname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionApiversionname.java deleted file mode 100644 index c5b279d24f23..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionApiversionname.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapiversion_apiversionname_sync] -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiVersionApiversionname { - - public static void main(String[] args) throws Exception { - syncGetApiVersionApiversionname(); - } - - public static void syncGetApiVersionApiversionname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiVersionName name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - ApiVersion response = registryClient.getApiVersion(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapiversion_apiversionname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionString.java deleted file mode 100644 index e40456364d63..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getapiversion/SyncGetApiVersionString.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getapiversion_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetApiVersionString { - - public static void main(String[] args) throws Exception { - syncGetApiVersionString(); - } - - public static void syncGetApiVersionString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString(); - ApiVersion response = registryClient.getApiVersion(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getapiversion_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/AsyncGetArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/AsyncGetArtifact.java deleted file mode 100644 index ffc69903c221..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/AsyncGetArtifact.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getartifact_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncGetArtifact { - - public static void main(String[] args) throws Exception { - asyncGetArtifact(); - } - - public static void asyncGetArtifact() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetArtifactRequest request = - GetArtifactRequest.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName( - "[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .build(); - ApiFuture future = registryClient.getArtifactCallable().futureCall(request); - // Do something. - Artifact response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getartifact_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifact.java deleted file mode 100644 index c4ffa6b1eb6a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifact.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getartifact_sync] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.GetArtifactRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetArtifact { - - public static void main(String[] args) throws Exception { - syncGetArtifact(); - } - - public static void syncGetArtifact() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetArtifactRequest request = - GetArtifactRequest.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName( - "[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .build(); - Artifact response = registryClient.getArtifact(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getartifact_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactArtifactname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactArtifactname.java deleted file mode 100644 index 7ee303331391..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactArtifactname.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getartifact_artifactname_sync] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetArtifactArtifactname { - - public static void main(String[] args) throws Exception { - syncGetArtifactArtifactname(); - } - - public static void syncGetArtifactArtifactname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - Artifact response = registryClient.getArtifact(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getartifact_artifactname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactString.java deleted file mode 100644 index 400da6251e22..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifact/SyncGetArtifactString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getartifact_string_sync] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetArtifactString { - - public static void main(String[] args) throws Exception { - syncGetArtifactString(); - } - - public static void syncGetArtifactString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString(); - Artifact response = registryClient.getArtifact(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getartifact_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/AsyncGetArtifactContents.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/AsyncGetArtifactContents.java deleted file mode 100644 index 36fa78db2d7f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/AsyncGetArtifactContents.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getartifactcontents_async] -import com.google.api.HttpBody; -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncGetArtifactContents { - - public static void main(String[] args) throws Exception { - asyncGetArtifactContents(); - } - - public static void asyncGetArtifactContents() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetArtifactContentsRequest request = - GetArtifactContentsRequest.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName( - "[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .build(); - ApiFuture future = registryClient.getArtifactContentsCallable().futureCall(request); - // Do something. - HttpBody response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getartifactcontents_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContents.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContents.java deleted file mode 100644 index 0410932439da..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContents.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getartifactcontents_sync] -import com.google.api.HttpBody; -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetArtifactContents { - - public static void main(String[] args) throws Exception { - syncGetArtifactContents(); - } - - public static void syncGetArtifactContents() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetArtifactContentsRequest request = - GetArtifactContentsRequest.newBuilder() - .setName( - ArtifactName.ofProjectLocationArtifactName( - "[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString()) - .build(); - HttpBody response = registryClient.getArtifactContents(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getartifactcontents_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsArtifactname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsArtifactname.java deleted file mode 100644 index bd2315bec91c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsArtifactname.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getartifactcontents_artifactname_sync] -import com.google.api.HttpBody; -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetArtifactContentsArtifactname { - - public static void main(String[] args) throws Exception { - syncGetArtifactContentsArtifactname(); - } - - public static void syncGetArtifactContentsArtifactname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ArtifactName name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]"); - HttpBody response = registryClient.getArtifactContents(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getartifactcontents_artifactname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsString.java deleted file mode 100644 index ad116cc614b5..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getartifactcontents/SyncGetArtifactContentsString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getartifactcontents_string_sync] -import com.google.api.HttpBody; -import com.google.cloud.apigeeregistry.v1.ArtifactName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncGetArtifactContentsString { - - public static void main(String[] args) throws Exception { - syncGetArtifactContentsString(); - } - - public static void syncGetArtifactContentsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String name = - ArtifactName.ofProjectLocationArtifactName("[PROJECT]", "[LOCATION]", "[ARTIFACT]") - .toString(); - HttpBody response = registryClient.getArtifactContents(name); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getartifactcontents_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/AsyncGetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/AsyncGetIamPolicy.java deleted file mode 100644 index a53072cab93c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/AsyncGetIamPolicy.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getiampolicy_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; - -public class AsyncGetIamPolicy { - - public static void main(String[] args) throws Exception { - asyncGetIamPolicy(); - } - - public static void asyncGetIamPolicy() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - ApiFuture future = registryClient.getIamPolicyCallable().futureCall(request); - // Do something. - Policy response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getiampolicy_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/SyncGetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/SyncGetIamPolicy.java deleted file mode 100644 index 10cf2ffc4f97..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getiampolicy/SyncGetIamPolicy.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getiampolicy_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; - -public class SyncGetIamPolicy { - - public static void main(String[] args) throws Exception { - syncGetIamPolicy(); - } - - public static void syncGetIamPolicy() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - Policy response = registryClient.getIamPolicy(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getiampolicy_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/AsyncGetLocation.java deleted file mode 100644 index 8e63ded819d5..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/AsyncGetLocation.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getlocation_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.location.GetLocationRequest; -import com.google.cloud.location.Location; - -public class AsyncGetLocation { - - public static void main(String[] args) throws Exception { - asyncGetLocation(); - } - - public static void asyncGetLocation() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - ApiFuture future = registryClient.getLocationCallable().futureCall(request); - // Do something. - Location response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getlocation_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/SyncGetLocation.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/SyncGetLocation.java deleted file mode 100644 index 823871f6a5f3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/getlocation/SyncGetLocation.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_getlocation_sync] -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.location.GetLocationRequest; -import com.google.cloud.location.Location; - -public class SyncGetLocation { - - public static void main(String[] args) throws Exception { - syncGetLocation(); - } - - public static void syncGetLocation() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - Location response = registryClient.getLocation(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_getlocation_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisions.java deleted file mode 100644 index 5656ad339ad9..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisions.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncListApiDeploymentRevisions { - - public static void main(String[] args) throws Exception { - asyncListApiDeploymentRevisions(); - } - - public static void asyncListApiDeploymentRevisions() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiDeploymentRevisionsRequest request = - ListApiDeploymentRevisionsRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - registryClient.listApiDeploymentRevisionsPagedCallable().futureCall(request); - // Do something. - for (ApiDeployment element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisionsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisionsPaged.java deleted file mode 100644 index 615cde788541..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/AsyncListApiDeploymentRevisionsPaged.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_paged_async] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.common.base.Strings; - -public class AsyncListApiDeploymentRevisionsPaged { - - public static void main(String[] args) throws Exception { - asyncListApiDeploymentRevisionsPaged(); - } - - public static void asyncListApiDeploymentRevisionsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiDeploymentRevisionsRequest request = - ListApiDeploymentRevisionsRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListApiDeploymentRevisionsResponse response = - registryClient.listApiDeploymentRevisionsCallable().call(request); - for (ApiDeployment element : response.getApiDeploymentsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/SyncListApiDeploymentRevisions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/SyncListApiDeploymentRevisions.java deleted file mode 100644 index e7edf95813d6..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideploymentrevisions/SyncListApiDeploymentRevisions.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApiDeploymentRevisions { - - public static void main(String[] args) throws Exception { - syncListApiDeploymentRevisions(); - } - - public static void syncListApiDeploymentRevisions() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiDeploymentRevisionsRequest request = - ListApiDeploymentRevisionsRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (ApiDeployment element : - registryClient.listApiDeploymentRevisions(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapideploymentrevisions_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeployments.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeployments.java deleted file mode 100644 index 0299a4a42797..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeployments.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapideployments_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncListApiDeployments { - - public static void main(String[] args) throws Exception { - asyncListApiDeployments(); - } - - public static void asyncListApiDeployments() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiDeploymentsRequest request = - ListApiDeploymentsRequest.newBuilder() - .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - ApiFuture future = - registryClient.listApiDeploymentsPagedCallable().futureCall(request); - // Do something. - for (ApiDeployment element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapideployments_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeploymentsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeploymentsPaged.java deleted file mode 100644 index 253a7761aaf0..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/AsyncListApiDeploymentsPaged.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapideployments_paged_async] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.common.base.Strings; - -public class AsyncListApiDeploymentsPaged { - - public static void main(String[] args) throws Exception { - asyncListApiDeploymentsPaged(); - } - - public static void asyncListApiDeploymentsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiDeploymentsRequest request = - ListApiDeploymentsRequest.newBuilder() - .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - while (true) { - ListApiDeploymentsResponse response = - registryClient.listApiDeploymentsCallable().call(request); - for (ApiDeployment element : response.getApiDeploymentsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapideployments_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeployments.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeployments.java deleted file mode 100644 index dddb6882673e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeployments.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapideployments_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApiDeployments { - - public static void main(String[] args) throws Exception { - syncListApiDeployments(); - } - - public static void syncListApiDeployments() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiDeploymentsRequest request = - ListApiDeploymentsRequest.newBuilder() - .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - for (ApiDeployment element : registryClient.listApiDeployments(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapideployments_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsApiname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsApiname.java deleted file mode 100644 index da6fe53e53df..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsApiname.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapideployments_apiname_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApiDeploymentsApiname { - - public static void main(String[] args) throws Exception { - syncListApiDeploymentsApiname(); - } - - public static void syncListApiDeploymentsApiname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - for (ApiDeployment element : registryClient.listApiDeployments(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapideployments_apiname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsString.java deleted file mode 100644 index de91a34fdbad..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapideployments/SyncListApiDeploymentsString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapideployments_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApiDeploymentsString { - - public static void main(String[] args) throws Exception { - syncListApiDeploymentsString(); - } - - public static void syncListApiDeploymentsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); - for (ApiDeployment element : registryClient.listApiDeployments(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapideployments_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApis.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApis.java deleted file mode 100644 index 73d6c2ba933e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApis.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapis_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.ListApisRequest; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncListApis { - - public static void main(String[] args) throws Exception { - asyncListApis(); - } - - public static void asyncListApis() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApisRequest request = - ListApisRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - ApiFuture future = registryClient.listApisPagedCallable().futureCall(request); - // Do something. - for (Api element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapis_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApisPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApisPaged.java deleted file mode 100644 index 5ff4585c7aa6..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/AsyncListApisPaged.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapis_paged_async] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.ListApisRequest; -import com.google.cloud.apigeeregistry.v1.ListApisResponse; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.common.base.Strings; - -public class AsyncListApisPaged { - - public static void main(String[] args) throws Exception { - asyncListApisPaged(); - } - - public static void asyncListApisPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApisRequest request = - ListApisRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - while (true) { - ListApisResponse response = registryClient.listApisCallable().call(request); - for (Api element : response.getApisList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapis_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApis.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApis.java deleted file mode 100644 index 9324ee665153..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApis.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapis_sync] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.ListApisRequest; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApis { - - public static void main(String[] args) throws Exception { - syncListApis(); - } - - public static void syncListApis() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApisRequest request = - ListApisRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - for (Api element : registryClient.listApis(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapis_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisLocationname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisLocationname.java deleted file mode 100644 index 18625c55cdac..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisLocationname.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapis_locationname_sync] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApisLocationname { - - public static void main(String[] args) throws Exception { - syncListApisLocationname(); - } - - public static void syncListApisLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (Api element : registryClient.listApis(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapis_locationname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisString.java deleted file mode 100644 index 3419696c3432..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapis/SyncListApisString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapis_string_sync] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApisString { - - public static void main(String[] args) throws Exception { - syncListApisString(); - } - - public static void syncListApisString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (Api element : registryClient.listApis(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapis_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisions.java deleted file mode 100644 index 3580ce5e48e2..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisions.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapispecrevisions_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncListApiSpecRevisions { - - public static void main(String[] args) throws Exception { - asyncListApiSpecRevisions(); - } - - public static void asyncListApiSpecRevisions() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiSpecRevisionsRequest request = - ListApiSpecRevisionsRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - registryClient.listApiSpecRevisionsPagedCallable().futureCall(request); - // Do something. - for (ApiSpec element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapispecrevisions_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisionsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisionsPaged.java deleted file mode 100644 index 44ce4d915801..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/AsyncListApiSpecRevisionsPaged.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapispecrevisions_paged_async] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.common.base.Strings; - -public class AsyncListApiSpecRevisionsPaged { - - public static void main(String[] args) throws Exception { - asyncListApiSpecRevisionsPaged(); - } - - public static void asyncListApiSpecRevisionsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiSpecRevisionsRequest request = - ListApiSpecRevisionsRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListApiSpecRevisionsResponse response = - registryClient.listApiSpecRevisionsCallable().call(request); - for (ApiSpec element : response.getApiSpecsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapispecrevisions_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/SyncListApiSpecRevisions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/SyncListApiSpecRevisions.java deleted file mode 100644 index 82546dc920db..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecrevisions/SyncListApiSpecRevisions.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapispecrevisions_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApiSpecRevisions { - - public static void main(String[] args) throws Exception { - syncListApiSpecRevisions(); - } - - public static void syncListApiSpecRevisions() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiSpecRevisionsRequest request = - ListApiSpecRevisionsRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (ApiSpec element : registryClient.listApiSpecRevisions(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapispecrevisions_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecs.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecs.java deleted file mode 100644 index bf7d21357af0..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecs.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapispecs_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncListApiSpecs { - - public static void main(String[] args) throws Exception { - asyncListApiSpecs(); - } - - public static void asyncListApiSpecs() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiSpecsRequest request = - ListApiSpecsRequest.newBuilder() - .setParent( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - ApiFuture future = registryClient.listApiSpecsPagedCallable().futureCall(request); - // Do something. - for (ApiSpec element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapispecs_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecsPaged.java deleted file mode 100644 index 2777f1ea73f2..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/AsyncListApiSpecsPaged.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapispecs_paged_async] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsResponse; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.common.base.Strings; - -public class AsyncListApiSpecsPaged { - - public static void main(String[] args) throws Exception { - asyncListApiSpecsPaged(); - } - - public static void asyncListApiSpecsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiSpecsRequest request = - ListApiSpecsRequest.newBuilder() - .setParent( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - while (true) { - ListApiSpecsResponse response = registryClient.listApiSpecsCallable().call(request); - for (ApiSpec element : response.getApiSpecsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapispecs_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecs.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecs.java deleted file mode 100644 index 8845b03f4b36..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecs.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapispecs_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.ListApiSpecsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApiSpecs { - - public static void main(String[] args) throws Exception { - syncListApiSpecs(); - } - - public static void syncListApiSpecs() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiSpecsRequest request = - ListApiSpecsRequest.newBuilder() - .setParent( - ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - for (ApiSpec element : registryClient.listApiSpecs(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapispecs_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsApiversionname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsApiversionname.java deleted file mode 100644 index 58d07cf7984c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsApiversionname.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapispecs_apiversionname_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApiSpecsApiversionname { - - public static void main(String[] args) throws Exception { - syncListApiSpecsApiversionname(); - } - - public static void syncListApiSpecsApiversionname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - for (ApiSpec element : registryClient.listApiSpecs(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapispecs_apiversionname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsString.java deleted file mode 100644 index 07c6787884c6..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapispecs/SyncListApiSpecsString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapispecs_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApiSpecsString { - - public static void main(String[] args) throws Exception { - syncListApiSpecsString(); - } - - public static void syncListApiSpecsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString(); - for (ApiSpec element : registryClient.listApiSpecs(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapispecs_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersions.java deleted file mode 100644 index fdb41615ede3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersions.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapiversions_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncListApiVersions { - - public static void main(String[] args) throws Exception { - asyncListApiVersions(); - } - - public static void asyncListApiVersions() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiVersionsRequest request = - ListApiVersionsRequest.newBuilder() - .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - ApiFuture future = - registryClient.listApiVersionsPagedCallable().futureCall(request); - // Do something. - for (ApiVersion element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapiversions_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersionsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersionsPaged.java deleted file mode 100644 index 5190567e902b..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/AsyncListApiVersionsPaged.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapiversions_paged_async] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsResponse; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.common.base.Strings; - -public class AsyncListApiVersionsPaged { - - public static void main(String[] args) throws Exception { - asyncListApiVersionsPaged(); - } - - public static void asyncListApiVersionsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiVersionsRequest request = - ListApiVersionsRequest.newBuilder() - .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - while (true) { - ListApiVersionsResponse response = registryClient.listApiVersionsCallable().call(request); - for (ApiVersion element : response.getApiVersionsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapiversions_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersions.java deleted file mode 100644 index 1fb8ef3b5748..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersions.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapiversions_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.ListApiVersionsRequest; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApiVersions { - - public static void main(String[] args) throws Exception { - syncListApiVersions(); - } - - public static void syncListApiVersions() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListApiVersionsRequest request = - ListApiVersionsRequest.newBuilder() - .setParent(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - for (ApiVersion element : registryClient.listApiVersions(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapiversions_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsApiname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsApiname.java deleted file mode 100644 index c12418cf1f5f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsApiname.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapiversions_apiname_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApiVersionsApiname { - - public static void main(String[] args) throws Exception { - syncListApiVersionsApiname(); - } - - public static void syncListApiVersionsApiname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - for (ApiVersion element : registryClient.listApiVersions(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapiversions_apiname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsString.java deleted file mode 100644 index 0b4c9f8cb64b..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listapiversions/SyncListApiVersionsString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listapiversions_string_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListApiVersionsString { - - public static void main(String[] args) throws Exception { - syncListApiVersionsString(); - } - - public static void syncListApiVersionsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString(); - for (ApiVersion element : registryClient.listApiVersions(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listapiversions_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifacts.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifacts.java deleted file mode 100644 index 0051809ad05e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifacts.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listartifacts_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class AsyncListArtifacts { - - public static void main(String[] args) throws Exception { - asyncListArtifacts(); - } - - public static void asyncListArtifacts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListArtifactsRequest request = - ListArtifactsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - ApiFuture future = registryClient.listArtifactsPagedCallable().futureCall(request); - // Do something. - for (Artifact element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listartifacts_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifactsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifactsPaged.java deleted file mode 100644 index 0a6b8453eef5..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/AsyncListArtifactsPaged.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listartifacts_paged_async] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; -import com.google.cloud.apigeeregistry.v1.ListArtifactsResponse; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.common.base.Strings; - -public class AsyncListArtifactsPaged { - - public static void main(String[] args) throws Exception { - asyncListArtifactsPaged(); - } - - public static void asyncListArtifactsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListArtifactsRequest request = - ListArtifactsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - while (true) { - ListArtifactsResponse response = registryClient.listArtifactsCallable().call(request); - for (Artifact element : response.getArtifactsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listartifacts_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifacts.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifacts.java deleted file mode 100644 index fd615e118771..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifacts.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listartifacts_sync] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.ListArtifactsRequest; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListArtifacts { - - public static void main(String[] args) throws Exception { - syncListArtifacts(); - } - - public static void syncListArtifacts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListArtifactsRequest request = - ListArtifactsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .build(); - for (Artifact element : registryClient.listArtifacts(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listartifacts_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApideploymentname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApideploymentname.java deleted file mode 100644 index 1cdb0f1c956f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApideploymentname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listartifacts_apideploymentname_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListArtifactsApideploymentname { - - public static void main(String[] args) throws Exception { - syncListArtifactsApideploymentname(); - } - - public static void syncListArtifactsApideploymentname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiDeploymentName parent = - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]"); - for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listartifacts_apideploymentname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiname.java deleted file mode 100644 index 984fa15cf138..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiname.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listartifacts_apiname_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListArtifactsApiname { - - public static void main(String[] args) throws Exception { - syncListArtifactsApiname(); - } - - public static void syncListArtifactsApiname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiName parent = ApiName.of("[PROJECT]", "[LOCATION]", "[API]"); - for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listartifacts_apiname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApispecname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApispecname.java deleted file mode 100644 index 9cab7f5f45e5..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApispecname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listartifacts_apispecname_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListArtifactsApispecname { - - public static void main(String[] args) throws Exception { - syncListArtifactsApispecname(); - } - - public static void syncListArtifactsApispecname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiSpecName parent = - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]"); - for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listartifacts_apispecname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiversionname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiversionname.java deleted file mode 100644 index a2254f141067..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsApiversionname.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listartifacts_apiversionname_sync] -import com.google.cloud.apigeeregistry.v1.ApiVersionName; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListArtifactsApiversionname { - - public static void main(String[] args) throws Exception { - syncListArtifactsApiversionname(); - } - - public static void syncListArtifactsApiversionname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiVersionName parent = ApiVersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); - for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listartifacts_apiversionname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsLocationname.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsLocationname.java deleted file mode 100644 index c42e32bbcff6..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsLocationname.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listartifacts_locationname_sync] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListArtifactsLocationname { - - public static void main(String[] args) throws Exception { - syncListArtifactsLocationname(); - } - - public static void syncListArtifactsLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listartifacts_locationname_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsString.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsString.java deleted file mode 100644 index a0325da34c81..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listartifacts/SyncListArtifactsString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listartifacts_string_sync] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.LocationName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncListArtifactsString { - - public static void main(String[] args) throws Exception { - syncListArtifactsString(); - } - - public static void syncListArtifactsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (Artifact element : registryClient.listArtifacts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listartifacts_string_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocations.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocations.java deleted file mode 100644 index d0c49739358f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocations.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listlocations_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.location.ListLocationsRequest; -import com.google.cloud.location.Location; - -public class AsyncListLocations { - - public static void main(String[] args) throws Exception { - asyncListLocations(); - } - - public static void asyncListLocations() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListLocationsRequest request = - ListLocationsRequest.newBuilder() - .setName("name3373707") - .setFilter("filter-1274492040") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = registryClient.listLocationsPagedCallable().futureCall(request); - // Do something. - for (Location element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listlocations_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocationsPaged.java deleted file mode 100644 index 676517e644e8..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/AsyncListLocationsPaged.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listlocations_paged_async] -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.location.ListLocationsRequest; -import com.google.cloud.location.ListLocationsResponse; -import com.google.cloud.location.Location; -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 for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListLocationsRequest request = - ListLocationsRequest.newBuilder() - .setName("name3373707") - .setFilter("filter-1274492040") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListLocationsResponse response = registryClient.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 apigeeregistry_v1_generated_registryclient_listlocations_paged_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/SyncListLocations.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/SyncListLocations.java deleted file mode 100644 index 3d2c7b2be33a..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/listlocations/SyncListLocations.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_listlocations_sync] -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.location.ListLocationsRequest; -import com.google.cloud.location.Location; - -public class SyncListLocations { - - public static void main(String[] args) throws Exception { - syncListLocations(); - } - - public static void syncListLocations() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ListLocationsRequest request = - ListLocationsRequest.newBuilder() - .setName("name3373707") - .setFilter("filter-1274492040") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (Location element : registryClient.listLocations(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END apigeeregistry_v1_generated_registryclient_listlocations_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/AsyncReplaceArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/AsyncReplaceArtifact.java deleted file mode 100644 index 73c9abb210f4..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/AsyncReplaceArtifact.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_replaceartifact_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; - -public class AsyncReplaceArtifact { - - public static void main(String[] args) throws Exception { - asyncReplaceArtifact(); - } - - public static void asyncReplaceArtifact() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ReplaceArtifactRequest request = - ReplaceArtifactRequest.newBuilder().setArtifact(Artifact.newBuilder().build()).build(); - ApiFuture future = registryClient.replaceArtifactCallable().futureCall(request); - // Do something. - Artifact response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_replaceartifact_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifact.java deleted file mode 100644 index 2c06353f97b3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifact.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_replaceartifact_sync] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; - -public class SyncReplaceArtifact { - - public static void main(String[] args) throws Exception { - syncReplaceArtifact(); - } - - public static void syncReplaceArtifact() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ReplaceArtifactRequest request = - ReplaceArtifactRequest.newBuilder().setArtifact(Artifact.newBuilder().build()).build(); - Artifact response = registryClient.replaceArtifact(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_replaceartifact_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifactArtifact.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifactArtifact.java deleted file mode 100644 index 0b42cdd1e7c0..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/replaceartifact/SyncReplaceArtifactArtifact.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_replaceartifact_artifact_sync] -import com.google.cloud.apigeeregistry.v1.Artifact; -import com.google.cloud.apigeeregistry.v1.RegistryClient; - -public class SyncReplaceArtifactArtifact { - - public static void main(String[] args) throws Exception { - syncReplaceArtifactArtifact(); - } - - public static void syncReplaceArtifactArtifact() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - Artifact artifact = Artifact.newBuilder().build(); - Artifact response = registryClient.replaceArtifact(artifact); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_replaceartifact_artifact_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/AsyncRollbackApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/AsyncRollbackApiDeployment.java deleted file mode 100644 index 07a106c038e9..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/AsyncRollbackApiDeployment.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_rollbackapideployment_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; - -public class AsyncRollbackApiDeployment { - - public static void main(String[] args) throws Exception { - asyncRollbackApiDeployment(); - } - - public static void asyncRollbackApiDeployment() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - RollbackApiDeploymentRequest request = - RollbackApiDeploymentRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setRevisionId("revisionId-1507445162") - .build(); - ApiFuture future = - registryClient.rollbackApiDeploymentCallable().futureCall(request); - // Do something. - ApiDeployment response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_rollbackapideployment_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/SyncRollbackApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/SyncRollbackApiDeployment.java deleted file mode 100644 index f3b555d0682d..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapideployment/SyncRollbackApiDeployment.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_rollbackapideployment_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; - -public class SyncRollbackApiDeployment { - - public static void main(String[] args) throws Exception { - syncRollbackApiDeployment(); - } - - public static void syncRollbackApiDeployment() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - RollbackApiDeploymentRequest request = - RollbackApiDeploymentRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setRevisionId("revisionId-1507445162") - .build(); - ApiDeployment response = registryClient.rollbackApiDeployment(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_rollbackapideployment_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/AsyncRollbackApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/AsyncRollbackApiSpec.java deleted file mode 100644 index b86cbfecbeda..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/AsyncRollbackApiSpec.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_rollbackapispec_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; - -public class AsyncRollbackApiSpec { - - public static void main(String[] args) throws Exception { - asyncRollbackApiSpec(); - } - - public static void asyncRollbackApiSpec() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - RollbackApiSpecRequest request = - RollbackApiSpecRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setRevisionId("revisionId-1507445162") - .build(); - ApiFuture future = registryClient.rollbackApiSpecCallable().futureCall(request); - // Do something. - ApiSpec response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_rollbackapispec_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/SyncRollbackApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/SyncRollbackApiSpec.java deleted file mode 100644 index ac7ff6ea4a5f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/rollbackapispec/SyncRollbackApiSpec.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_rollbackapispec_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; - -public class SyncRollbackApiSpec { - - public static void main(String[] args) throws Exception { - syncRollbackApiSpec(); - } - - public static void syncRollbackApiSpec() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - RollbackApiSpecRequest request = - RollbackApiSpecRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setRevisionId("revisionId-1507445162") - .build(); - ApiSpec response = registryClient.rollbackApiSpec(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_rollbackapispec_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/AsyncSetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/AsyncSetIamPolicy.java deleted file mode 100644 index 7963d25cddb3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/AsyncSetIamPolicy.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_setiampolicy_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.protobuf.FieldMask; - -public class AsyncSetIamPolicy { - - public static void main(String[] args) throws Exception { - asyncSetIamPolicy(); - } - - public static void asyncSetIamPolicy() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = registryClient.setIamPolicyCallable().futureCall(request); - // Do something. - Policy response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_setiampolicy_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/SyncSetIamPolicy.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/SyncSetIamPolicy.java deleted file mode 100644 index 7d372e8e4b0c..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/setiampolicy/SyncSetIamPolicy.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_setiampolicy_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.protobuf.FieldMask; - -public class SyncSetIamPolicy { - - public static void main(String[] args) throws Exception { - syncSetIamPolicy(); - } - - public static void syncSetIamPolicy() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - Policy response = registryClient.setIamPolicy(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_setiampolicy_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/AsyncTagApiDeploymentRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/AsyncTagApiDeploymentRevision.java deleted file mode 100644 index 5b6c0316231f..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/AsyncTagApiDeploymentRevision.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_tagapideploymentrevision_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; - -public class AsyncTagApiDeploymentRevision { - - public static void main(String[] args) throws Exception { - asyncTagApiDeploymentRevision(); - } - - public static void asyncTagApiDeploymentRevision() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - TagApiDeploymentRevisionRequest request = - TagApiDeploymentRevisionRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setTag("tag114586") - .build(); - ApiFuture future = - registryClient.tagApiDeploymentRevisionCallable().futureCall(request); - // Do something. - ApiDeployment response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_tagapideploymentrevision_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/SyncTagApiDeploymentRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/SyncTagApiDeploymentRevision.java deleted file mode 100644 index 928a0038d9e5..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapideploymentrevision/SyncTagApiDeploymentRevision.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_tagapideploymentrevision_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.ApiDeploymentName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; - -public class SyncTagApiDeploymentRevision { - - public static void main(String[] args) throws Exception { - syncTagApiDeploymentRevision(); - } - - public static void syncTagApiDeploymentRevision() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - TagApiDeploymentRevisionRequest request = - TagApiDeploymentRevisionRequest.newBuilder() - .setName( - ApiDeploymentName.of("[PROJECT]", "[LOCATION]", "[API]", "[DEPLOYMENT]") - .toString()) - .setTag("tag114586") - .build(); - ApiDeployment response = registryClient.tagApiDeploymentRevision(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_tagapideploymentrevision_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/AsyncTagApiSpecRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/AsyncTagApiSpecRevision.java deleted file mode 100644 index 9123d1aaa3d2..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/AsyncTagApiSpecRevision.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_tagapispecrevision_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; - -public class AsyncTagApiSpecRevision { - - public static void main(String[] args) throws Exception { - asyncTagApiSpecRevision(); - } - - public static void asyncTagApiSpecRevision() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - TagApiSpecRevisionRequest request = - TagApiSpecRevisionRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setTag("tag114586") - .build(); - ApiFuture future = registryClient.tagApiSpecRevisionCallable().futureCall(request); - // Do something. - ApiSpec response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_tagapispecrevision_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/SyncTagApiSpecRevision.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/SyncTagApiSpecRevision.java deleted file mode 100644 index 12aa550553f6..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/tagapispecrevision/SyncTagApiSpecRevision.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_tagapispecrevision_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.ApiSpecName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; - -public class SyncTagApiSpecRevision { - - public static void main(String[] args) throws Exception { - syncTagApiSpecRevision(); - } - - public static void syncTagApiSpecRevision() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - TagApiSpecRevisionRequest request = - TagApiSpecRevisionRequest.newBuilder() - .setName( - ApiSpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]") - .toString()) - .setTag("tag114586") - .build(); - ApiSpec response = registryClient.tagApiSpecRevision(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_tagapispecrevision_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/AsyncTestIamPermissions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/AsyncTestIamPermissions.java deleted file mode 100644 index 56a0323c0d7d..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/AsyncTestIamPermissions.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_testiampermissions_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import java.util.ArrayList; - -public class AsyncTestIamPermissions { - - public static void main(String[] args) throws Exception { - asyncTestIamPermissions(); - } - - public static void asyncTestIamPermissions() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - ApiFuture future = - registryClient.testIamPermissionsCallable().futureCall(request); - // Do something. - TestIamPermissionsResponse response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_testiampermissions_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/SyncTestIamPermissions.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/SyncTestIamPermissions.java deleted file mode 100644 index b567d5c389c5..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/testiampermissions/SyncTestIamPermissions.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_testiampermissions_sync] -import com.google.cloud.apigeeregistry.v1.ApiName; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import java.util.ArrayList; - -public class SyncTestIamPermissions { - - public static void main(String[] args) throws Exception { - syncTestIamPermissions(); - } - - public static void syncTestIamPermissions() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(ApiName.of("[PROJECT]", "[LOCATION]", "[API]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - TestIamPermissionsResponse response = registryClient.testIamPermissions(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_testiampermissions_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/AsyncUpdateApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/AsyncUpdateApi.java deleted file mode 100644 index ee54ffa51d26..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/AsyncUpdateApi.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapi_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateApi { - - public static void main(String[] args) throws Exception { - asyncUpdateApi(); - } - - public static void asyncUpdateApi() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - UpdateApiRequest request = - UpdateApiRequest.newBuilder() - .setApi(Api.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .setAllowMissing(true) - .build(); - ApiFuture future = registryClient.updateApiCallable().futureCall(request); - // Do something. - Api response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapi_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApi.java deleted file mode 100644 index 125841bd728d..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApi.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapi_sync] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.UpdateApiRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateApi { - - public static void main(String[] args) throws Exception { - syncUpdateApi(); - } - - public static void syncUpdateApi() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - UpdateApiRequest request = - UpdateApiRequest.newBuilder() - .setApi(Api.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .setAllowMissing(true) - .build(); - Api response = registryClient.updateApi(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapi_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApiApiFieldmask.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApiApiFieldmask.java deleted file mode 100644 index 0f631b0525a3..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapi/SyncUpdateApiApiFieldmask.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapi_apifieldmask_sync] -import com.google.cloud.apigeeregistry.v1.Api; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateApiApiFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateApiApiFieldmask(); - } - - public static void syncUpdateApiApiFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - Api api = Api.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - Api response = registryClient.updateApi(api, updateMask); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapi_apifieldmask_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/AsyncUpdateApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/AsyncUpdateApiDeployment.java deleted file mode 100644 index e4e1db217822..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/AsyncUpdateApiDeployment.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapideployment_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateApiDeployment { - - public static void main(String[] args) throws Exception { - asyncUpdateApiDeployment(); - } - - public static void asyncUpdateApiDeployment() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - UpdateApiDeploymentRequest request = - UpdateApiDeploymentRequest.newBuilder() - .setApiDeployment(ApiDeployment.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .setAllowMissing(true) - .build(); - ApiFuture future = - registryClient.updateApiDeploymentCallable().futureCall(request); - // Do something. - ApiDeployment response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapideployment_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeployment.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeployment.java deleted file mode 100644 index a0a6746f08ce..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeployment.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapideployment_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateApiDeployment { - - public static void main(String[] args) throws Exception { - syncUpdateApiDeployment(); - } - - public static void syncUpdateApiDeployment() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - UpdateApiDeploymentRequest request = - UpdateApiDeploymentRequest.newBuilder() - .setApiDeployment(ApiDeployment.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .setAllowMissing(true) - .build(); - ApiDeployment response = registryClient.updateApiDeployment(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapideployment_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeploymentApideploymentFieldmask.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeploymentApideploymentFieldmask.java deleted file mode 100644 index 44f18b3919cf..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapideployment/SyncUpdateApiDeploymentApideploymentFieldmask.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapideployment_apideploymentfieldmask_sync] -import com.google.cloud.apigeeregistry.v1.ApiDeployment; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateApiDeploymentApideploymentFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateApiDeploymentApideploymentFieldmask(); - } - - public static void syncUpdateApiDeploymentApideploymentFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiDeployment apiDeployment = ApiDeployment.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - ApiDeployment response = registryClient.updateApiDeployment(apiDeployment, updateMask); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapideployment_apideploymentfieldmask_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/AsyncUpdateApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/AsyncUpdateApiSpec.java deleted file mode 100644 index 42c102d2d031..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/AsyncUpdateApiSpec.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapispec_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateApiSpec { - - public static void main(String[] args) throws Exception { - asyncUpdateApiSpec(); - } - - public static void asyncUpdateApiSpec() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - UpdateApiSpecRequest request = - UpdateApiSpecRequest.newBuilder() - .setApiSpec(ApiSpec.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .setAllowMissing(true) - .build(); - ApiFuture future = registryClient.updateApiSpecCallable().futureCall(request); - // Do something. - ApiSpec response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapispec_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpec.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpec.java deleted file mode 100644 index 56b4fbb452aa..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpec.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapispec_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateApiSpec { - - public static void main(String[] args) throws Exception { - syncUpdateApiSpec(); - } - - public static void syncUpdateApiSpec() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - UpdateApiSpecRequest request = - UpdateApiSpecRequest.newBuilder() - .setApiSpec(ApiSpec.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .setAllowMissing(true) - .build(); - ApiSpec response = registryClient.updateApiSpec(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapispec_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpecApispecFieldmask.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpecApispecFieldmask.java deleted file mode 100644 index 9060fc6a875b..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapispec/SyncUpdateApiSpecApispecFieldmask.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapispec_apispecfieldmask_sync] -import com.google.cloud.apigeeregistry.v1.ApiSpec; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateApiSpecApispecFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateApiSpecApispecFieldmask(); - } - - public static void syncUpdateApiSpecApispecFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiSpec apiSpec = ApiSpec.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - ApiSpec response = registryClient.updateApiSpec(apiSpec, updateMask); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapispec_apispecfieldmask_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/AsyncUpdateApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/AsyncUpdateApiVersion.java deleted file mode 100644 index 0b14a830ca6b..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/AsyncUpdateApiVersion.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapiversion_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateApiVersion { - - public static void main(String[] args) throws Exception { - asyncUpdateApiVersion(); - } - - public static void asyncUpdateApiVersion() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - UpdateApiVersionRequest request = - UpdateApiVersionRequest.newBuilder() - .setApiVersion(ApiVersion.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .setAllowMissing(true) - .build(); - ApiFuture future = registryClient.updateApiVersionCallable().futureCall(request); - // Do something. - ApiVersion response = future.get(); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapiversion_async] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersion.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersion.java deleted file mode 100644 index 814ae104f0ec..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersion.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapiversion_sync] -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateApiVersion { - - public static void main(String[] args) throws Exception { - syncUpdateApiVersion(); - } - - public static void syncUpdateApiVersion() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - UpdateApiVersionRequest request = - UpdateApiVersionRequest.newBuilder() - .setApiVersion(ApiVersion.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .setAllowMissing(true) - .build(); - ApiVersion response = registryClient.updateApiVersion(request); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapiversion_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersionApiversionFieldmask.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersionApiversionFieldmask.java deleted file mode 100644 index 0e102b91b2f9..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registryclient/updateapiversion/SyncUpdateApiVersionApiversionFieldmask.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registryclient_updateapiversion_apiversionfieldmask_sync] -import com.google.cloud.apigeeregistry.v1.ApiVersion; -import com.google.cloud.apigeeregistry.v1.RegistryClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateApiVersionApiversionFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateApiVersionApiversionFieldmask(); - } - - public static void syncUpdateApiVersionApiversionFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (RegistryClient registryClient = RegistryClient.create()) { - ApiVersion apiVersion = ApiVersion.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - ApiVersion response = registryClient.updateApiVersion(apiVersion, updateMask); - } - } -} -// [END apigeeregistry_v1_generated_registryclient_updateapiversion_apiversionfieldmask_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registrysettings/getapi/SyncGetApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registrysettings/getapi/SyncGetApi.java deleted file mode 100644 index 7b196b6b1f3e..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/registrysettings/getapi/SyncGetApi.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.samples; - -// [START apigeeregistry_v1_generated_registrysettings_getapi_sync] -import com.google.cloud.apigeeregistry.v1.RegistrySettings; -import java.time.Duration; - -public class SyncGetApi { - - public static void main(String[] args) throws Exception { - syncGetApi(); - } - - public static void syncGetApi() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - RegistrySettings.Builder registrySettingsBuilder = RegistrySettings.newBuilder(); - registrySettingsBuilder - .getApiSettings() - .setRetrySettings( - registrySettingsBuilder - .getApiSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - RegistrySettings registrySettings = registrySettingsBuilder.build(); - } -} -// [END apigeeregistry_v1_generated_registrysettings_getapi_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/provisioningstubsettings/getinstance/SyncGetInstance.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/provisioningstubsettings/getinstance/SyncGetInstance.java deleted file mode 100644 index b0108ac821d8..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/provisioningstubsettings/getinstance/SyncGetInstance.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub.samples; - -// [START apigeeregistry_v1_generated_provisioningstubsettings_getinstance_sync] -import com.google.cloud.apigeeregistry.v1.stub.ProvisioningStubSettings; -import java.time.Duration; - -public class SyncGetInstance { - - public static void main(String[] args) throws Exception { - syncGetInstance(); - } - - public static void syncGetInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - ProvisioningStubSettings.Builder provisioningSettingsBuilder = - ProvisioningStubSettings.newBuilder(); - provisioningSettingsBuilder - .getInstanceSettings() - .setRetrySettings( - provisioningSettingsBuilder - .getInstanceSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ProvisioningStubSettings provisioningSettings = provisioningSettingsBuilder.build(); - } -} -// [END apigeeregistry_v1_generated_provisioningstubsettings_getinstance_sync] diff --git a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/registrystubsettings/getapi/SyncGetApi.java b/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/registrystubsettings/getapi/SyncGetApi.java deleted file mode 100644 index 9452577469a1..000000000000 --- a/owl-bot-staging/java-apigee-registry/v1/samples/snippets/generated/com/google/cloud/apigeeregistry/v1/stub/registrystubsettings/getapi/SyncGetApi.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.apigeeregistry.v1.stub.samples; - -// [START apigeeregistry_v1_generated_registrystubsettings_getapi_sync] -import com.google.cloud.apigeeregistry.v1.stub.RegistryStubSettings; -import java.time.Duration; - -public class SyncGetApi { - - public static void main(String[] args) throws Exception { - syncGetApi(); - } - - public static void syncGetApi() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - RegistryStubSettings.Builder registrySettingsBuilder = RegistryStubSettings.newBuilder(); - registrySettingsBuilder - .getApiSettings() - .setRetrySettings( - registrySettingsBuilder - .getApiSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - RegistryStubSettings registrySettings = registrySettingsBuilder.build(); - } -} -// [END apigeeregistry_v1_generated_registrystubsettings_getapi_sync]