From 6e35902716584603a61fe7253078188191c46d7d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 15 Feb 2023 14:03:04 -0500 Subject: [PATCH] feat: [artifactregistry] add format-specific resources `MavenArtifact`, `NpmPackage`, `KfpArtifact` and `PythonPackage` (#9080) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add format-specific resources `MavenArtifact`, `NpmPackage`, `KfpArtifact` and `PythonPackage` feat: add `order_by` to `ListDockerImages` feat: add an API to get and update VPCSC config feat: add `BatchDeleteVersionMetadata` to return version that failed to delete fix!: make `GetFileRequest.name` and `ListFilesRequest.parent` required fix: make `Package` a resource fix: deprecate `REDIRECTION_FROM_GCR_IO_FINALIZED` PiperOrigin-RevId: 506935629 Source-Link: https://github.com/googleapis/googleapis/commit/c807b741ff0687cb002897e0c92ef8f74f5d0049 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d43260cabeeceeb06fb9f275d907454a67945486 Copy-Tag: eyJwIjoiamF2YS1hcnRpZmFjdC1yZWdpc3RyeS8uT3dsQm90LnlhbWwiLCJoIjoiZDQzMjYwY2FiZWVjZWViMDZmYjlmMjc1ZDkwNzQ1NGE2Nzk0NTQ4NiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- java-artifact-registry/README.md | 6 +- .../v1/ArtifactRegistryClient.java | 1610 ++++++++++++- .../v1/ArtifactRegistrySettings.java | 98 + .../artifactregistry/v1/gapic_metadata.json | 34 +- .../v1/stub/ArtifactRegistryStub.java | 67 + .../v1/stub/ArtifactRegistryStubSettings.java | 403 ++++ .../v1/stub/GrpcArtifactRegistryStub.java | 313 +++ .../v1/stub/HttpJsonArtifactRegistryStub.java | 481 ++++ .../ArtifactRegistryClientHttpJsonTest.java | 1072 ++++++++- .../v1/ArtifactRegistryClientTest.java | 898 +++++++- .../v1/MockArtifactRegistryImpl.java | 170 ++ .../v1/ArtifactRegistryGrpc.java | 1099 ++++++++- .../artifactregistry/v1/ArtifactProto.java | 251 ++- .../v1/BatchDeleteVersionsMetadata.java | 736 ++++++ .../BatchDeleteVersionsMetadataOrBuilder.java | 76 + .../v1/DeletePackageRequest.java | 28 +- .../v1/DeletePackageRequestOrBuilder.java | 8 +- .../artifactregistry/v1/DockerImage.java | 309 ++- .../v1/DockerImageOrBuilder.java | 46 +- .../devtools/artifactregistry/v1/File.java | 418 +++- .../artifactregistry/v1/FileName.java | 257 +++ .../artifactregistry/v1/FileOrBuilder.java | 71 +- .../artifactregistry/v1/FileProto.java | 65 +- .../artifactregistry/v1/GetFileRequest.java | 42 +- .../v1/GetFileRequestOrBuilder.java | 12 +- .../v1/GetMavenArtifactRequest.java | 651 ++++++ .../v1/GetMavenArtifactRequestOrBuilder.java | 54 + .../v1/GetNpmPackageRequest.java | 648 ++++++ .../v1/GetNpmPackageRequestOrBuilder.java | 54 + .../v1/GetPackageRequest.java | 28 +- .../v1/GetPackageRequestOrBuilder.java | 8 +- .../v1/GetPythonPackageRequest.java | 651 ++++++ .../v1/GetPythonPackageRequestOrBuilder.java | 54 + .../v1/GetVPCSCConfigRequest.java | 648 ++++++ .../v1/GetVPCSCConfigRequestOrBuilder.java | 54 + .../v1/ListDockerImagesRequest.java | 203 +- .../v1/ListDockerImagesRequestOrBuilder.java | 31 +- .../artifactregistry/v1/ListFilesRequest.java | 56 +- .../v1/ListFilesRequestOrBuilder.java | 16 +- .../v1/ListMavenArtifactsRequest.java | 935 ++++++++ .../ListMavenArtifactsRequestOrBuilder.java | 94 + .../v1/ListMavenArtifactsResponse.java | 1159 ++++++++++ .../ListMavenArtifactsResponseOrBuilder.java | 105 + .../v1/ListNpmPackagesRequest.java | 932 ++++++++ .../v1/ListNpmPackagesRequestOrBuilder.java | 94 + .../v1/ListNpmPackagesResponse.java | 1148 ++++++++++ .../v1/ListNpmPackagesResponseOrBuilder.java | 104 + .../v1/ListPackagesRequest.java | 28 +- .../v1/ListPackagesRequestOrBuilder.java | 8 +- .../v1/ListPythonPackagesRequest.java | 935 ++++++++ .../ListPythonPackagesRequestOrBuilder.java | 94 + .../v1/ListPythonPackagesResponse.java | 1159 ++++++++++ .../ListPythonPackagesResponseOrBuilder.java | 105 + .../artifactregistry/v1/MavenArtifact.java | 1997 +++++++++++++++++ .../v1/MavenArtifactName.java | 269 +++ .../v1/MavenArtifactOrBuilder.java | 248 ++ .../artifactregistry/v1/NpmPackage.java | 1874 ++++++++++++++++ .../artifactregistry/v1/NpmPackageName.java | 269 +++ .../v1/NpmPackageOrBuilder.java | 239 ++ .../artifactregistry/v1/PackageName.java | 261 +++ .../artifactregistry/v1/PackageProto.java | 48 +- .../artifactregistry/v1/ProjectSettings.java | 7 +- .../artifactregistry/v1/PythonPackage.java | 1808 +++++++++++++++ .../v1/PythonPackageName.java | 269 +++ .../v1/PythonPackageOrBuilder.java | 221 ++ .../artifactregistry/v1/ServiceProto.java | 376 ++-- .../artifactregistry/v1/SettingsProto.java | 38 +- .../v1/UpdateVPCSCConfigRequest.java | 981 ++++++++ .../v1/UpdateVPCSCConfigRequestOrBuilder.java | 95 + .../artifactregistry/v1/VPCSCConfig.java | 988 ++++++++ .../v1/VPCSCConfigOrBuilder.java | 85 + .../artifactregistry/v1/VPCSCConfigProto.java | 122 + .../devtools/artifactregistry/v1/Version.java | 36 +- .../artifactregistry/v1/VersionOrBuilder.java | 9 +- .../artifactregistry/v1/VersionProto.java | 32 +- .../artifactregistry/v1/VpcscConfigName.java | 192 ++ .../artifactregistry/v1/apt_artifact.proto | 4 +- .../artifactregistry/v1/artifact.proto | 245 +- .../devtools/artifactregistry/v1/file.proto | 36 +- .../artifactregistry/v1/package.proto | 20 +- .../artifactregistry/v1/service.proto | 109 +- .../artifactregistry/v1/settings.proto | 2 +- .../artifactregistry/v1/version.proto | 12 +- .../artifactregistry/v1/vpcsc_config.proto | 86 + .../artifactregistry/v1/yum_artifact.proto | 4 +- .../deletepackage/AsyncDeletePackage.java | 6 +- .../deletepackage/AsyncDeletePackageLRO.java | 6 +- .../deletepackage/SyncDeletePackage.java | 6 +- .../SyncDeletePackagePackagename.java | 42 + .../SyncDeletePackageString.java | 4 +- .../getfile/AsyncGetFile.java | 6 +- .../artifactregistry/getfile/SyncGetFile.java | 6 +- .../getfile/SyncGetFileFilename.java | 42 + .../getfile/SyncGetFileString.java | 3 +- .../AsyncGetMavenArtifact.java | 53 + .../SyncGetMavenArtifact.java | 49 + ...SyncGetMavenArtifactMavenartifactname.java | 43 + .../SyncGetMavenArtifactString.java | 44 + .../getnpmpackage/AsyncGetNpmPackage.java | 52 + .../getnpmpackage/SyncGetNpmPackage.java | 48 + .../SyncGetNpmPackageNpmpackagename.java | 43 + .../SyncGetNpmPackageString.java | 43 + .../getpackage/AsyncGetPackage.java | 7 +- .../getpackage/SyncGetPackage.java | 7 +- .../getpackage/SyncGetPackagePackagename.java | 42 + .../getpackage/SyncGetPackageString.java | 4 +- .../AsyncGetPythonPackage.java | 53 + .../SyncGetPythonPackage.java | 49 + ...SyncGetPythonPackagePythonpackagename.java | 43 + .../SyncGetPythonPackageString.java | 44 + .../getvpcscconfig/AsyncGetVPCSCConfig.java | 50 + .../getvpcscconfig/SyncGetVPCSCConfig.java | 46 + .../SyncGetVPCSCConfigString.java | 42 + .../SyncGetVPCSCConfigVpcscconfigname.java | 42 + .../AsyncListDockerImages.java | 1 + .../AsyncListDockerImagesPaged.java | 1 + .../SyncListDockerImages.java | 1 + .../listfiles/AsyncListFiles.java | 3 +- .../listfiles/AsyncListFilesPaged.java | 3 +- .../listfiles/SyncListFiles.java | 3 +- .../SyncListFilesRepositoryname.java | 44 + .../listfiles/SyncListFilesString.java | 3 +- .../AsyncListMavenArtifacts.java | 54 + .../AsyncListMavenArtifactsPaged.java | 62 + .../SyncListMavenArtifacts.java | 51 + .../SyncListMavenArtifactsRepositoryname.java | 44 + .../SyncListMavenArtifactsString.java | 44 + .../listnpmpackages/AsyncListNpmPackages.java | 54 + .../AsyncListNpmPackagesPaged.java | 62 + .../listnpmpackages/SyncListNpmPackages.java | 50 + .../SyncListNpmPackagesRepositoryname.java | 44 + .../SyncListNpmPackagesString.java | 44 + .../listpackages/AsyncListPackages.java | 3 +- .../listpackages/AsyncListPackagesPaged.java | 3 +- .../listpackages/SyncListPackages.java | 3 +- .../SyncListPackagesRepositoryname.java | 44 + .../listpackages/SyncListPackagesString.java | 3 +- .../AsyncListPythonPackages.java | 54 + .../AsyncListPythonPackagesPaged.java | 62 + .../SyncListPythonPackages.java | 51 + .../SyncListPythonPackagesRepositoryname.java | 44 + .../SyncListPythonPackagesString.java | 44 + .../AsyncUpdateVPCSCConfig.java | 51 + .../SyncUpdateVPCSCConfig.java | 47 + ...UpdateVPCSCConfigVpcscconfigFieldmask.java | 43 + 145 files changed, 30876 insertions(+), 677 deletions(-) create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsMetadata.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsMetadataOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileName.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetMavenArtifactRequest.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetMavenArtifactRequestOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetNpmPackageRequest.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetNpmPackageRequestOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPythonPackageRequest.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPythonPackageRequestOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetVPCSCConfigRequest.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetVPCSCConfigRequestOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsRequest.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsRequestOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsResponse.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsResponseOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesRequest.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesRequestOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesResponse.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesResponseOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesRequest.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesRequestOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesResponse.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesResponseOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifact.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifactName.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifactOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackage.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackageName.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackageOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageName.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackage.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackageName.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackageOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpdateVPCSCConfigRequest.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpdateVPCSCConfigRequestOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfig.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfigOrBuilder.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfigProto.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VpcscConfigName.java create mode 100644 java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/vpcsc_config.proto create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackagePackagename.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFileFilename.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/AsyncGetMavenArtifact.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifact.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifactMavenartifactname.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifactString.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/AsyncGetNpmPackage.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackage.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackageNpmpackagename.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackageString.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackagePackagename.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/AsyncGetPythonPackage.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackage.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackagePythonpackagename.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackageString.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/AsyncGetVPCSCConfig.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfig.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfigString.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfigVpcscconfigname.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFilesRepositoryname.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/AsyncListMavenArtifacts.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/AsyncListMavenArtifactsPaged.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifacts.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifactsRepositoryname.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifactsString.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/AsyncListNpmPackages.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/AsyncListNpmPackagesPaged.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackages.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackagesRepositoryname.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackagesString.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackagesRepositoryname.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/AsyncListPythonPackages.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/AsyncListPythonPackagesPaged.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackages.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackagesRepositoryname.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackagesString.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/AsyncUpdateVPCSCConfig.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/SyncUpdateVPCSCConfig.java create mode 100644 java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/SyncUpdateVPCSCConfigVpcscconfigFieldmask.java diff --git a/java-artifact-registry/README.md b/java-artifact-registry/README.md index 2ab197bf1919..55ef041be47a 100644 --- a/java-artifact-registry/README.md +++ b/java-artifact-registry/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-artifact-registry - 1.7.0 + 1.8.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-artifact-registry:1.7.0' +implementation 'com.google.cloud:google-cloud-artifact-registry:1.8.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-artifact-registry" % "1.7.0" +libraryDependencies += "com.google.cloud" % "google-cloud-artifact-registry" % "1.8.0" ``` ## Authentication diff --git a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClient.java b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClient.java index 2d14cd30a017..758c4c1a2af0 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClient.java +++ b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClient.java @@ -277,8 +277,857 @@ public final ListDockerImagesPagedResponse listDockerImages(String parent) { * .setParent("parent-995424086") * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (DockerImage element : artifactRegistryClient.listDockerImages(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 ListDockerImagesPagedResponse listDockerImages(ListDockerImagesRequest request) { + return listDockerImagesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists docker images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   ListDockerImagesRequest request =
+   *       ListDockerImagesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       artifactRegistryClient.listDockerImagesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DockerImage element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDockerImagesPagedCallable() { + return stub.listDockerImagesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists docker images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   ListDockerImagesRequest request =
+   *       ListDockerImagesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListDockerImagesResponse response =
+   *         artifactRegistryClient.listDockerImagesCallable().call(request);
+   *     for (DockerImage element : response.getDockerImagesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDockerImagesCallable() { + return stub.listDockerImagesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a docker image. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   DockerImageName name =
+   *       DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]");
+   *   DockerImage response = artifactRegistryClient.getDockerImage(name);
+   * }
+   * }
+ * + * @param name Required. The name of the docker images. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DockerImage getDockerImage(DockerImageName name) { + GetDockerImageRequest request = + GetDockerImageRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDockerImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a docker image. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   String name =
+   *       DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]")
+   *           .toString();
+   *   DockerImage response = artifactRegistryClient.getDockerImage(name);
+   * }
+   * }
+ * + * @param name Required. The name of the docker images. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DockerImage getDockerImage(String name) { + GetDockerImageRequest request = GetDockerImageRequest.newBuilder().setName(name).build(); + return getDockerImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a docker image. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
+   *   for (MavenArtifact element : artifactRegistryClient.listMavenArtifacts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource whose maven artifacts will be listed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMavenArtifactsPagedResponse listMavenArtifacts(RepositoryName parent) { + ListMavenArtifactsRequest request = + ListMavenArtifactsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMavenArtifacts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists maven artifacts. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
+   *   for (MavenArtifact element : artifactRegistryClient.listMavenArtifacts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource whose maven artifacts will be listed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMavenArtifactsPagedResponse listMavenArtifacts(String parent) { + ListMavenArtifactsRequest request = + ListMavenArtifactsRequest.newBuilder().setParent(parent).build(); + return listMavenArtifacts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists maven artifacts. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   ListMavenArtifactsRequest request =
+   *       ListMavenArtifactsRequest.newBuilder()
+   *           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (MavenArtifact element :
+   *       artifactRegistryClient.listMavenArtifacts(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 ListMavenArtifactsPagedResponse listMavenArtifacts( + ListMavenArtifactsRequest request) { + return listMavenArtifactsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists maven artifacts. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   MavenArtifactName name =
+   *       MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]");
+   *   MavenArtifact response = artifactRegistryClient.getMavenArtifact(name);
+   * }
+   * }
+ * + * @param name Required. The name of the maven artifact. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MavenArtifact getMavenArtifact(MavenArtifactName name) { + GetMavenArtifactRequest request = + GetMavenArtifactRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getMavenArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a maven artifact. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   String name =
+   *       MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]")
+   *           .toString();
+   *   MavenArtifact response = artifactRegistryClient.getMavenArtifact(name);
+   * }
+   * }
+ * + * @param name Required. The name of the maven artifact. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MavenArtifact getMavenArtifact(String name) { + GetMavenArtifactRequest request = GetMavenArtifactRequest.newBuilder().setName(name).build(); + return getMavenArtifact(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a maven artifact. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
+   *   for (NpmPackage element : artifactRegistryClient.listNpmPackages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource whose npm packages will be listed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNpmPackagesPagedResponse listNpmPackages(RepositoryName parent) { + ListNpmPackagesRequest request = + ListNpmPackagesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNpmPackages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists npm packages. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
+   *   for (NpmPackage element : artifactRegistryClient.listNpmPackages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource whose npm packages will be listed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNpmPackagesPagedResponse listNpmPackages(String parent) { + ListNpmPackagesRequest request = ListNpmPackagesRequest.newBuilder().setParent(parent).build(); + return listNpmPackages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists npm packages. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   ListNpmPackagesRequest request =
+   *       ListNpmPackagesRequest.newBuilder()
+   *           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (NpmPackage element : artifactRegistryClient.listNpmPackages(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 ListNpmPackagesPagedResponse listNpmPackages(ListNpmPackagesRequest request) { + return listNpmPackagesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists npm packages. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   NpmPackageName name =
+   *       NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]");
+   *   NpmPackage response = artifactRegistryClient.getNpmPackage(name);
+   * }
+   * }
+ * + * @param name Required. The name of the npm package. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NpmPackage getNpmPackage(NpmPackageName name) { + GetNpmPackageRequest request = + GetNpmPackageRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNpmPackage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a npm package. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   String name =
+   *       NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]").toString();
+   *   NpmPackage response = artifactRegistryClient.getNpmPackage(name);
+   * }
+   * }
+ * + * @param name Required. The name of the npm package. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NpmPackage getNpmPackage(String name) { + GetNpmPackageRequest request = GetNpmPackageRequest.newBuilder().setName(name).build(); + return getNpmPackage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a npm package. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
+   *   for (PythonPackage element : artifactRegistryClient.listPythonPackages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource whose python packages will be listed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPythonPackagesPagedResponse listPythonPackages(RepositoryName parent) { + ListPythonPackagesRequest request = + ListPythonPackagesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPythonPackages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists python packages. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
+   *   for (PythonPackage element : artifactRegistryClient.listPythonPackages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource whose python packages will be listed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPythonPackagesPagedResponse listPythonPackages(String parent) { + ListPythonPackagesRequest request = + ListPythonPackagesRequest.newBuilder().setParent(parent).build(); + return listPythonPackages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists python packages. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   ListPythonPackagesRequest request =
+   *       ListPythonPackagesRequest.newBuilder()
+   *           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
    *           .build();
-   *   for (DockerImage element : artifactRegistryClient.listDockerImages(request).iterateAll()) {
+   *   for (PythonPackage element :
+   *       artifactRegistryClient.listPythonPackages(request).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
@@ -287,13 +1136,14 @@ public final ListDockerImagesPagedResponse listDockerImages(String parent) {
    * @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 ListDockerImagesPagedResponse listDockerImages(ListDockerImagesRequest request) {
-    return listDockerImagesPagedCallable().call(request);
+  public final ListPythonPackagesPagedResponse listPythonPackages(
+      ListPythonPackagesRequest request) {
+    return listPythonPackagesPagedCallable().call(request);
   }
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Lists docker images.
+   * Lists python packages.
    *
    * 

Sample code: * @@ -304,29 +1154,29 @@ public final ListDockerImagesPagedResponse listDockerImages(ListDockerImagesRequ * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * ListDockerImagesRequest request = - * ListDockerImagesRequest.newBuilder() - * .setParent("parent-995424086") + * ListPythonPackagesRequest request = + * ListPythonPackagesRequest.newBuilder() + * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * artifactRegistryClient.listDockerImagesPagedCallable().futureCall(request); + * ApiFuture future = + * artifactRegistryClient.listPythonPackagesPagedCallable().futureCall(request); * // Do something. - * for (DockerImage element : future.get().iterateAll()) { + * for (PythonPackage element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * }

*/ - public final UnaryCallable - listDockerImagesPagedCallable() { - return stub.listDockerImagesPagedCallable(); + public final UnaryCallable + listPythonPackagesPagedCallable() { + return stub.listPythonPackagesPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists docker images. + * Lists python packages. * *

Sample code: * @@ -337,16 +1187,16 @@ public final ListDockerImagesPagedResponse listDockerImages(ListDockerImagesRequ * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * ListDockerImagesRequest request = - * ListDockerImagesRequest.newBuilder() - * .setParent("parent-995424086") + * ListPythonPackagesRequest request = + * ListPythonPackagesRequest.newBuilder() + * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); * while (true) { - * ListDockerImagesResponse response = - * artifactRegistryClient.listDockerImagesCallable().call(request); - * for (DockerImage element : response.getDockerImagesList()) { + * ListPythonPackagesResponse response = + * artifactRegistryClient.listPythonPackagesCallable().call(request); + * for (PythonPackage element : response.getPythonPackagesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -359,14 +1209,14 @@ public final ListDockerImagesPagedResponse listDockerImages(ListDockerImagesRequ * } * } */ - public final UnaryCallable - listDockerImagesCallable() { - return stub.listDockerImagesCallable(); + public final UnaryCallable + listPythonPackagesCallable() { + return stub.listPythonPackagesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets a docker image. + * Gets a python package. * *

Sample code: * @@ -377,24 +1227,24 @@ public final ListDockerImagesPagedResponse listDockerImages(ListDockerImagesRequ * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * DockerImageName name = - * DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]"); - * DockerImage response = artifactRegistryClient.getDockerImage(name); + * PythonPackageName name = + * PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]"); + * PythonPackage response = artifactRegistryClient.getPythonPackage(name); * } * } * - * @param name Required. The name of the docker images. + * @param name Required. The name of the python package. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DockerImage getDockerImage(DockerImageName name) { - GetDockerImageRequest request = - GetDockerImageRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getDockerImage(request); + public final PythonPackage getPythonPackage(PythonPackageName name) { + GetPythonPackageRequest request = + GetPythonPackageRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getPythonPackage(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets a docker image. + * Gets a python package. * *

Sample code: * @@ -406,23 +1256,23 @@ public final DockerImage getDockerImage(DockerImageName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { * String name = - * DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]") + * PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]") * .toString(); - * DockerImage response = artifactRegistryClient.getDockerImage(name); + * PythonPackage response = artifactRegistryClient.getPythonPackage(name); * } * } * - * @param name Required. The name of the docker images. + * @param name Required. The name of the python package. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DockerImage getDockerImage(String name) { - GetDockerImageRequest request = GetDockerImageRequest.newBuilder().setName(name).build(); - return getDockerImage(request); + public final PythonPackage getPythonPackage(String name) { + GetPythonPackageRequest request = GetPythonPackageRequest.newBuilder().setName(name).build(); + return getPythonPackage(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets a docker image. + * Gets a python package. * *

Sample code: * @@ -433,26 +1283,27 @@ public final DockerImage getDockerImage(String name) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * GetDockerImageRequest request = - * GetDockerImageRequest.newBuilder() + * GetPythonPackageRequest request = + * GetPythonPackageRequest.newBuilder() * .setName( - * DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]") + * PythonPackageName.of( + * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]") * .toString()) * .build(); - * DockerImage response = artifactRegistryClient.getDockerImage(request); + * PythonPackage response = artifactRegistryClient.getPythonPackage(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 DockerImage getDockerImage(GetDockerImageRequest request) { - return getDockerImageCallable().call(request); + public final PythonPackage getPythonPackage(GetPythonPackageRequest request) { + return getPythonPackageCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets a docker image. + * Gets a python package. * *

Sample code: * @@ -463,21 +1314,22 @@ public final DockerImage getDockerImage(GetDockerImageRequest request) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * GetDockerImageRequest request = - * GetDockerImageRequest.newBuilder() + * GetPythonPackageRequest request = + * GetPythonPackageRequest.newBuilder() * .setName( - * DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]") + * PythonPackageName.of( + * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]") * .toString()) * .build(); - * ApiFuture future = - * artifactRegistryClient.getDockerImageCallable().futureCall(request); + * ApiFuture future = + * artifactRegistryClient.getPythonPackageCallable().futureCall(request); * // Do something. - * DockerImage response = future.get(); + * PythonPackage response = future.get(); * } * } */ - public final UnaryCallable getDockerImageCallable() { - return stub.getDockerImageCallable(); + public final UnaryCallable getPythonPackageCallable() { + return stub.getPythonPackageCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -1355,7 +2207,38 @@ public final UnaryCallable deleteRepositoryC * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * String parent = "parent-995424086"; + * RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + * for (Package element : artifactRegistryClient.listPackages(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * } + * + * @param parent Required. The name of the parent resource whose packages will be listed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPackagesPagedResponse listPackages(RepositoryName parent) { + ListPackagesRequest request = + ListPackagesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPackages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists packages. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
    *   for (Package element : artifactRegistryClient.listPackages(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -1385,7 +2268,7 @@ public final ListPackagesPagedResponse listPackages(String parent) {
    * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
    *   ListPackagesRequest request =
    *       ListPackagesRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .build();
@@ -1417,7 +2300,7 @@ public final ListPackagesPagedResponse listPackages(ListPackagesRequest request)
    * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
    *   ListPackagesRequest request =
    *       ListPackagesRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .build();
@@ -1450,7 +2333,7 @@ public final ListPackagesPagedResponse listPackages(ListPackagesRequest request)
    * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
    *   ListPackagesRequest request =
    *       ListPackagesRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .build();
@@ -1486,7 +2369,35 @@ public final UnaryCallable listPackag
    * // - It may require specifying regional endpoints when creating the service client as shown in
    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
-   *   String name = "name3373707";
+   *   PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]");
+   *   Package response = artifactRegistryClient.getPackage(name);
+   * }
+   * }
+ * + * @param name Required. The name of the package to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Package getPackage(PackageName name) { + GetPackageRequest request = + GetPackageRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getPackage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a package. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   String name =
+   *       PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString();
    *   Package response = artifactRegistryClient.getPackage(name);
    * }
    * }
@@ -1512,7 +2423,11 @@ public final Package getPackage(String name) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * GetPackageRequest request = GetPackageRequest.newBuilder().setName("name3373707").build(); + * GetPackageRequest request = + * GetPackageRequest.newBuilder() + * .setName( + * PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + * .build(); * Package response = artifactRegistryClient.getPackage(request); * } * } @@ -1537,7 +2452,11 @@ public final Package getPackage(GetPackageRequest request) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * GetPackageRequest request = GetPackageRequest.newBuilder().setName("name3373707").build(); + * GetPackageRequest request = + * GetPackageRequest.newBuilder() + * .setName( + * PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + * .build(); * ApiFuture future = artifactRegistryClient.getPackageCallable().futureCall(request); * // Do something. * Package response = future.get(); @@ -1562,7 +2481,36 @@ public final UnaryCallable getPackageCallable() { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * String name = "name3373707"; + * PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + * artifactRegistryClient.deletePackageAsync(name).get(); + * } + * } + * + * @param name Required. The name of the package to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePackageAsync(PackageName name) { + DeletePackageRequest request = + DeletePackageRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deletePackageAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a package and all of its versions and tags. The returned operation will complete once + * the package has been deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   String name =
+   *       PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString();
    *   artifactRegistryClient.deletePackageAsync(name).get();
    * }
    * }
@@ -1590,7 +2538,10 @@ public final OperationFuture deletePackageAsync(String * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { * DeletePackageRequest request = - * DeletePackageRequest.newBuilder().setName("name3373707").build(); + * DeletePackageRequest.newBuilder() + * .setName( + * PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + * .build(); * artifactRegistryClient.deletePackageAsync(request).get(); * } * } @@ -1618,7 +2569,10 @@ public final OperationFuture deletePackageAsync( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { * DeletePackageRequest request = - * DeletePackageRequest.newBuilder().setName("name3373707").build(); + * DeletePackageRequest.newBuilder() + * .setName( + * PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + * .build(); * OperationFuture future = * artifactRegistryClient.deletePackageOperationCallable().futureCall(request); * // Do something. @@ -1646,7 +2600,10 @@ public final OperationFuture deletePackageAsync( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { * DeletePackageRequest request = - * DeletePackageRequest.newBuilder().setName("name3373707").build(); + * DeletePackageRequest.newBuilder() + * .setName( + * PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + * .build(); * ApiFuture future = * artifactRegistryClient.deletePackageCallable().futureCall(request); * // Do something. @@ -2001,14 +2958,44 @@ public final UnaryCallable deleteVersionCallabl * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * String parent = "parent-995424086"; + * RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + * for (File element : artifactRegistryClient.listFiles(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * } + * + * @param parent Required. The name of the repository whose files will be listed. For example: + * "projects/p1/locations/us-central1/repositories/repo1 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFilesPagedResponse listFiles(RepositoryName parent) { + ListFilesRequest request = + ListFilesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listFiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists files. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
    *   for (File element : artifactRegistryClient.listFiles(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * }
* - * @param parent The name of the repository whose files will be listed. For example: + * @param parent Required. The name of the repository whose files will be listed. For example: * "projects/p1/locations/us-central1/repositories/repo1 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2032,7 +3019,7 @@ public final ListFilesPagedResponse listFiles(String parent) { * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { * ListFilesRequest request = * ListFilesRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) * .setFilter("filter-1274492040") * .setPageSize(883849137) * .setPageToken("pageToken873572522") @@ -2066,7 +3053,7 @@ public final ListFilesPagedResponse listFiles(ListFilesRequest request) { * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { * ListFilesRequest request = * ListFilesRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) * .setFilter("filter-1274492040") * .setPageSize(883849137) * .setPageToken("pageToken873572522") @@ -2099,7 +3086,7 @@ public final UnaryCallable listFilesPa * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { * ListFilesRequest request = * ListFilesRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) * .setFilter("filter-1274492040") * .setPageSize(883849137) * .setPageToken("pageToken873572522") @@ -2120,8 +3107,35 @@ public final UnaryCallable listFilesPa * } * } */ - public final UnaryCallable listFilesCallable() { - return stub.listFilesCallable(); + public final UnaryCallable listFilesCallable() { + return stub.listFilesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   FileName name = FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]");
+   *   File response = artifactRegistryClient.getFile(name);
+   * }
+   * }
+ * + * @param name Required. The name of the file to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final File getFile(FileName name) { + GetFileRequest request = + GetFileRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getFile(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -2137,12 +3151,12 @@ public final UnaryCallable listFilesCallabl * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * String name = "name3373707"; + * String name = FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString(); * File response = artifactRegistryClient.getFile(name); * } * } * - * @param name The name of the file to retrieve. + * @param name Required. The name of the file to retrieve. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final File getFile(String name) { @@ -2163,7 +3177,10 @@ public final File getFile(String name) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * GetFileRequest request = GetFileRequest.newBuilder().setName("name3373707").build(); + * GetFileRequest request = + * GetFileRequest.newBuilder() + * .setName(FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString()) + * .build(); * File response = artifactRegistryClient.getFile(request); * } * } @@ -2188,7 +3205,10 @@ public final File getFile(GetFileRequest request) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - * GetFileRequest request = GetFileRequest.newBuilder().setName("name3373707").build(); + * GetFileRequest request = + * GetFileRequest.newBuilder() + * .setName(FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString()) + * .build(); * ApiFuture future = artifactRegistryClient.getFileCallable().futureCall(request); * // Do something. * File response = future.get(); @@ -3039,6 +4059,205 @@ public final ProjectSettings updateProjectSettings(UpdateProjectSettingsRequest return stub.updateProjectSettingsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the VPCSC Config for the Project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   VpcscConfigName name = VpcscConfigName.of("[PROJECT]", "[LOCATION]");
+   *   VPCSCConfig response = artifactRegistryClient.getVPCSCConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the VPCSCConfig resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final VPCSCConfig getVPCSCConfig(VpcscConfigName name) { + GetVPCSCConfigRequest request = + GetVPCSCConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getVPCSCConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the VPCSC Config for the Project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   String name = VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString();
+   *   VPCSCConfig response = artifactRegistryClient.getVPCSCConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the VPCSCConfig resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final VPCSCConfig getVPCSCConfig(String name) { + GetVPCSCConfigRequest request = GetVPCSCConfigRequest.newBuilder().setName(name).build(); + return getVPCSCConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the VPCSC Config for the Project. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   VPCSCConfig vpcscConfig = VPCSCConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   VPCSCConfig response = artifactRegistryClient.updateVPCSCConfig(vpcscConfig, updateMask);
+   * }
+   * }
+ * + * @param vpcscConfig The project config. + * @param updateMask Field mask to support partial updates. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final VPCSCConfig updateVPCSCConfig(VPCSCConfig vpcscConfig, FieldMask updateMask) { + UpdateVPCSCConfigRequest request = + UpdateVPCSCConfigRequest.newBuilder() + .setVpcscConfig(vpcscConfig) + .setUpdateMask(updateMask) + .build(); + return updateVPCSCConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the VPCSC Config for the Project. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+   *   UpdateVPCSCConfigRequest request =
+   *       UpdateVPCSCConfigRequest.newBuilder()
+   *           .setVpcscConfig(VPCSCConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       artifactRegistryClient.updateVPCSCConfigCallable().futureCall(request);
+   *   // Do something.
+   *   VPCSCConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateVPCSCConfigCallable() { + return stub.updateVPCSCConfigCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. @@ -3302,6 +4521,243 @@ protected ListDockerImagesFixedSizeCollection createCollection( } } + public static class ListMavenArtifactsPagedResponse + extends AbstractPagedListResponse< + ListMavenArtifactsRequest, + ListMavenArtifactsResponse, + MavenArtifact, + ListMavenArtifactsPage, + ListMavenArtifactsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMavenArtifactsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMavenArtifactsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMavenArtifactsPagedResponse(ListMavenArtifactsPage page) { + super(page, ListMavenArtifactsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMavenArtifactsPage + extends AbstractPage< + ListMavenArtifactsRequest, + ListMavenArtifactsResponse, + MavenArtifact, + ListMavenArtifactsPage> { + + private ListMavenArtifactsPage( + PageContext context, + ListMavenArtifactsResponse response) { + super(context, response); + } + + private static ListMavenArtifactsPage createEmptyPage() { + return new ListMavenArtifactsPage(null, null); + } + + @Override + protected ListMavenArtifactsPage createPage( + PageContext context, + ListMavenArtifactsResponse response) { + return new ListMavenArtifactsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMavenArtifactsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMavenArtifactsRequest, + ListMavenArtifactsResponse, + MavenArtifact, + ListMavenArtifactsPage, + ListMavenArtifactsFixedSizeCollection> { + + private ListMavenArtifactsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMavenArtifactsFixedSizeCollection createEmptyCollection() { + return new ListMavenArtifactsFixedSizeCollection(null, 0); + } + + @Override + protected ListMavenArtifactsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMavenArtifactsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNpmPackagesPagedResponse + extends AbstractPagedListResponse< + ListNpmPackagesRequest, + ListNpmPackagesResponse, + NpmPackage, + ListNpmPackagesPage, + ListNpmPackagesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNpmPackagesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListNpmPackagesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListNpmPackagesPagedResponse(ListNpmPackagesPage page) { + super(page, ListNpmPackagesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNpmPackagesPage + extends AbstractPage< + ListNpmPackagesRequest, ListNpmPackagesResponse, NpmPackage, ListNpmPackagesPage> { + + private ListNpmPackagesPage( + PageContext context, + ListNpmPackagesResponse response) { + super(context, response); + } + + private static ListNpmPackagesPage createEmptyPage() { + return new ListNpmPackagesPage(null, null); + } + + @Override + protected ListNpmPackagesPage createPage( + PageContext context, + ListNpmPackagesResponse response) { + return new ListNpmPackagesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNpmPackagesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNpmPackagesRequest, + ListNpmPackagesResponse, + NpmPackage, + ListNpmPackagesPage, + ListNpmPackagesFixedSizeCollection> { + + private ListNpmPackagesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNpmPackagesFixedSizeCollection createEmptyCollection() { + return new ListNpmPackagesFixedSizeCollection(null, 0); + } + + @Override + protected ListNpmPackagesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNpmPackagesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListPythonPackagesPagedResponse + extends AbstractPagedListResponse< + ListPythonPackagesRequest, + ListPythonPackagesResponse, + PythonPackage, + ListPythonPackagesPage, + ListPythonPackagesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPythonPackagesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPythonPackagesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPythonPackagesPagedResponse(ListPythonPackagesPage page) { + super(page, ListPythonPackagesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPythonPackagesPage + extends AbstractPage< + ListPythonPackagesRequest, + ListPythonPackagesResponse, + PythonPackage, + ListPythonPackagesPage> { + + private ListPythonPackagesPage( + PageContext context, + ListPythonPackagesResponse response) { + super(context, response); + } + + private static ListPythonPackagesPage createEmptyPage() { + return new ListPythonPackagesPage(null, null); + } + + @Override + protected ListPythonPackagesPage createPage( + PageContext context, + ListPythonPackagesResponse response) { + return new ListPythonPackagesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPythonPackagesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPythonPackagesRequest, + ListPythonPackagesResponse, + PythonPackage, + ListPythonPackagesPage, + ListPythonPackagesFixedSizeCollection> { + + private ListPythonPackagesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPythonPackagesFixedSizeCollection createEmptyCollection() { + return new ListPythonPackagesFixedSizeCollection(null, 0); + } + + @Override + protected ListPythonPackagesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPythonPackagesFixedSizeCollection(pages, collectionSize); + } + } + public static class ListRepositoriesPagedResponse extends AbstractPagedListResponse< ListRepositoriesRequest, diff --git a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistrySettings.java b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistrySettings.java index 7c1b82471868..e96746489b88 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistrySettings.java +++ b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistrySettings.java @@ -19,7 +19,10 @@ import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListDockerImagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListFilesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListLocationsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListMavenArtifactsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListNpmPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPackagesPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPythonPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListRepositoriesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListTagsPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListVersionsPagedResponse; @@ -106,6 +109,42 @@ public UnaryCallSettings getDockerImageSetti return ((ArtifactRegistryStubSettings) getStubSettings()).getDockerImageSettings(); } + /** Returns the object with the settings used for calls to listMavenArtifacts. */ + public PagedCallSettings< + ListMavenArtifactsRequest, ListMavenArtifactsResponse, ListMavenArtifactsPagedResponse> + listMavenArtifactsSettings() { + return ((ArtifactRegistryStubSettings) getStubSettings()).listMavenArtifactsSettings(); + } + + /** Returns the object with the settings used for calls to getMavenArtifact. */ + public UnaryCallSettings getMavenArtifactSettings() { + return ((ArtifactRegistryStubSettings) getStubSettings()).getMavenArtifactSettings(); + } + + /** Returns the object with the settings used for calls to listNpmPackages. */ + public PagedCallSettings< + ListNpmPackagesRequest, ListNpmPackagesResponse, ListNpmPackagesPagedResponse> + listNpmPackagesSettings() { + return ((ArtifactRegistryStubSettings) getStubSettings()).listNpmPackagesSettings(); + } + + /** Returns the object with the settings used for calls to getNpmPackage. */ + public UnaryCallSettings getNpmPackageSettings() { + return ((ArtifactRegistryStubSettings) getStubSettings()).getNpmPackageSettings(); + } + + /** Returns the object with the settings used for calls to listPythonPackages. */ + public PagedCallSettings< + ListPythonPackagesRequest, ListPythonPackagesResponse, ListPythonPackagesPagedResponse> + listPythonPackagesSettings() { + return ((ArtifactRegistryStubSettings) getStubSettings()).listPythonPackagesSettings(); + } + + /** Returns the object with the settings used for calls to getPythonPackage. */ + public UnaryCallSettings getPythonPackageSettings() { + return ((ArtifactRegistryStubSettings) getStubSettings()).getPythonPackageSettings(); + } + /** Returns the object with the settings used for calls to importAptArtifacts. */ public UnaryCallSettings importAptArtifactsSettings() { return ((ArtifactRegistryStubSettings) getStubSettings()).importAptArtifactsSettings(); @@ -278,6 +317,16 @@ public UnaryCallSettings getIamPolicySettings() { return ((ArtifactRegistryStubSettings) getStubSettings()).updateProjectSettingsSettings(); } + /** Returns the object with the settings used for calls to getVPCSCConfig. */ + public UnaryCallSettings getVPCSCConfigSettings() { + return ((ArtifactRegistryStubSettings) getStubSettings()).getVPCSCConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateVPCSCConfig. */ + public UnaryCallSettings updateVPCSCConfigSettings() { + return ((ArtifactRegistryStubSettings) getStubSettings()).updateVPCSCConfigSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -416,6 +465,44 @@ public UnaryCallSettings.Builder getDockerIm return getStubSettingsBuilder().getDockerImageSettings(); } + /** Returns the builder for the settings used for calls to listMavenArtifacts. */ + public PagedCallSettings.Builder< + ListMavenArtifactsRequest, ListMavenArtifactsResponse, ListMavenArtifactsPagedResponse> + listMavenArtifactsSettings() { + return getStubSettingsBuilder().listMavenArtifactsSettings(); + } + + /** Returns the builder for the settings used for calls to getMavenArtifact. */ + public UnaryCallSettings.Builder + getMavenArtifactSettings() { + return getStubSettingsBuilder().getMavenArtifactSettings(); + } + + /** Returns the builder for the settings used for calls to listNpmPackages. */ + public PagedCallSettings.Builder< + ListNpmPackagesRequest, ListNpmPackagesResponse, ListNpmPackagesPagedResponse> + listNpmPackagesSettings() { + return getStubSettingsBuilder().listNpmPackagesSettings(); + } + + /** Returns the builder for the settings used for calls to getNpmPackage. */ + public UnaryCallSettings.Builder getNpmPackageSettings() { + return getStubSettingsBuilder().getNpmPackageSettings(); + } + + /** Returns the builder for the settings used for calls to listPythonPackages. */ + public PagedCallSettings.Builder< + ListPythonPackagesRequest, ListPythonPackagesResponse, ListPythonPackagesPagedResponse> + listPythonPackagesSettings() { + return getStubSettingsBuilder().listPythonPackagesSettings(); + } + + /** Returns the builder for the settings used for calls to getPythonPackage. */ + public UnaryCallSettings.Builder + getPythonPackageSettings() { + return getStubSettingsBuilder().getPythonPackageSettings(); + } + /** Returns the builder for the settings used for calls to importAptArtifacts. */ public UnaryCallSettings.Builder importAptArtifactsSettings() { @@ -595,6 +682,17 @@ public UnaryCallSettings.Builder getIamPolicySettin return getStubSettingsBuilder().updateProjectSettingsSettings(); } + /** Returns the builder for the settings used for calls to getVPCSCConfig. */ + public UnaryCallSettings.Builder getVPCSCConfigSettings() { + return getStubSettingsBuilder().getVPCSCConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateVPCSCConfig. */ + public UnaryCallSettings.Builder + updateVPCSCConfigSettings() { + return getStubSettingsBuilder().updateVPCSCConfigSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/gapic_metadata.json b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/gapic_metadata.json index b83e54bfbefd..e0f1d9dda8da 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/gapic_metadata.json +++ b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/gapic_metadata.json @@ -17,7 +17,7 @@ "methods": ["createTag", "createTag", "createTagCallable"] }, "DeletePackage": { - "methods": ["deletePackageAsync", "deletePackageAsync", "deletePackageOperationCallable", "deletePackageCallable"] + "methods": ["deletePackageAsync", "deletePackageAsync", "deletePackageAsync", "deletePackageOperationCallable", "deletePackageCallable"] }, "DeleteRepository": { "methods": ["deleteRepositoryAsync", "deleteRepositoryAsync", "deleteRepositoryAsync", "deleteRepositoryOperationCallable", "deleteRepositoryCallable"] @@ -32,7 +32,7 @@ "methods": ["getDockerImage", "getDockerImage", "getDockerImage", "getDockerImageCallable"] }, "GetFile": { - "methods": ["getFile", "getFile", "getFileCallable"] + "methods": ["getFile", "getFile", "getFile", "getFileCallable"] }, "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicyCallable"] @@ -40,18 +40,30 @@ "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, + "GetMavenArtifact": { + "methods": ["getMavenArtifact", "getMavenArtifact", "getMavenArtifact", "getMavenArtifactCallable"] + }, + "GetNpmPackage": { + "methods": ["getNpmPackage", "getNpmPackage", "getNpmPackage", "getNpmPackageCallable"] + }, "GetPackage": { - "methods": ["getPackage", "getPackage", "getPackageCallable"] + "methods": ["getPackage", "getPackage", "getPackage", "getPackageCallable"] }, "GetProjectSettings": { "methods": ["getProjectSettings", "getProjectSettings", "getProjectSettings", "getProjectSettingsCallable"] }, + "GetPythonPackage": { + "methods": ["getPythonPackage", "getPythonPackage", "getPythonPackage", "getPythonPackageCallable"] + }, "GetRepository": { "methods": ["getRepository", "getRepository", "getRepository", "getRepositoryCallable"] }, "GetTag": { "methods": ["getTag", "getTag", "getTagCallable"] }, + "GetVPCSCConfig": { + "methods": ["getVPCSCConfig", "getVPCSCConfig", "getVPCSCConfig", "getVPCSCConfigCallable"] + }, "GetVersion": { "methods": ["getVersion", "getVersion", "getVersionCallable"] }, @@ -65,13 +77,22 @@ "methods": ["listDockerImages", "listDockerImages", "listDockerImagesPagedCallable", "listDockerImagesCallable"] }, "ListFiles": { - "methods": ["listFiles", "listFiles", "listFilesPagedCallable", "listFilesCallable"] + "methods": ["listFiles", "listFiles", "listFiles", "listFilesPagedCallable", "listFilesCallable"] }, "ListLocations": { "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] }, + "ListMavenArtifacts": { + "methods": ["listMavenArtifacts", "listMavenArtifacts", "listMavenArtifacts", "listMavenArtifactsPagedCallable", "listMavenArtifactsCallable"] + }, + "ListNpmPackages": { + "methods": ["listNpmPackages", "listNpmPackages", "listNpmPackages", "listNpmPackagesPagedCallable", "listNpmPackagesCallable"] + }, "ListPackages": { - "methods": ["listPackages", "listPackages", "listPackagesPagedCallable", "listPackagesCallable"] + "methods": ["listPackages", "listPackages", "listPackages", "listPackagesPagedCallable", "listPackagesCallable"] + }, + "ListPythonPackages": { + "methods": ["listPythonPackages", "listPythonPackages", "listPythonPackages", "listPythonPackagesPagedCallable", "listPythonPackagesCallable"] }, "ListRepositories": { "methods": ["listRepositories", "listRepositories", "listRepositories", "listRepositoriesPagedCallable", "listRepositoriesCallable"] @@ -96,6 +117,9 @@ }, "UpdateTag": { "methods": ["updateTag", "updateTag", "updateTagCallable"] + }, + "UpdateVPCSCConfig": { + "methods": ["updateVPCSCConfig", "updateVPCSCConfig", "updateVPCSCConfigCallable"] } } } diff --git a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/ArtifactRegistryStub.java b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/ArtifactRegistryStub.java index 516b6dd9d8ff..0b176fc0b3da 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/ArtifactRegistryStub.java +++ b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/ArtifactRegistryStub.java @@ -19,7 +19,10 @@ import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListDockerImagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListFilesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListLocationsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListMavenArtifactsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListNpmPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPackagesPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPythonPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListRepositoriesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListTagsPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListVersionsPagedResponse; @@ -41,10 +44,14 @@ import com.google.devtools.artifactregistry.v1.File; import com.google.devtools.artifactregistry.v1.GetDockerImageRequest; import com.google.devtools.artifactregistry.v1.GetFileRequest; +import com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest; +import com.google.devtools.artifactregistry.v1.GetNpmPackageRequest; import com.google.devtools.artifactregistry.v1.GetPackageRequest; import com.google.devtools.artifactregistry.v1.GetProjectSettingsRequest; +import com.google.devtools.artifactregistry.v1.GetPythonPackageRequest; import com.google.devtools.artifactregistry.v1.GetRepositoryRequest; import com.google.devtools.artifactregistry.v1.GetTagRequest; +import com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; import com.google.devtools.artifactregistry.v1.GetVersionRequest; import com.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; import com.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; @@ -56,22 +63,33 @@ import com.google.devtools.artifactregistry.v1.ListDockerImagesResponse; import com.google.devtools.artifactregistry.v1.ListFilesRequest; import com.google.devtools.artifactregistry.v1.ListFilesResponse; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse; import com.google.devtools.artifactregistry.v1.ListPackagesRequest; import com.google.devtools.artifactregistry.v1.ListPackagesResponse; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse; import com.google.devtools.artifactregistry.v1.ListRepositoriesRequest; import com.google.devtools.artifactregistry.v1.ListRepositoriesResponse; import com.google.devtools.artifactregistry.v1.ListTagsRequest; import com.google.devtools.artifactregistry.v1.ListTagsResponse; import com.google.devtools.artifactregistry.v1.ListVersionsRequest; import com.google.devtools.artifactregistry.v1.ListVersionsResponse; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.NpmPackage; import com.google.devtools.artifactregistry.v1.OperationMetadata; import com.google.devtools.artifactregistry.v1.Package; import com.google.devtools.artifactregistry.v1.ProjectSettings; +import com.google.devtools.artifactregistry.v1.PythonPackage; import com.google.devtools.artifactregistry.v1.Repository; import com.google.devtools.artifactregistry.v1.Tag; import com.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; import com.google.devtools.artifactregistry.v1.UpdateRepositoryRequest; import com.google.devtools.artifactregistry.v1.UpdateTagRequest; +import com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; +import com.google.devtools.artifactregistry.v1.VPCSCConfig; import com.google.devtools.artifactregistry.v1.Version; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -114,6 +132,47 @@ public UnaryCallable getDockerImageCallable( throw new UnsupportedOperationException("Not implemented: getDockerImageCallable()"); } + public UnaryCallable + listMavenArtifactsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listMavenArtifactsPagedCallable()"); + } + + public UnaryCallable + listMavenArtifactsCallable() { + throw new UnsupportedOperationException("Not implemented: listMavenArtifactsCallable()"); + } + + public UnaryCallable getMavenArtifactCallable() { + throw new UnsupportedOperationException("Not implemented: getMavenArtifactCallable()"); + } + + public UnaryCallable + listNpmPackagesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNpmPackagesPagedCallable()"); + } + + public UnaryCallable listNpmPackagesCallable() { + throw new UnsupportedOperationException("Not implemented: listNpmPackagesCallable()"); + } + + public UnaryCallable getNpmPackageCallable() { + throw new UnsupportedOperationException("Not implemented: getNpmPackageCallable()"); + } + + public UnaryCallable + listPythonPackagesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPythonPackagesPagedCallable()"); + } + + public UnaryCallable + listPythonPackagesCallable() { + throw new UnsupportedOperationException("Not implemented: listPythonPackagesCallable()"); + } + + public UnaryCallable getPythonPackageCallable() { + throw new UnsupportedOperationException("Not implemented: getPythonPackageCallable()"); + } + public OperationCallable< ImportAptArtifactsRequest, ImportAptArtifactsResponse, ImportAptArtifactsMetadata> importAptArtifactsOperationCallable() { @@ -272,6 +331,14 @@ public UnaryCallable getProjectSetti throw new UnsupportedOperationException("Not implemented: updateProjectSettingsCallable()"); } + public UnaryCallable getVPCSCConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getVPCSCConfigCallable()"); + } + + public UnaryCallable updateVPCSCConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateVPCSCConfigCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/ArtifactRegistryStubSettings.java b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/ArtifactRegistryStubSettings.java index 03c07837050a..b2070d3b9ca3 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/ArtifactRegistryStubSettings.java +++ b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/ArtifactRegistryStubSettings.java @@ -19,7 +19,10 @@ import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListDockerImagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListFilesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListLocationsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListMavenArtifactsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListNpmPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPackagesPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPythonPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListRepositoriesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListTagsPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListVersionsPagedResponse; @@ -71,10 +74,14 @@ import com.google.devtools.artifactregistry.v1.File; import com.google.devtools.artifactregistry.v1.GetDockerImageRequest; import com.google.devtools.artifactregistry.v1.GetFileRequest; +import com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest; +import com.google.devtools.artifactregistry.v1.GetNpmPackageRequest; import com.google.devtools.artifactregistry.v1.GetPackageRequest; import com.google.devtools.artifactregistry.v1.GetProjectSettingsRequest; +import com.google.devtools.artifactregistry.v1.GetPythonPackageRequest; import com.google.devtools.artifactregistry.v1.GetRepositoryRequest; import com.google.devtools.artifactregistry.v1.GetTagRequest; +import com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; import com.google.devtools.artifactregistry.v1.GetVersionRequest; import com.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; import com.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; @@ -86,22 +93,33 @@ import com.google.devtools.artifactregistry.v1.ListDockerImagesResponse; import com.google.devtools.artifactregistry.v1.ListFilesRequest; import com.google.devtools.artifactregistry.v1.ListFilesResponse; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse; import com.google.devtools.artifactregistry.v1.ListPackagesRequest; import com.google.devtools.artifactregistry.v1.ListPackagesResponse; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse; import com.google.devtools.artifactregistry.v1.ListRepositoriesRequest; import com.google.devtools.artifactregistry.v1.ListRepositoriesResponse; import com.google.devtools.artifactregistry.v1.ListTagsRequest; import com.google.devtools.artifactregistry.v1.ListTagsResponse; import com.google.devtools.artifactregistry.v1.ListVersionsRequest; import com.google.devtools.artifactregistry.v1.ListVersionsResponse; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.NpmPackage; import com.google.devtools.artifactregistry.v1.OperationMetadata; import com.google.devtools.artifactregistry.v1.Package; import com.google.devtools.artifactregistry.v1.ProjectSettings; +import com.google.devtools.artifactregistry.v1.PythonPackage; import com.google.devtools.artifactregistry.v1.Repository; import com.google.devtools.artifactregistry.v1.Tag; import com.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; import com.google.devtools.artifactregistry.v1.UpdateRepositoryRequest; import com.google.devtools.artifactregistry.v1.UpdateTagRequest; +import com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; +import com.google.devtools.artifactregistry.v1.VPCSCConfig; import com.google.devtools.artifactregistry.v1.Version; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -166,6 +184,18 @@ public class ArtifactRegistryStubSettings extends StubSettings listDockerImagesSettings; private final UnaryCallSettings getDockerImageSettings; + private final PagedCallSettings< + ListMavenArtifactsRequest, ListMavenArtifactsResponse, ListMavenArtifactsPagedResponse> + listMavenArtifactsSettings; + private final UnaryCallSettings getMavenArtifactSettings; + private final PagedCallSettings< + ListNpmPackagesRequest, ListNpmPackagesResponse, ListNpmPackagesPagedResponse> + listNpmPackagesSettings; + private final UnaryCallSettings getNpmPackageSettings; + private final PagedCallSettings< + ListPythonPackagesRequest, ListPythonPackagesResponse, ListPythonPackagesPagedResponse> + listPythonPackagesSettings; + private final UnaryCallSettings getPythonPackageSettings; private final UnaryCallSettings importAptArtifactsSettings; private final OperationCallSettings< ImportAptArtifactsRequest, ImportAptArtifactsResponse, ImportAptArtifactsMetadata> @@ -216,6 +246,8 @@ public class ArtifactRegistryStubSettings extends StubSettings updateProjectSettingsSettings; + private final UnaryCallSettings getVPCSCConfigSettings; + private final UnaryCallSettings updateVPCSCConfigSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -261,6 +293,125 @@ public Iterable extractResources(ListDockerImagesResponse payload) } }; + private static final PagedListDescriptor< + ListMavenArtifactsRequest, ListMavenArtifactsResponse, MavenArtifact> + LIST_MAVEN_ARTIFACTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListMavenArtifactsRequest, ListMavenArtifactsResponse, MavenArtifact>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMavenArtifactsRequest injectToken( + ListMavenArtifactsRequest payload, String token) { + return ListMavenArtifactsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListMavenArtifactsRequest injectPageSize( + ListMavenArtifactsRequest payload, int pageSize) { + return ListMavenArtifactsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListMavenArtifactsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMavenArtifactsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListMavenArtifactsResponse payload) { + return payload.getMavenArtifactsList() == null + ? ImmutableList.of() + : payload.getMavenArtifactsList(); + } + }; + + private static final PagedListDescriptor< + ListNpmPackagesRequest, ListNpmPackagesResponse, NpmPackage> + LIST_NPM_PACKAGES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNpmPackagesRequest injectToken( + ListNpmPackagesRequest payload, String token) { + return ListNpmPackagesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNpmPackagesRequest injectPageSize( + ListNpmPackagesRequest payload, int pageSize) { + return ListNpmPackagesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNpmPackagesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNpmPackagesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNpmPackagesResponse payload) { + return payload.getNpmPackagesList() == null + ? ImmutableList.of() + : payload.getNpmPackagesList(); + } + }; + + private static final PagedListDescriptor< + ListPythonPackagesRequest, ListPythonPackagesResponse, PythonPackage> + LIST_PYTHON_PACKAGES_PAGE_STR_DESC = + new PagedListDescriptor< + ListPythonPackagesRequest, ListPythonPackagesResponse, PythonPackage>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPythonPackagesRequest injectToken( + ListPythonPackagesRequest payload, String token) { + return ListPythonPackagesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPythonPackagesRequest injectPageSize( + ListPythonPackagesRequest payload, int pageSize) { + return ListPythonPackagesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPythonPackagesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPythonPackagesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPythonPackagesResponse payload) { + return payload.getPythonPackagesList() == null + ? ImmutableList.of() + : payload.getPythonPackagesList(); + } + }; + private static final PagedListDescriptor< ListRepositoriesRequest, ListRepositoriesResponse, Repository> LIST_REPOSITORIES_PAGE_STR_DESC = @@ -499,6 +650,65 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListMavenArtifactsRequest, ListMavenArtifactsResponse, ListMavenArtifactsPagedResponse> + LIST_MAVEN_ARTIFACTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMavenArtifactsRequest, + ListMavenArtifactsResponse, + ListMavenArtifactsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListMavenArtifactsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_MAVEN_ARTIFACTS_PAGE_STR_DESC, request, context); + return ListMavenArtifactsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNpmPackagesRequest, ListNpmPackagesResponse, ListNpmPackagesPagedResponse> + LIST_NPM_PACKAGES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNpmPackagesRequest, ListNpmPackagesResponse, ListNpmPackagesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNpmPackagesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_NPM_PACKAGES_PAGE_STR_DESC, request, context); + return ListNpmPackagesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListPythonPackagesRequest, ListPythonPackagesResponse, ListPythonPackagesPagedResponse> + LIST_PYTHON_PACKAGES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPythonPackagesRequest, + ListPythonPackagesResponse, + ListPythonPackagesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPythonPackagesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_PYTHON_PACKAGES_PAGE_STR_DESC, request, context); + return ListPythonPackagesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListRepositoriesRequest, ListRepositoriesResponse, ListRepositoriesPagedResponse> LIST_REPOSITORIES_PAGE_STR_FACT = @@ -614,6 +824,42 @@ public UnaryCallSettings getDockerImageSetti return getDockerImageSettings; } + /** Returns the object with the settings used for calls to listMavenArtifacts. */ + public PagedCallSettings< + ListMavenArtifactsRequest, ListMavenArtifactsResponse, ListMavenArtifactsPagedResponse> + listMavenArtifactsSettings() { + return listMavenArtifactsSettings; + } + + /** Returns the object with the settings used for calls to getMavenArtifact. */ + public UnaryCallSettings getMavenArtifactSettings() { + return getMavenArtifactSettings; + } + + /** Returns the object with the settings used for calls to listNpmPackages. */ + public PagedCallSettings< + ListNpmPackagesRequest, ListNpmPackagesResponse, ListNpmPackagesPagedResponse> + listNpmPackagesSettings() { + return listNpmPackagesSettings; + } + + /** Returns the object with the settings used for calls to getNpmPackage. */ + public UnaryCallSettings getNpmPackageSettings() { + return getNpmPackageSettings; + } + + /** Returns the object with the settings used for calls to listPythonPackages. */ + public PagedCallSettings< + ListPythonPackagesRequest, ListPythonPackagesResponse, ListPythonPackagesPagedResponse> + listPythonPackagesSettings() { + return listPythonPackagesSettings; + } + + /** Returns the object with the settings used for calls to getPythonPackage. */ + public UnaryCallSettings getPythonPackageSettings() { + return getPythonPackageSettings; + } + /** Returns the object with the settings used for calls to importAptArtifacts. */ public UnaryCallSettings importAptArtifactsSettings() { return importAptArtifactsSettings; @@ -786,6 +1032,16 @@ public UnaryCallSettings getIamPolicySettings() { return updateProjectSettingsSettings; } + /** Returns the object with the settings used for calls to getVPCSCConfig. */ + public UnaryCallSettings getVPCSCConfigSettings() { + return getVPCSCConfigSettings; + } + + /** Returns the object with the settings used for calls to updateVPCSCConfig. */ + public UnaryCallSettings updateVPCSCConfigSettings() { + return updateVPCSCConfigSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -905,6 +1161,12 @@ protected ArtifactRegistryStubSettings(Builder settingsBuilder) throws IOExcepti listDockerImagesSettings = settingsBuilder.listDockerImagesSettings().build(); getDockerImageSettings = settingsBuilder.getDockerImageSettings().build(); + listMavenArtifactsSettings = settingsBuilder.listMavenArtifactsSettings().build(); + getMavenArtifactSettings = settingsBuilder.getMavenArtifactSettings().build(); + listNpmPackagesSettings = settingsBuilder.listNpmPackagesSettings().build(); + getNpmPackageSettings = settingsBuilder.getNpmPackageSettings().build(); + listPythonPackagesSettings = settingsBuilder.listPythonPackagesSettings().build(); + getPythonPackageSettings = settingsBuilder.getPythonPackageSettings().build(); importAptArtifactsSettings = settingsBuilder.importAptArtifactsSettings().build(); importAptArtifactsOperationSettings = settingsBuilder.importAptArtifactsOperationSettings().build(); @@ -938,6 +1200,8 @@ protected ArtifactRegistryStubSettings(Builder settingsBuilder) throws IOExcepti testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); getProjectSettingsSettings = settingsBuilder.getProjectSettingsSettings().build(); updateProjectSettingsSettings = settingsBuilder.updateProjectSettingsSettings().build(); + getVPCSCConfigSettings = settingsBuilder.getVPCSCConfigSettings().build(); + updateVPCSCConfigSettings = settingsBuilder.updateVPCSCConfigSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -950,6 +1214,20 @@ public static class Builder extends StubSettings.Builder getDockerImageSettings; + private final PagedCallSettings.Builder< + ListMavenArtifactsRequest, ListMavenArtifactsResponse, ListMavenArtifactsPagedResponse> + listMavenArtifactsSettings; + private final UnaryCallSettings.Builder + getMavenArtifactSettings; + private final PagedCallSettings.Builder< + ListNpmPackagesRequest, ListNpmPackagesResponse, ListNpmPackagesPagedResponse> + listNpmPackagesSettings; + private final UnaryCallSettings.Builder getNpmPackageSettings; + private final PagedCallSettings.Builder< + ListPythonPackagesRequest, ListPythonPackagesResponse, ListPythonPackagesPagedResponse> + listPythonPackagesSettings; + private final UnaryCallSettings.Builder + getPythonPackageSettings; private final UnaryCallSettings.Builder importAptArtifactsSettings; private final OperationCallSettings.Builder< @@ -1008,6 +1286,10 @@ public static class Builder extends StubSettings.Builder updateProjectSettingsSettings; + private final UnaryCallSettings.Builder + getVPCSCConfigSettings; + private final UnaryCallSettings.Builder + updateVPCSCConfigSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -1048,6 +1330,12 @@ protected Builder(ClientContext clientContext) { listDockerImagesSettings = PagedCallSettings.newBuilder(LIST_DOCKER_IMAGES_PAGE_STR_FACT); getDockerImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listMavenArtifactsSettings = PagedCallSettings.newBuilder(LIST_MAVEN_ARTIFACTS_PAGE_STR_FACT); + getMavenArtifactSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNpmPackagesSettings = PagedCallSettings.newBuilder(LIST_NPM_PACKAGES_PAGE_STR_FACT); + getNpmPackageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listPythonPackagesSettings = PagedCallSettings.newBuilder(LIST_PYTHON_PACKAGES_PAGE_STR_FACT); + getPythonPackageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); importAptArtifactsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); importAptArtifactsOperationSettings = OperationCallSettings.newBuilder(); importYumArtifactsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -1079,6 +1367,8 @@ protected Builder(ClientContext clientContext) { testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getProjectSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateProjectSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getVPCSCConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateVPCSCConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -1086,6 +1376,12 @@ protected Builder(ClientContext clientContext) { ImmutableList.>of( listDockerImagesSettings, getDockerImageSettings, + listMavenArtifactsSettings, + getMavenArtifactSettings, + listNpmPackagesSettings, + getNpmPackageSettings, + listPythonPackagesSettings, + getPythonPackageSettings, importAptArtifactsSettings, importYumArtifactsSettings, listRepositoriesSettings, @@ -1111,6 +1407,8 @@ protected Builder(ClientContext clientContext) { testIamPermissionsSettings, getProjectSettingsSettings, updateProjectSettingsSettings, + getVPCSCConfigSettings, + updateVPCSCConfigSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -1121,6 +1419,12 @@ protected Builder(ArtifactRegistryStubSettings settings) { listDockerImagesSettings = settings.listDockerImagesSettings.toBuilder(); getDockerImageSettings = settings.getDockerImageSettings.toBuilder(); + listMavenArtifactsSettings = settings.listMavenArtifactsSettings.toBuilder(); + getMavenArtifactSettings = settings.getMavenArtifactSettings.toBuilder(); + listNpmPackagesSettings = settings.listNpmPackagesSettings.toBuilder(); + getNpmPackageSettings = settings.getNpmPackageSettings.toBuilder(); + listPythonPackagesSettings = settings.listPythonPackagesSettings.toBuilder(); + getPythonPackageSettings = settings.getPythonPackageSettings.toBuilder(); importAptArtifactsSettings = settings.importAptArtifactsSettings.toBuilder(); importAptArtifactsOperationSettings = settings.importAptArtifactsOperationSettings.toBuilder(); @@ -1154,6 +1458,8 @@ protected Builder(ArtifactRegistryStubSettings settings) { testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); getProjectSettingsSettings = settings.getProjectSettingsSettings.toBuilder(); updateProjectSettingsSettings = settings.updateProjectSettingsSettings.toBuilder(); + getVPCSCConfigSettings = settings.getVPCSCConfigSettings.toBuilder(); + updateVPCSCConfigSettings = settings.updateVPCSCConfigSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -1161,6 +1467,12 @@ protected Builder(ArtifactRegistryStubSettings settings) { ImmutableList.>of( listDockerImagesSettings, getDockerImageSettings, + listMavenArtifactsSettings, + getMavenArtifactSettings, + listNpmPackagesSettings, + getNpmPackageSettings, + listPythonPackagesSettings, + getPythonPackageSettings, importAptArtifactsSettings, importYumArtifactsSettings, listRepositoriesSettings, @@ -1186,6 +1498,8 @@ protected Builder(ArtifactRegistryStubSettings settings) { testIamPermissionsSettings, getProjectSettingsSettings, updateProjectSettingsSettings, + getVPCSCConfigSettings, + updateVPCSCConfigSettings, listLocationsSettings, getLocationSettings); } @@ -1227,6 +1541,36 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .listMavenArtifactsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getMavenArtifactSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listNpmPackagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getNpmPackageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listPythonPackagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getPythonPackageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .importAptArtifactsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -1352,6 +1696,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .getVPCSCConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateVPCSCConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -1540,6 +1894,44 @@ public UnaryCallSettings.Builder getDockerIm return getDockerImageSettings; } + /** Returns the builder for the settings used for calls to listMavenArtifacts. */ + public PagedCallSettings.Builder< + ListMavenArtifactsRequest, ListMavenArtifactsResponse, ListMavenArtifactsPagedResponse> + listMavenArtifactsSettings() { + return listMavenArtifactsSettings; + } + + /** Returns the builder for the settings used for calls to getMavenArtifact. */ + public UnaryCallSettings.Builder + getMavenArtifactSettings() { + return getMavenArtifactSettings; + } + + /** Returns the builder for the settings used for calls to listNpmPackages. */ + public PagedCallSettings.Builder< + ListNpmPackagesRequest, ListNpmPackagesResponse, ListNpmPackagesPagedResponse> + listNpmPackagesSettings() { + return listNpmPackagesSettings; + } + + /** Returns the builder for the settings used for calls to getNpmPackage. */ + public UnaryCallSettings.Builder getNpmPackageSettings() { + return getNpmPackageSettings; + } + + /** Returns the builder for the settings used for calls to listPythonPackages. */ + public PagedCallSettings.Builder< + ListPythonPackagesRequest, ListPythonPackagesResponse, ListPythonPackagesPagedResponse> + listPythonPackagesSettings() { + return listPythonPackagesSettings; + } + + /** Returns the builder for the settings used for calls to getPythonPackage. */ + public UnaryCallSettings.Builder + getPythonPackageSettings() { + return getPythonPackageSettings; + } + /** Returns the builder for the settings used for calls to importAptArtifacts. */ public UnaryCallSettings.Builder importAptArtifactsSettings() { @@ -1731,6 +2123,17 @@ public UnaryCallSettings.Builder getIamPolicySettin return updateProjectSettingsSettings; } + /** Returns the builder for the settings used for calls to getVPCSCConfig. */ + public UnaryCallSettings.Builder getVPCSCConfigSettings() { + return getVPCSCConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateVPCSCConfig. */ + public UnaryCallSettings.Builder + updateVPCSCConfigSettings() { + return updateVPCSCConfigSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/GrpcArtifactRegistryStub.java b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/GrpcArtifactRegistryStub.java index c949fd412cf4..158fe88edc77 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/GrpcArtifactRegistryStub.java +++ b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/GrpcArtifactRegistryStub.java @@ -19,7 +19,10 @@ import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListDockerImagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListFilesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListLocationsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListMavenArtifactsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListNpmPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPackagesPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPythonPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListRepositoriesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListTagsPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListVersionsPagedResponse; @@ -46,10 +49,14 @@ import com.google.devtools.artifactregistry.v1.File; import com.google.devtools.artifactregistry.v1.GetDockerImageRequest; import com.google.devtools.artifactregistry.v1.GetFileRequest; +import com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest; +import com.google.devtools.artifactregistry.v1.GetNpmPackageRequest; import com.google.devtools.artifactregistry.v1.GetPackageRequest; import com.google.devtools.artifactregistry.v1.GetProjectSettingsRequest; +import com.google.devtools.artifactregistry.v1.GetPythonPackageRequest; import com.google.devtools.artifactregistry.v1.GetRepositoryRequest; import com.google.devtools.artifactregistry.v1.GetTagRequest; +import com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; import com.google.devtools.artifactregistry.v1.GetVersionRequest; import com.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; import com.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; @@ -61,22 +68,33 @@ import com.google.devtools.artifactregistry.v1.ListDockerImagesResponse; import com.google.devtools.artifactregistry.v1.ListFilesRequest; import com.google.devtools.artifactregistry.v1.ListFilesResponse; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse; import com.google.devtools.artifactregistry.v1.ListPackagesRequest; import com.google.devtools.artifactregistry.v1.ListPackagesResponse; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse; import com.google.devtools.artifactregistry.v1.ListRepositoriesRequest; import com.google.devtools.artifactregistry.v1.ListRepositoriesResponse; import com.google.devtools.artifactregistry.v1.ListTagsRequest; import com.google.devtools.artifactregistry.v1.ListTagsResponse; import com.google.devtools.artifactregistry.v1.ListVersionsRequest; import com.google.devtools.artifactregistry.v1.ListVersionsResponse; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.NpmPackage; import com.google.devtools.artifactregistry.v1.OperationMetadata; import com.google.devtools.artifactregistry.v1.Package; import com.google.devtools.artifactregistry.v1.ProjectSettings; +import com.google.devtools.artifactregistry.v1.PythonPackage; import com.google.devtools.artifactregistry.v1.Repository; import com.google.devtools.artifactregistry.v1.Tag; import com.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; import com.google.devtools.artifactregistry.v1.UpdateRepositoryRequest; import com.google.devtools.artifactregistry.v1.UpdateTagRequest; +import com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; +import com.google.devtools.artifactregistry.v1.VPCSCConfig; import com.google.devtools.artifactregistry.v1.Version; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -123,6 +141,75 @@ public class GrpcArtifactRegistryStub extends ArtifactRegistryStub { .setResponseMarshaller(ProtoUtils.marshaller(DockerImage.getDefaultInstance())) .build(); + private static final MethodDescriptor + listMavenArtifactsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/ListMavenArtifacts") + .setRequestMarshaller( + ProtoUtils.marshaller(ListMavenArtifactsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListMavenArtifactsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getMavenArtifactMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/GetMavenArtifact") + .setRequestMarshaller( + ProtoUtils.marshaller(GetMavenArtifactRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MavenArtifact.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNpmPackagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/ListNpmPackages") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNpmPackagesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNpmPackagesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getNpmPackageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/GetNpmPackage") + .setRequestMarshaller( + ProtoUtils.marshaller(GetNpmPackageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NpmPackage.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listPythonPackagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/ListPythonPackages") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPythonPackagesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPythonPackagesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getPythonPackageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/GetPythonPackage") + .setRequestMarshaller( + ProtoUtils.marshaller(GetPythonPackageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PythonPackage.getDefaultInstance())) + .build(); + private static final MethodDescriptor importAptArtifactsMethodDescriptor = MethodDescriptor.newBuilder() @@ -369,6 +456,28 @@ public class GrpcArtifactRegistryStub extends ArtifactRegistryStub { .setResponseMarshaller(ProtoUtils.marshaller(ProjectSettings.getDefaultInstance())) .build(); + private static final MethodDescriptor + getVPCSCConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/GetVPCSCConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetVPCSCConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(VPCSCConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateVPCSCConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/UpdateVPCSCConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateVPCSCConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(VPCSCConfig.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -393,6 +502,21 @@ public class GrpcArtifactRegistryStub extends ArtifactRegistryStub { private final UnaryCallable listDockerImagesPagedCallable; private final UnaryCallable getDockerImageCallable; + private final UnaryCallable + listMavenArtifactsCallable; + private final UnaryCallable + listMavenArtifactsPagedCallable; + private final UnaryCallable getMavenArtifactCallable; + private final UnaryCallable + listNpmPackagesCallable; + private final UnaryCallable + listNpmPackagesPagedCallable; + private final UnaryCallable getNpmPackageCallable; + private final UnaryCallable + listPythonPackagesCallable; + private final UnaryCallable + listPythonPackagesPagedCallable; + private final UnaryCallable getPythonPackageCallable; private final UnaryCallable importAptArtifactsCallable; private final OperationCallable< ImportAptArtifactsRequest, ImportAptArtifactsResponse, ImportAptArtifactsMetadata> @@ -444,6 +568,8 @@ public class GrpcArtifactRegistryStub extends ArtifactRegistryStub { getProjectSettingsCallable; private final UnaryCallable updateProjectSettingsCallable; + private final UnaryCallable getVPCSCConfigCallable; + private final UnaryCallable updateVPCSCConfigCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -514,6 +640,69 @@ protected GrpcArtifactRegistryStub( return params.build(); }) .build(); + GrpcCallSettings + listMavenArtifactsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listMavenArtifactsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getMavenArtifactTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getMavenArtifactMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listNpmPackagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNpmPackagesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getNpmPackageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNpmPackageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listPythonPackagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPythonPackagesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getPythonPackageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPythonPackageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); GrpcCallSettings importAptArtifactsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(importAptArtifactsMethodDescriptor) @@ -770,6 +959,27 @@ protected GrpcArtifactRegistryStub( return params.build(); }) .build(); + GrpcCallSettings getVPCSCConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getVPCSCConfigMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updateVPCSCConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateVPCSCConfigMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "vpcsc_config.name", String.valueOf(request.getVpcscConfig().getName())); + return params.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -800,6 +1010,41 @@ protected GrpcArtifactRegistryStub( this.getDockerImageCallable = callableFactory.createUnaryCallable( getDockerImageTransportSettings, settings.getDockerImageSettings(), clientContext); + this.listMavenArtifactsCallable = + callableFactory.createUnaryCallable( + listMavenArtifactsTransportSettings, + settings.listMavenArtifactsSettings(), + clientContext); + this.listMavenArtifactsPagedCallable = + callableFactory.createPagedCallable( + listMavenArtifactsTransportSettings, + settings.listMavenArtifactsSettings(), + clientContext); + this.getMavenArtifactCallable = + callableFactory.createUnaryCallable( + getMavenArtifactTransportSettings, settings.getMavenArtifactSettings(), clientContext); + this.listNpmPackagesCallable = + callableFactory.createUnaryCallable( + listNpmPackagesTransportSettings, settings.listNpmPackagesSettings(), clientContext); + this.listNpmPackagesPagedCallable = + callableFactory.createPagedCallable( + listNpmPackagesTransportSettings, settings.listNpmPackagesSettings(), clientContext); + this.getNpmPackageCallable = + callableFactory.createUnaryCallable( + getNpmPackageTransportSettings, settings.getNpmPackageSettings(), clientContext); + this.listPythonPackagesCallable = + callableFactory.createUnaryCallable( + listPythonPackagesTransportSettings, + settings.listPythonPackagesSettings(), + clientContext); + this.listPythonPackagesPagedCallable = + callableFactory.createPagedCallable( + listPythonPackagesTransportSettings, + settings.listPythonPackagesSettings(), + clientContext); + this.getPythonPackageCallable = + callableFactory.createUnaryCallable( + getPythonPackageTransportSettings, settings.getPythonPackageSettings(), clientContext); this.importAptArtifactsCallable = callableFactory.createUnaryCallable( importAptArtifactsTransportSettings, @@ -936,6 +1181,14 @@ protected GrpcArtifactRegistryStub( updateProjectSettingsTransportSettings, settings.updateProjectSettingsSettings(), clientContext); + this.getVPCSCConfigCallable = + callableFactory.createUnaryCallable( + getVPCSCConfigTransportSettings, settings.getVPCSCConfigSettings(), clientContext); + this.updateVPCSCConfigCallable = + callableFactory.createUnaryCallable( + updateVPCSCConfigTransportSettings, + settings.updateVPCSCConfigSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -971,6 +1224,56 @@ public UnaryCallable getDockerImageCallable( return getDockerImageCallable; } + @Override + public UnaryCallable + listMavenArtifactsCallable() { + return listMavenArtifactsCallable; + } + + @Override + public UnaryCallable + listMavenArtifactsPagedCallable() { + return listMavenArtifactsPagedCallable; + } + + @Override + public UnaryCallable getMavenArtifactCallable() { + return getMavenArtifactCallable; + } + + @Override + public UnaryCallable listNpmPackagesCallable() { + return listNpmPackagesCallable; + } + + @Override + public UnaryCallable + listNpmPackagesPagedCallable() { + return listNpmPackagesPagedCallable; + } + + @Override + public UnaryCallable getNpmPackageCallable() { + return getNpmPackageCallable; + } + + @Override + public UnaryCallable + listPythonPackagesCallable() { + return listPythonPackagesCallable; + } + + @Override + public UnaryCallable + listPythonPackagesPagedCallable() { + return listPythonPackagesPagedCallable; + } + + @Override + public UnaryCallable getPythonPackageCallable() { + return getPythonPackageCallable; + } + @Override public UnaryCallable importAptArtifactsCallable() { return importAptArtifactsCallable; @@ -1163,6 +1466,16 @@ public UnaryCallable getProjectSetti return updateProjectSettingsCallable; } + @Override + public UnaryCallable getVPCSCConfigCallable() { + return getVPCSCConfigCallable; + } + + @Override + public UnaryCallable updateVPCSCConfigCallable() { + return updateVPCSCConfigCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/HttpJsonArtifactRegistryStub.java b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/HttpJsonArtifactRegistryStub.java index d4e7257cf893..a2d3d0946394 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/HttpJsonArtifactRegistryStub.java +++ b/java-artifact-registry/google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/stub/HttpJsonArtifactRegistryStub.java @@ -19,7 +19,10 @@ import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListDockerImagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListFilesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListLocationsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListMavenArtifactsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListNpmPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPackagesPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPythonPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListRepositoriesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListTagsPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListVersionsPagedResponse; @@ -53,10 +56,14 @@ import com.google.devtools.artifactregistry.v1.File; import com.google.devtools.artifactregistry.v1.GetDockerImageRequest; import com.google.devtools.artifactregistry.v1.GetFileRequest; +import com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest; +import com.google.devtools.artifactregistry.v1.GetNpmPackageRequest; import com.google.devtools.artifactregistry.v1.GetPackageRequest; import com.google.devtools.artifactregistry.v1.GetProjectSettingsRequest; +import com.google.devtools.artifactregistry.v1.GetPythonPackageRequest; import com.google.devtools.artifactregistry.v1.GetRepositoryRequest; import com.google.devtools.artifactregistry.v1.GetTagRequest; +import com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; import com.google.devtools.artifactregistry.v1.GetVersionRequest; import com.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; import com.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; @@ -68,22 +75,33 @@ import com.google.devtools.artifactregistry.v1.ListDockerImagesResponse; import com.google.devtools.artifactregistry.v1.ListFilesRequest; import com.google.devtools.artifactregistry.v1.ListFilesResponse; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse; import com.google.devtools.artifactregistry.v1.ListPackagesRequest; import com.google.devtools.artifactregistry.v1.ListPackagesResponse; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse; import com.google.devtools.artifactregistry.v1.ListRepositoriesRequest; import com.google.devtools.artifactregistry.v1.ListRepositoriesResponse; import com.google.devtools.artifactregistry.v1.ListTagsRequest; import com.google.devtools.artifactregistry.v1.ListTagsResponse; import com.google.devtools.artifactregistry.v1.ListVersionsRequest; import com.google.devtools.artifactregistry.v1.ListVersionsResponse; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.NpmPackage; import com.google.devtools.artifactregistry.v1.OperationMetadata; import com.google.devtools.artifactregistry.v1.Package; import com.google.devtools.artifactregistry.v1.ProjectSettings; +import com.google.devtools.artifactregistry.v1.PythonPackage; import com.google.devtools.artifactregistry.v1.Repository; import com.google.devtools.artifactregistry.v1.Tag; import com.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; import com.google.devtools.artifactregistry.v1.UpdateRepositoryRequest; import com.google.devtools.artifactregistry.v1.UpdateTagRequest; +import com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; +import com.google.devtools.artifactregistry.v1.VPCSCConfig; import com.google.devtools.artifactregistry.v1.Version; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -144,6 +162,7 @@ public class HttpJsonArtifactRegistryStub extends ArtifactRegistryStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); @@ -193,6 +212,222 @@ public class HttpJsonArtifactRegistryStub extends ArtifactRegistryStub { .build()) .build(); + private static final ApiMethodDescriptor + listMavenArtifactsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/ListMavenArtifacts") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListMavenArtifactsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getMavenArtifactMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/GetMavenArtifact") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MavenArtifact.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listNpmPackagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/ListNpmPackages") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListNpmPackagesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getNpmPackageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/GetNpmPackage") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(NpmPackage.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listPythonPackagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/ListPythonPackages") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPythonPackagesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getPythonPackageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/GetPythonPackage") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PythonPackage.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor importAptArtifactsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -1121,6 +1356,81 @@ public class HttpJsonArtifactRegistryStub extends ArtifactRegistryStub { .build()) .build(); + private static final ApiMethodDescriptor + getVPCSCConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/GetVPCSCConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/vpcscConfig}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(VPCSCConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateVPCSCConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/UpdateVPCSCConfig") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{vpcscConfig.name=projects/*/locations/*/vpcscConfig}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "vpcscConfig.name", request.getVpcscConfig().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("vpcscConfig", request.getVpcscConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(VPCSCConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -1194,6 +1504,21 @@ public class HttpJsonArtifactRegistryStub extends ArtifactRegistryStub { private final UnaryCallable listDockerImagesPagedCallable; private final UnaryCallable getDockerImageCallable; + private final UnaryCallable + listMavenArtifactsCallable; + private final UnaryCallable + listMavenArtifactsPagedCallable; + private final UnaryCallable getMavenArtifactCallable; + private final UnaryCallable + listNpmPackagesCallable; + private final UnaryCallable + listNpmPackagesPagedCallable; + private final UnaryCallable getNpmPackageCallable; + private final UnaryCallable + listPythonPackagesCallable; + private final UnaryCallable + listPythonPackagesPagedCallable; + private final UnaryCallable getPythonPackageCallable; private final UnaryCallable importAptArtifactsCallable; private final OperationCallable< ImportAptArtifactsRequest, ImportAptArtifactsResponse, ImportAptArtifactsMetadata> @@ -1245,6 +1570,8 @@ public class HttpJsonArtifactRegistryStub extends ArtifactRegistryStub { getProjectSettingsCallable; private final UnaryCallable updateProjectSettingsCallable; + private final UnaryCallable getVPCSCConfigCallable; + private final UnaryCallable updateVPCSCConfigCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -1306,6 +1633,39 @@ protected HttpJsonArtifactRegistryStub( .setMethodDescriptor(getDockerImageMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + listMavenArtifactsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listMavenArtifactsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getMavenArtifactTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getMavenArtifactMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listNpmPackagesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listNpmPackagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getNpmPackageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getNpmPackageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listPythonPackagesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listPythonPackagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getPythonPackageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPythonPackageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings importAptArtifactsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(importAptArtifactsMethodDescriptor) @@ -1435,6 +1795,16 @@ protected HttpJsonArtifactRegistryStub( .setMethodDescriptor(updateProjectSettingsMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings getVPCSCConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getVPCSCConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateVPCSCConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateVPCSCConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -1456,6 +1826,41 @@ protected HttpJsonArtifactRegistryStub( this.getDockerImageCallable = callableFactory.createUnaryCallable( getDockerImageTransportSettings, settings.getDockerImageSettings(), clientContext); + this.listMavenArtifactsCallable = + callableFactory.createUnaryCallable( + listMavenArtifactsTransportSettings, + settings.listMavenArtifactsSettings(), + clientContext); + this.listMavenArtifactsPagedCallable = + callableFactory.createPagedCallable( + listMavenArtifactsTransportSettings, + settings.listMavenArtifactsSettings(), + clientContext); + this.getMavenArtifactCallable = + callableFactory.createUnaryCallable( + getMavenArtifactTransportSettings, settings.getMavenArtifactSettings(), clientContext); + this.listNpmPackagesCallable = + callableFactory.createUnaryCallable( + listNpmPackagesTransportSettings, settings.listNpmPackagesSettings(), clientContext); + this.listNpmPackagesPagedCallable = + callableFactory.createPagedCallable( + listNpmPackagesTransportSettings, settings.listNpmPackagesSettings(), clientContext); + this.getNpmPackageCallable = + callableFactory.createUnaryCallable( + getNpmPackageTransportSettings, settings.getNpmPackageSettings(), clientContext); + this.listPythonPackagesCallable = + callableFactory.createUnaryCallable( + listPythonPackagesTransportSettings, + settings.listPythonPackagesSettings(), + clientContext); + this.listPythonPackagesPagedCallable = + callableFactory.createPagedCallable( + listPythonPackagesTransportSettings, + settings.listPythonPackagesSettings(), + clientContext); + this.getPythonPackageCallable = + callableFactory.createUnaryCallable( + getPythonPackageTransportSettings, settings.getPythonPackageSettings(), clientContext); this.importAptArtifactsCallable = callableFactory.createUnaryCallable( importAptArtifactsTransportSettings, @@ -1592,6 +1997,14 @@ protected HttpJsonArtifactRegistryStub( updateProjectSettingsTransportSettings, settings.updateProjectSettingsSettings(), clientContext); + this.getVPCSCConfigCallable = + callableFactory.createUnaryCallable( + getVPCSCConfigTransportSettings, settings.getVPCSCConfigSettings(), clientContext); + this.updateVPCSCConfigCallable = + callableFactory.createUnaryCallable( + updateVPCSCConfigTransportSettings, + settings.updateVPCSCConfigSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -1611,6 +2024,12 @@ public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(listDockerImagesMethodDescriptor); methodDescriptors.add(getDockerImageMethodDescriptor); + methodDescriptors.add(listMavenArtifactsMethodDescriptor); + methodDescriptors.add(getMavenArtifactMethodDescriptor); + methodDescriptors.add(listNpmPackagesMethodDescriptor); + methodDescriptors.add(getNpmPackageMethodDescriptor); + methodDescriptors.add(listPythonPackagesMethodDescriptor); + methodDescriptors.add(getPythonPackageMethodDescriptor); methodDescriptors.add(importAptArtifactsMethodDescriptor); methodDescriptors.add(importYumArtifactsMethodDescriptor); methodDescriptors.add(listRepositoriesMethodDescriptor); @@ -1636,6 +2055,8 @@ public static List getMethodDescriptors() { methodDescriptors.add(testIamPermissionsMethodDescriptor); methodDescriptors.add(getProjectSettingsMethodDescriptor); methodDescriptors.add(updateProjectSettingsMethodDescriptor); + methodDescriptors.add(getVPCSCConfigMethodDescriptor); + methodDescriptors.add(updateVPCSCConfigMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -1662,6 +2083,56 @@ public UnaryCallable getDockerImageCallable( return getDockerImageCallable; } + @Override + public UnaryCallable + listMavenArtifactsCallable() { + return listMavenArtifactsCallable; + } + + @Override + public UnaryCallable + listMavenArtifactsPagedCallable() { + return listMavenArtifactsPagedCallable; + } + + @Override + public UnaryCallable getMavenArtifactCallable() { + return getMavenArtifactCallable; + } + + @Override + public UnaryCallable listNpmPackagesCallable() { + return listNpmPackagesCallable; + } + + @Override + public UnaryCallable + listNpmPackagesPagedCallable() { + return listNpmPackagesPagedCallable; + } + + @Override + public UnaryCallable getNpmPackageCallable() { + return getNpmPackageCallable; + } + + @Override + public UnaryCallable + listPythonPackagesCallable() { + return listPythonPackagesCallable; + } + + @Override + public UnaryCallable + listPythonPackagesPagedCallable() { + return listPythonPackagesPagedCallable; + } + + @Override + public UnaryCallable getPythonPackageCallable() { + return getPythonPackageCallable; + } + @Override public UnaryCallable importAptArtifactsCallable() { return importAptArtifactsCallable; @@ -1854,6 +2325,16 @@ public UnaryCallable getProjectSetti return updateProjectSettingsCallable; } + @Override + public UnaryCallable getVPCSCConfigCallable() { + return getVPCSCConfigCallable; + } + + @Override + public UnaryCallable updateVPCSCConfigCallable() { + return updateVPCSCConfigCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClientHttpJsonTest.java b/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClientHttpJsonTest.java index cf470988fa04..51cda4881c1a 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClientHttpJsonTest.java +++ b/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClientHttpJsonTest.java @@ -19,7 +19,10 @@ import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListDockerImagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListFilesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListLocationsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListMavenArtifactsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListNpmPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPackagesPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPythonPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListRepositoriesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListTagsPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListVersionsPagedResponse; @@ -166,13 +169,483 @@ public void getDockerImageTest() throws Exception { .setUploadTime(Timestamp.newBuilder().build()) .setMediaType("mediaType2140463422") .setBuildTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DockerImageName name = + DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]"); + + DockerImage actualResponse = client.getDockerImage(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 getDockerImageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DockerImageName name = + DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]"); + client.getDockerImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDockerImageTest2() throws Exception { + DockerImage expectedResponse = + DockerImage.newBuilder() + .setName( + DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllTags(new ArrayList()) + .setImageSizeBytes(837030929) + .setUploadTime(Timestamp.newBuilder().build()) + .setMediaType("mediaType2140463422") + .setBuildTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1270/locations/location-1270/repositories/repositorie-1270/dockerImages/dockerImage-1270"; + + DockerImage actualResponse = client.getDockerImage(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 getDockerImageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1270/locations/location-1270/repositories/repositorie-1270/dockerImages/dockerImage-1270"; + client.getDockerImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMavenArtifactsTest() throws Exception { + MavenArtifact responsesElement = MavenArtifact.newBuilder().build(); + ListMavenArtifactsResponse expectedResponse = + ListMavenArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllMavenArtifacts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + + ListMavenArtifactsPagedResponse pagedListResponse = client.listMavenArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMavenArtifactsList().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 listMavenArtifactsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + client.listMavenArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMavenArtifactsTest2() throws Exception { + MavenArtifact responsesElement = MavenArtifact.newBuilder().build(); + ListMavenArtifactsResponse expectedResponse = + ListMavenArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllMavenArtifacts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; + + ListMavenArtifactsPagedResponse pagedListResponse = client.listMavenArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMavenArtifactsList().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 listMavenArtifactsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; + client.listMavenArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMavenArtifactTest() throws Exception { + MavenArtifact expectedResponse = + MavenArtifact.newBuilder() + .setName( + MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]") + .toString()) + .setPomUri("pomUri-982659010") + .setGroupId("groupId293428218") + .setArtifactId("artifactId240640653") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + MavenArtifactName name = + MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]"); + + MavenArtifact actualResponse = client.getMavenArtifact(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 getMavenArtifactExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MavenArtifactName name = + MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]"); + client.getMavenArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMavenArtifactTest2() throws Exception { + MavenArtifact expectedResponse = + MavenArtifact.newBuilder() + .setName( + MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]") + .toString()) + .setPomUri("pomUri-982659010") + .setGroupId("groupId293428218") + .setArtifactId("artifactId240640653") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6824/locations/location-6824/repositories/repositorie-6824/mavenArtifacts/mavenArtifact-6824"; + + MavenArtifact actualResponse = client.getMavenArtifact(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 getMavenArtifactExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6824/locations/location-6824/repositories/repositorie-6824/mavenArtifacts/mavenArtifact-6824"; + client.getMavenArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNpmPackagesTest() throws Exception { + NpmPackage responsesElement = NpmPackage.newBuilder().build(); + ListNpmPackagesResponse expectedResponse = + ListNpmPackagesResponse.newBuilder() + .setNextPageToken("") + .addAllNpmPackages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + + ListNpmPackagesPagedResponse pagedListResponse = client.listNpmPackages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNpmPackagesList().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 listNpmPackagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + client.listNpmPackages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNpmPackagesTest2() throws Exception { + NpmPackage responsesElement = NpmPackage.newBuilder().build(); + ListNpmPackagesResponse expectedResponse = + ListNpmPackagesResponse.newBuilder() + .setNextPageToken("") + .addAllNpmPackages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; + + ListNpmPackagesPagedResponse pagedListResponse = client.listNpmPackages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNpmPackagesList().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 listNpmPackagesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; + client.listNpmPackages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNpmPackageTest() throws Exception { + NpmPackage expectedResponse = + NpmPackage.newBuilder() + .setName( + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]") + .toString()) + .setPackageName("packageName908759025") + .setVersion("version351608024") + .addAllTags(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + NpmPackageName name = + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]"); + + NpmPackage actualResponse = client.getNpmPackage(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 getNpmPackageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NpmPackageName name = + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]"); + client.getNpmPackage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNpmPackageTest2() throws Exception { + NpmPackage expectedResponse = + NpmPackage.newBuilder() + .setName( + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]") + .toString()) + .setPackageName("packageName908759025") + .setVersion("version351608024") + .addAllTags(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - DockerImageName name = - DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]"); + String name = + "projects/project-2716/locations/location-2716/repositories/repositorie-2716/npmPackages/npmPackage-2716"; - DockerImage actualResponse = client.getDockerImage(name); + NpmPackage actualResponse = client.getNpmPackage(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -191,16 +664,16 @@ public void getDockerImageTest() throws Exception { } @Test - public void getDockerImageExceptionTest() throws Exception { + public void getNpmPackageExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DockerImageName name = - DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]"); - client.getDockerImage(name); + String name = + "projects/project-2716/locations/location-2716/repositories/repositorie-2716/npmPackages/npmPackage-2716"; + client.getNpmPackage(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -208,25 +681,177 @@ public void getDockerImageExceptionTest() throws Exception { } @Test - public void getDockerImageTest2() throws Exception { - DockerImage expectedResponse = - DockerImage.newBuilder() + public void listPythonPackagesTest() throws Exception { + PythonPackage responsesElement = PythonPackage.newBuilder().build(); + ListPythonPackagesResponse expectedResponse = + ListPythonPackagesResponse.newBuilder() + .setNextPageToken("") + .addAllPythonPackages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + + ListPythonPackagesPagedResponse pagedListResponse = client.listPythonPackages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPythonPackagesList().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 listPythonPackagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + client.listPythonPackages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPythonPackagesTest2() throws Exception { + PythonPackage responsesElement = PythonPackage.newBuilder().build(); + ListPythonPackagesResponse expectedResponse = + ListPythonPackagesResponse.newBuilder() + .setNextPageToken("") + .addAllPythonPackages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; + + ListPythonPackagesPagedResponse pagedListResponse = client.listPythonPackages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPythonPackagesList().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 listPythonPackagesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; + client.listPythonPackages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPythonPackageTest() throws Exception { + PythonPackage expectedResponse = + PythonPackage.newBuilder() .setName( - DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]") + PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]") .toString()) .setUri("uri116076") - .addAllTags(new ArrayList()) - .setImageSizeBytes(837030929) - .setUploadTime(Timestamp.newBuilder().build()) - .setMediaType("mediaType2140463422") - .setBuildTime(Timestamp.newBuilder().build()) + .setPackageName("packageName908759025") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PythonPackageName name = + PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]"); + + PythonPackage actualResponse = client.getPythonPackage(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 getPythonPackageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PythonPackageName name = + PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]"); + client.getPythonPackage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPythonPackageTest2() throws Exception { + PythonPackage expectedResponse = + PythonPackage.newBuilder() + .setName( + PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]") + .toString()) + .setUri("uri116076") + .setPackageName("packageName908759025") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); String name = - "projects/project-1270/locations/location-1270/repositories/repositorie-1270/dockerImages/dockerImage-1270"; + "projects/project-325/locations/location-325/repositories/repositorie-325/pythonPackages/pythonPackage-325"; - DockerImage actualResponse = client.getDockerImage(name); + PythonPackage actualResponse = client.getPythonPackage(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -245,7 +870,7 @@ public void getDockerImageTest2() throws Exception { } @Test - public void getDockerImageExceptionTest2() throws Exception { + public void getPythonPackageExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -253,8 +878,8 @@ public void getDockerImageExceptionTest2() throws Exception { try { String name = - "projects/project-1270/locations/location-1270/repositories/repositorie-1270/dockerImages/dockerImage-1270"; - client.getDockerImage(name); + "projects/project-325/locations/location-325/repositories/repositorie-325/pythonPackages/pythonPackage-325"; + client.getPythonPackage(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -860,6 +1485,56 @@ public void listPackagesTest() throws Exception { .build(); mockService.addResponse(expectedResponse); + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + + ListPackagesPagedResponse pagedListResponse = client.listPackages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPackagesList().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 listPackagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + client.listPackages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPackagesTest2() throws Exception { + Package responsesElement = Package.newBuilder().build(); + ListPackagesResponse expectedResponse = + ListPackagesResponse.newBuilder() + .setNextPageToken("") + .addAllPackages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; ListPackagesPagedResponse pagedListResponse = client.listPackages(parent); @@ -885,15 +1560,63 @@ public void listPackagesTest() throws Exception { } @Test - public void listPackagesExceptionTest() throws Exception { + public void listPackagesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; + client.listPackages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPackageTest() throws Exception { + Package expectedResponse = + Package.newBuilder() + .setName( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + + Package actualResponse = client.getPackage(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 getPackageExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; - client.listPackages(parent); + PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + client.getPackage(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -901,10 +1624,11 @@ public void listPackagesExceptionTest() throws Exception { } @Test - public void getPackageTest() throws Exception { + public void getPackageTest2() throws Exception { Package expectedResponse = Package.newBuilder() - .setName("name3373707") + .setName( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) .setDisplayName("displayName1714148973") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -933,7 +1657,7 @@ public void getPackageTest() throws Exception { } @Test - public void getPackageExceptionTest() throws Exception { + public void getPackageExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -960,6 +1684,51 @@ public void deletePackageTest() throws Exception { .build(); mockService.addResponse(resultOperation); + PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + + client.deletePackageAsync(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 deletePackageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + client.deletePackageAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePackageTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePackageTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + String name = "projects/project-639/locations/location-639/repositories/repositorie-639/packages/package-639"; @@ -981,7 +1750,7 @@ public void deletePackageTest() throws Exception { } @Test - public void deletePackageExceptionTest() throws Exception { + public void deletePackageExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -1156,7 +1925,7 @@ public void listFilesTest() throws Exception { .build(); mockService.addResponse(expectedResponse); - String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); ListFilesPagedResponse pagedListResponse = client.listFiles(parent); @@ -1187,6 +1956,56 @@ public void listFilesExceptionTest() throws Exception { new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); + try { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + client.listFiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFilesTest2() throws Exception { + File responsesElement = File.newBuilder().build(); + ListFilesResponse expectedResponse = + ListFilesResponse.newBuilder() + .setNextPageToken("") + .addAllFiles(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; + + ListFilesPagedResponse pagedListResponse = client.listFiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFilesList().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 listFilesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + try { String parent = "projects/project-9015/locations/location-9015/repositories/repositorie-9015"; client.listFiles(parent); @@ -1200,12 +2019,63 @@ public void listFilesExceptionTest() throws Exception { public void getFileTest() throws Exception { File expectedResponse = File.newBuilder() - .setName("name3373707") + .setName(FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString()) + .setSizeBytes(-1796325715) + .addAllHashes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOwner("owner106164915") + .setFetchTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + FileName name = FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]"); + + File actualResponse = client.getFile(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 getFileExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FileName name = FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]"); + client.getFile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFileTest2() throws Exception { + File expectedResponse = + File.newBuilder() + .setName(FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString()) .setSizeBytes(-1796325715) .addAllHashes(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setOwner("owner106164915") + .setFetchTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1231,7 +2101,7 @@ public void getFileTest() throws Exception { } @Test - public void getFileExceptionTest() throws Exception { + public void getFileExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -1789,6 +2659,146 @@ public void updateProjectSettingsExceptionTest() throws Exception { } } + @Test + public void getVPCSCConfigTest() throws Exception { + VPCSCConfig expectedResponse = + VPCSCConfig.newBuilder() + .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + VpcscConfigName name = VpcscConfigName.of("[PROJECT]", "[LOCATION]"); + + VPCSCConfig actualResponse = client.getVPCSCConfig(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 getVPCSCConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + VpcscConfigName name = VpcscConfigName.of("[PROJECT]", "[LOCATION]"); + client.getVPCSCConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getVPCSCConfigTest2() throws Exception { + VPCSCConfig expectedResponse = + VPCSCConfig.newBuilder() + .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2118/locations/location-2118/vpcscConfig"; + + VPCSCConfig actualResponse = client.getVPCSCConfig(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 getVPCSCConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2118/locations/location-2118/vpcscConfig"; + client.getVPCSCConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateVPCSCConfigTest() throws Exception { + VPCSCConfig expectedResponse = + VPCSCConfig.newBuilder() + .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + VPCSCConfig vpcscConfig = + VPCSCConfig.newBuilder() + .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + VPCSCConfig actualResponse = client.updateVPCSCConfig(vpcscConfig, 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 updateVPCSCConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + VPCSCConfig vpcscConfig = + VPCSCConfig.newBuilder() + .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateVPCSCConfig(vpcscConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClientTest.java b/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClientTest.java index 108c63301bf2..4e3b4b1c2519 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClientTest.java +++ b/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClientTest.java @@ -19,7 +19,10 @@ import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListDockerImagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListFilesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListLocationsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListMavenArtifactsPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListNpmPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPackagesPagedResponse; +import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListPythonPackagesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListRepositoriesPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListTagsPagedResponse; import static com.google.devtools.artifactregistry.v1.ArtifactRegistryClient.ListVersionsPagedResponse; @@ -167,6 +170,7 @@ public void getDockerImageTest() throws Exception { .setUploadTime(Timestamp.newBuilder().build()) .setMediaType("mediaType2140463422") .setBuildTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockArtifactRegistry.addResponse(expectedResponse); @@ -215,6 +219,7 @@ public void getDockerImageTest2() throws Exception { .setUploadTime(Timestamp.newBuilder().build()) .setMediaType("mediaType2140463422") .setBuildTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockArtifactRegistry.addResponse(expectedResponse); @@ -248,6 +253,548 @@ public void getDockerImageExceptionTest2() throws Exception { } } + @Test + public void listMavenArtifactsTest() throws Exception { + MavenArtifact responsesElement = MavenArtifact.newBuilder().build(); + ListMavenArtifactsResponse expectedResponse = + ListMavenArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllMavenArtifacts(Arrays.asList(responsesElement)) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + + ListMavenArtifactsPagedResponse pagedListResponse = client.listMavenArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMavenArtifactsList().get(0), resources.get(0)); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMavenArtifactsRequest actualRequest = ((ListMavenArtifactsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMavenArtifactsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + client.listMavenArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMavenArtifactsTest2() throws Exception { + MavenArtifact responsesElement = MavenArtifact.newBuilder().build(); + ListMavenArtifactsResponse expectedResponse = + ListMavenArtifactsResponse.newBuilder() + .setNextPageToken("") + .addAllMavenArtifacts(Arrays.asList(responsesElement)) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMavenArtifactsPagedResponse pagedListResponse = client.listMavenArtifacts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMavenArtifactsList().get(0), resources.get(0)); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMavenArtifactsRequest actualRequest = ((ListMavenArtifactsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMavenArtifactsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMavenArtifacts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMavenArtifactTest() throws Exception { + MavenArtifact expectedResponse = + MavenArtifact.newBuilder() + .setName( + MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]") + .toString()) + .setPomUri("pomUri-982659010") + .setGroupId("groupId293428218") + .setArtifactId("artifactId240640653") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + MavenArtifactName name = + MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]"); + + MavenArtifact actualResponse = client.getMavenArtifact(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMavenArtifactRequest actualRequest = ((GetMavenArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMavenArtifactExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + MavenArtifactName name = + MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]"); + client.getMavenArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMavenArtifactTest2() throws Exception { + MavenArtifact expectedResponse = + MavenArtifact.newBuilder() + .setName( + MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]") + .toString()) + .setPomUri("pomUri-982659010") + .setGroupId("groupId293428218") + .setArtifactId("artifactId240640653") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + MavenArtifact actualResponse = client.getMavenArtifact(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMavenArtifactRequest actualRequest = ((GetMavenArtifactRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMavenArtifactExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getMavenArtifact(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNpmPackagesTest() throws Exception { + NpmPackage responsesElement = NpmPackage.newBuilder().build(); + ListNpmPackagesResponse expectedResponse = + ListNpmPackagesResponse.newBuilder() + .setNextPageToken("") + .addAllNpmPackages(Arrays.asList(responsesElement)) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + + ListNpmPackagesPagedResponse pagedListResponse = client.listNpmPackages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNpmPackagesList().get(0), resources.get(0)); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNpmPackagesRequest actualRequest = ((ListNpmPackagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNpmPackagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + client.listNpmPackages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNpmPackagesTest2() throws Exception { + NpmPackage responsesElement = NpmPackage.newBuilder().build(); + ListNpmPackagesResponse expectedResponse = + ListNpmPackagesResponse.newBuilder() + .setNextPageToken("") + .addAllNpmPackages(Arrays.asList(responsesElement)) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNpmPackagesPagedResponse pagedListResponse = client.listNpmPackages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNpmPackagesList().get(0), resources.get(0)); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNpmPackagesRequest actualRequest = ((ListNpmPackagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNpmPackagesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNpmPackages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNpmPackageTest() throws Exception { + NpmPackage expectedResponse = + NpmPackage.newBuilder() + .setName( + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]") + .toString()) + .setPackageName("packageName908759025") + .setVersion("version351608024") + .addAllTags(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + NpmPackageName name = + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]"); + + NpmPackage actualResponse = client.getNpmPackage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNpmPackageRequest actualRequest = ((GetNpmPackageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNpmPackageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + NpmPackageName name = + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]"); + client.getNpmPackage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNpmPackageTest2() throws Exception { + NpmPackage expectedResponse = + NpmPackage.newBuilder() + .setName( + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]") + .toString()) + .setPackageName("packageName908759025") + .setVersion("version351608024") + .addAllTags(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + NpmPackage actualResponse = client.getNpmPackage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNpmPackageRequest actualRequest = ((GetNpmPackageRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNpmPackageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getNpmPackage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPythonPackagesTest() throws Exception { + PythonPackage responsesElement = PythonPackage.newBuilder().build(); + ListPythonPackagesResponse expectedResponse = + ListPythonPackagesResponse.newBuilder() + .setNextPageToken("") + .addAllPythonPackages(Arrays.asList(responsesElement)) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + + ListPythonPackagesPagedResponse pagedListResponse = client.listPythonPackages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPythonPackagesList().get(0), resources.get(0)); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPythonPackagesRequest actualRequest = ((ListPythonPackagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPythonPackagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + client.listPythonPackages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPythonPackagesTest2() throws Exception { + PythonPackage responsesElement = PythonPackage.newBuilder().build(); + ListPythonPackagesResponse expectedResponse = + ListPythonPackagesResponse.newBuilder() + .setNextPageToken("") + .addAllPythonPackages(Arrays.asList(responsesElement)) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPythonPackagesPagedResponse pagedListResponse = client.listPythonPackages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPythonPackagesList().get(0), resources.get(0)); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPythonPackagesRequest actualRequest = ((ListPythonPackagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPythonPackagesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPythonPackages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPythonPackageTest() throws Exception { + PythonPackage expectedResponse = + PythonPackage.newBuilder() + .setName( + PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]") + .toString()) + .setUri("uri116076") + .setPackageName("packageName908759025") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + PythonPackageName name = + PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]"); + + PythonPackage actualResponse = client.getPythonPackage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPythonPackageRequest actualRequest = ((GetPythonPackageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPythonPackageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + PythonPackageName name = + PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]"); + client.getPythonPackage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPythonPackageTest2() throws Exception { + PythonPackage expectedResponse = + PythonPackage.newBuilder() + .setName( + PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]") + .toString()) + .setUri("uri116076") + .setPackageName("packageName908759025") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + PythonPackage actualResponse = client.getPythonPackage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPythonPackageRequest actualRequest = ((GetPythonPackageRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPythonPackageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getPythonPackage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void importAptArtifactsTest() throws Exception { ImportAptArtifactsResponse expectedResponse = @@ -769,7 +1316,51 @@ public void deleteRepositoryExceptionTest2() throws Exception { } @Test - public void listPackagesTest() throws Exception { + public void listPackagesTest() throws Exception { + Package responsesElement = Package.newBuilder().build(); + ListPackagesResponse expectedResponse = + ListPackagesResponse.newBuilder() + .setNextPageToken("") + .addAllPackages(Arrays.asList(responsesElement)) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + + ListPackagesPagedResponse pagedListResponse = client.listPackages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPackagesList().get(0), resources.get(0)); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPackagesRequest actualRequest = ((ListPackagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPackagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + client.listPackages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPackagesTest2() throws Exception { Package responsesElement = Package.newBuilder().build(); ListPackagesResponse expectedResponse = ListPackagesResponse.newBuilder() @@ -799,7 +1390,7 @@ public void listPackagesTest() throws Exception { } @Test - public void listPackagesExceptionTest() throws Exception { + public void listPackagesExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockArtifactRegistry.addException(exception); @@ -816,7 +1407,50 @@ public void listPackagesExceptionTest() throws Exception { public void getPackageTest() throws Exception { Package expectedResponse = Package.newBuilder() - .setName("name3373707") + .setName( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + + Package actualResponse = client.getPackage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPackageRequest actualRequest = ((GetPackageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPackageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + client.getPackage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPackageTest2() throws Exception { + Package expectedResponse = + Package.newBuilder() + .setName( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) .setDisplayName("displayName1714148973") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -840,7 +1474,7 @@ public void getPackageTest() throws Exception { } @Test - public void getPackageExceptionTest() throws Exception { + public void getPackageExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockArtifactRegistry.addException(exception); @@ -864,6 +1498,48 @@ public void deletePackageTest() throws Exception { .build(); mockArtifactRegistry.addResponse(resultOperation); + PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + + client.deletePackageAsync(name).get(); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePackageRequest actualRequest = ((DeletePackageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePackageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + client.deletePackageAsync(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 deletePackageTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePackageTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockArtifactRegistry.addResponse(resultOperation); + String name = "name3373707"; client.deletePackageAsync(name).get(); @@ -880,7 +1556,7 @@ public void deletePackageTest() throws Exception { } @Test - public void deletePackageExceptionTest() throws Exception { + public void deletePackageExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockArtifactRegistry.addException(exception); @@ -1034,6 +1710,50 @@ public void listFilesTest() throws Exception { .build(); mockArtifactRegistry.addResponse(expectedResponse); + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + + ListFilesPagedResponse pagedListResponse = client.listFiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFilesList().get(0), resources.get(0)); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFilesRequest actualRequest = ((ListFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + client.listFiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFilesTest2() throws Exception { + File responsesElement = File.newBuilder().build(); + ListFilesResponse expectedResponse = + ListFilesResponse.newBuilder() + .setNextPageToken("") + .addAllFiles(Arrays.asList(responsesElement)) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + String parent = "parent-995424086"; ListFilesPagedResponse pagedListResponse = client.listFiles(parent); @@ -1055,7 +1775,7 @@ public void listFilesTest() throws Exception { } @Test - public void listFilesExceptionTest() throws Exception { + public void listFilesExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockArtifactRegistry.addException(exception); @@ -1072,12 +1792,57 @@ public void listFilesExceptionTest() throws Exception { public void getFileTest() throws Exception { File expectedResponse = File.newBuilder() - .setName("name3373707") + .setName(FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString()) .setSizeBytes(-1796325715) .addAllHashes(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setOwner("owner106164915") + .setFetchTime(Timestamp.newBuilder().build()) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + FileName name = FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]"); + + File actualResponse = client.getFile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFileRequest actualRequest = ((GetFileRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + FileName name = FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]"); + client.getFile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFileTest2() throws Exception { + File expectedResponse = + File.newBuilder() + .setName(FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString()) + .setSizeBytes(-1796325715) + .addAllHashes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOwner("owner106164915") + .setFetchTime(Timestamp.newBuilder().build()) .build(); mockArtifactRegistry.addResponse(expectedResponse); @@ -1098,7 +1863,7 @@ public void getFileTest() throws Exception { } @Test - public void getFileExceptionTest() throws Exception { + public void getFileExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockArtifactRegistry.addException(exception); @@ -1572,6 +2337,123 @@ public void updateProjectSettingsExceptionTest() throws Exception { } } + @Test + public void getVPCSCConfigTest() throws Exception { + VPCSCConfig expectedResponse = + VPCSCConfig.newBuilder() + .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + VpcscConfigName name = VpcscConfigName.of("[PROJECT]", "[LOCATION]"); + + VPCSCConfig actualResponse = client.getVPCSCConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetVPCSCConfigRequest actualRequest = ((GetVPCSCConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getVPCSCConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + VpcscConfigName name = VpcscConfigName.of("[PROJECT]", "[LOCATION]"); + client.getVPCSCConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getVPCSCConfigTest2() throws Exception { + VPCSCConfig expectedResponse = + VPCSCConfig.newBuilder() + .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + VPCSCConfig actualResponse = client.getVPCSCConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetVPCSCConfigRequest actualRequest = ((GetVPCSCConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getVPCSCConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getVPCSCConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateVPCSCConfigTest() throws Exception { + VPCSCConfig expectedResponse = + VPCSCConfig.newBuilder() + .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + mockArtifactRegistry.addResponse(expectedResponse); + + VPCSCConfig vpcscConfig = VPCSCConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + VPCSCConfig actualResponse = client.updateVPCSCConfig(vpcscConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateVPCSCConfigRequest actualRequest = ((UpdateVPCSCConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(vpcscConfig, actualRequest.getVpcscConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateVPCSCConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + VPCSCConfig vpcscConfig = VPCSCConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateVPCSCConfig(vpcscConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/MockArtifactRegistryImpl.java b/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/MockArtifactRegistryImpl.java index f9e410c78636..530604413045 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/MockArtifactRegistryImpl.java +++ b/java-artifact-registry/google-cloud-artifact-registry/src/test/java/com/google/devtools/artifactregistry/v1/MockArtifactRegistryImpl.java @@ -107,6 +107,134 @@ public void getDockerImage( } } + @Override + public void listMavenArtifacts( + ListMavenArtifactsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListMavenArtifactsResponse) { + requests.add(request); + responseObserver.onNext(((ListMavenArtifactsResponse) 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 ListMavenArtifacts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListMavenArtifactsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getMavenArtifact( + GetMavenArtifactRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof MavenArtifact) { + requests.add(request); + responseObserver.onNext(((MavenArtifact) 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 GetMavenArtifact, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + MavenArtifact.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNpmPackages( + ListNpmPackagesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNpmPackagesResponse) { + requests.add(request); + responseObserver.onNext(((ListNpmPackagesResponse) 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 ListNpmPackages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNpmPackagesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNpmPackage( + GetNpmPackageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NpmPackage) { + requests.add(request); + responseObserver.onNext(((NpmPackage) 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 GetNpmPackage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NpmPackage.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPythonPackages( + ListPythonPackagesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPythonPackagesResponse) { + requests.add(request); + responseObserver.onNext(((ListPythonPackagesResponse) 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 ListPythonPackages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPythonPackagesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPythonPackage( + GetPythonPackageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PythonPackage) { + requests.add(request); + responseObserver.onNext(((PythonPackage) 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 GetPythonPackage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PythonPackage.class.getName(), + Exception.class.getName()))); + } + } + @Override public void importAptArtifacts( ImportAptArtifactsRequest request, StreamObserver responseObserver) { @@ -622,4 +750,46 @@ public void updateProjectSettings( Exception.class.getName()))); } } + + @Override + public void getVPCSCConfig( + GetVPCSCConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof VPCSCConfig) { + requests.add(request); + responseObserver.onNext(((VPCSCConfig) 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 GetVPCSCConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + VPCSCConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateVPCSCConfig( + UpdateVPCSCConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof VPCSCConfig) { + requests.add(request); + responseObserver.onNext(((VPCSCConfig) 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 UpdateVPCSCConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + VPCSCConfig.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-artifact-registry/grpc-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryGrpc.java b/java-artifact-registry/grpc-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryGrpc.java index 8dd4c5ada801..aaca14b533da 100644 --- a/java-artifact-registry/grpc-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryGrpc.java +++ b/java-artifact-registry/grpc-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryGrpc.java @@ -138,6 +138,290 @@ private ArtifactRegistryGrpc() {} return getGetDockerImageMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest, + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse> + getListMavenArtifactsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMavenArtifacts", + requestType = com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.class, + responseType = com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest, + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse> + getListMavenArtifactsMethod() { + io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest, + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse> + getListMavenArtifactsMethod; + if ((getListMavenArtifactsMethod = ArtifactRegistryGrpc.getListMavenArtifactsMethod) == null) { + synchronized (ArtifactRegistryGrpc.class) { + if ((getListMavenArtifactsMethod = ArtifactRegistryGrpc.getListMavenArtifactsMethod) + == null) { + ArtifactRegistryGrpc.getListMavenArtifactsMethod = + getListMavenArtifactsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListMavenArtifacts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ArtifactRegistryMethodDescriptorSupplier("ListMavenArtifacts")) + .build(); + } + } + } + return getListMavenArtifactsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest, + com.google.devtools.artifactregistry.v1.MavenArtifact> + getGetMavenArtifactMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMavenArtifact", + requestType = com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest.class, + responseType = com.google.devtools.artifactregistry.v1.MavenArtifact.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest, + com.google.devtools.artifactregistry.v1.MavenArtifact> + getGetMavenArtifactMethod() { + io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest, + com.google.devtools.artifactregistry.v1.MavenArtifact> + getGetMavenArtifactMethod; + if ((getGetMavenArtifactMethod = ArtifactRegistryGrpc.getGetMavenArtifactMethod) == null) { + synchronized (ArtifactRegistryGrpc.class) { + if ((getGetMavenArtifactMethod = ArtifactRegistryGrpc.getGetMavenArtifactMethod) == null) { + ArtifactRegistryGrpc.getGetMavenArtifactMethod = + getGetMavenArtifactMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMavenArtifact")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.MavenArtifact + .getDefaultInstance())) + .setSchemaDescriptor( + new ArtifactRegistryMethodDescriptorSupplier("GetMavenArtifact")) + .build(); + } + } + } + return getGetMavenArtifactMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest, + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse> + getListNpmPackagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNpmPackages", + requestType = com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest.class, + responseType = com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest, + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse> + getListNpmPackagesMethod() { + io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest, + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse> + getListNpmPackagesMethod; + if ((getListNpmPackagesMethod = ArtifactRegistryGrpc.getListNpmPackagesMethod) == null) { + synchronized (ArtifactRegistryGrpc.class) { + if ((getListNpmPackagesMethod = ArtifactRegistryGrpc.getListNpmPackagesMethod) == null) { + ArtifactRegistryGrpc.getListNpmPackagesMethod = + getListNpmPackagesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNpmPackages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ArtifactRegistryMethodDescriptorSupplier("ListNpmPackages")) + .build(); + } + } + } + return getListNpmPackagesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest, + com.google.devtools.artifactregistry.v1.NpmPackage> + getGetNpmPackageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNpmPackage", + requestType = com.google.devtools.artifactregistry.v1.GetNpmPackageRequest.class, + responseType = com.google.devtools.artifactregistry.v1.NpmPackage.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest, + com.google.devtools.artifactregistry.v1.NpmPackage> + getGetNpmPackageMethod() { + io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest, + com.google.devtools.artifactregistry.v1.NpmPackage> + getGetNpmPackageMethod; + if ((getGetNpmPackageMethod = ArtifactRegistryGrpc.getGetNpmPackageMethod) == null) { + synchronized (ArtifactRegistryGrpc.class) { + if ((getGetNpmPackageMethod = ArtifactRegistryGrpc.getGetNpmPackageMethod) == null) { + ArtifactRegistryGrpc.getGetNpmPackageMethod = + getGetNpmPackageMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNpmPackage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.NpmPackage + .getDefaultInstance())) + .setSchemaDescriptor( + new ArtifactRegistryMethodDescriptorSupplier("GetNpmPackage")) + .build(); + } + } + } + return getGetNpmPackageMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest, + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse> + getListPythonPackagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPythonPackages", + requestType = com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest.class, + responseType = com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest, + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse> + getListPythonPackagesMethod() { + io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest, + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse> + getListPythonPackagesMethod; + if ((getListPythonPackagesMethod = ArtifactRegistryGrpc.getListPythonPackagesMethod) == null) { + synchronized (ArtifactRegistryGrpc.class) { + if ((getListPythonPackagesMethod = ArtifactRegistryGrpc.getListPythonPackagesMethod) + == null) { + ArtifactRegistryGrpc.getListPythonPackagesMethod = + getListPythonPackagesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPythonPackages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ArtifactRegistryMethodDescriptorSupplier("ListPythonPackages")) + .build(); + } + } + } + return getListPythonPackagesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest, + com.google.devtools.artifactregistry.v1.PythonPackage> + getGetPythonPackageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPythonPackage", + requestType = com.google.devtools.artifactregistry.v1.GetPythonPackageRequest.class, + responseType = com.google.devtools.artifactregistry.v1.PythonPackage.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest, + com.google.devtools.artifactregistry.v1.PythonPackage> + getGetPythonPackageMethod() { + io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest, + com.google.devtools.artifactregistry.v1.PythonPackage> + getGetPythonPackageMethod; + if ((getGetPythonPackageMethod = ArtifactRegistryGrpc.getGetPythonPackageMethod) == null) { + synchronized (ArtifactRegistryGrpc.class) { + if ((getGetPythonPackageMethod = ArtifactRegistryGrpc.getGetPythonPackageMethod) == null) { + ArtifactRegistryGrpc.getGetPythonPackageMethod = + getGetPythonPackageMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPythonPackage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.PythonPackage + .getDefaultInstance())) + .setSchemaDescriptor( + new ArtifactRegistryMethodDescriptorSupplier("GetPythonPackage")) + .build(); + } + } + } + return getGetPythonPackageMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest, com.google.longrunning.Operation> @@ -1281,6 +1565,101 @@ private ArtifactRegistryGrpc() {} return getUpdateProjectSettingsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest, + com.google.devtools.artifactregistry.v1.VPCSCConfig> + getGetVPCSCConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetVPCSCConfig", + requestType = com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.class, + responseType = com.google.devtools.artifactregistry.v1.VPCSCConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest, + com.google.devtools.artifactregistry.v1.VPCSCConfig> + getGetVPCSCConfigMethod() { + io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest, + com.google.devtools.artifactregistry.v1.VPCSCConfig> + getGetVPCSCConfigMethod; + if ((getGetVPCSCConfigMethod = ArtifactRegistryGrpc.getGetVPCSCConfigMethod) == null) { + synchronized (ArtifactRegistryGrpc.class) { + if ((getGetVPCSCConfigMethod = ArtifactRegistryGrpc.getGetVPCSCConfigMethod) == null) { + ArtifactRegistryGrpc.getGetVPCSCConfigMethod = + getGetVPCSCConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetVPCSCConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.VPCSCConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new ArtifactRegistryMethodDescriptorSupplier("GetVPCSCConfig")) + .build(); + } + } + } + return getGetVPCSCConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest, + com.google.devtools.artifactregistry.v1.VPCSCConfig> + getUpdateVPCSCConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateVPCSCConfig", + requestType = com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.class, + responseType = com.google.devtools.artifactregistry.v1.VPCSCConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest, + com.google.devtools.artifactregistry.v1.VPCSCConfig> + getUpdateVPCSCConfigMethod() { + io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest, + com.google.devtools.artifactregistry.v1.VPCSCConfig> + getUpdateVPCSCConfigMethod; + if ((getUpdateVPCSCConfigMethod = ArtifactRegistryGrpc.getUpdateVPCSCConfigMethod) == null) { + synchronized (ArtifactRegistryGrpc.class) { + if ((getUpdateVPCSCConfigMethod = ArtifactRegistryGrpc.getUpdateVPCSCConfigMethod) + == null) { + ArtifactRegistryGrpc.getUpdateVPCSCConfigMethod = + getUpdateVPCSCConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateVPCSCConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.VPCSCConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new ArtifactRegistryMethodDescriptorSupplier("UpdateVPCSCConfig")) + .build(); + } + } + } + return getUpdateVPCSCConfigMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static ArtifactRegistryStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -1371,6 +1750,98 @@ public void getDockerImage( getGetDockerImageMethod(), responseObserver); } + /** + * + * + *
+     * Lists maven artifacts.
+     * 
+ */ + public void listMavenArtifacts( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest request, + io.grpc.stub.StreamObserver< + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListMavenArtifactsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a maven artifact.
+     * 
+ */ + public void getMavenArtifact( + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetMavenArtifactMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists npm packages.
+     * 
+ */ + public void listNpmPackages( + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNpmPackagesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a npm package.
+     * 
+ */ + public void getNpmPackage( + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetNpmPackageMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists python packages.
+     * 
+ */ + public void listPythonPackages( + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest request, + io.grpc.stub.StreamObserver< + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPythonPackagesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a python package.
+     * 
+ */ + public void getPythonPackage( + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPythonPackageMethod(), responseObserver); + } + /** * * @@ -1737,6 +2208,36 @@ public void updateProjectSettings( getUpdateProjectSettingsMethod(), responseObserver); } + /** + * + * + *
+     * Retrieves the VPCSC Config for the Project.
+     * 
+ */ + public void getVPCSCConfig( + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetVPCSCConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the VPCSC Config for the Project.
+     * 
+ */ + public void updateVPCSCConfig( + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateVPCSCConfigMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -1754,6 +2255,48 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.devtools.artifactregistry.v1.GetDockerImageRequest, com.google.devtools.artifactregistry.v1.DockerImage>( this, METHODID_GET_DOCKER_IMAGE))) + .addMethod( + getListMavenArtifactsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest, + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse>( + this, METHODID_LIST_MAVEN_ARTIFACTS))) + .addMethod( + getGetMavenArtifactMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest, + com.google.devtools.artifactregistry.v1.MavenArtifact>( + this, METHODID_GET_MAVEN_ARTIFACT))) + .addMethod( + getListNpmPackagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest, + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse>( + this, METHODID_LIST_NPM_PACKAGES))) + .addMethod( + getGetNpmPackageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest, + com.google.devtools.artifactregistry.v1.NpmPackage>( + this, METHODID_GET_NPM_PACKAGE))) + .addMethod( + getListPythonPackagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest, + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse>( + this, METHODID_LIST_PYTHON_PACKAGES))) + .addMethod( + getGetPythonPackageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest, + com.google.devtools.artifactregistry.v1.PythonPackage>( + this, METHODID_GET_PYTHON_PACKAGE))) .addMethod( getImportAptArtifactsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1914,51 +2457,169 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest, com.google.devtools.artifactregistry.v1.ProjectSettings>( this, METHODID_UPDATE_PROJECT_SETTINGS))) + .addMethod( + getGetVPCSCConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest, + com.google.devtools.artifactregistry.v1.VPCSCConfig>( + this, METHODID_GET_VPCSCCONFIG))) + .addMethod( + getUpdateVPCSCConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest, + com.google.devtools.artifactregistry.v1.VPCSCConfig>( + this, METHODID_UPDATE_VPCSCCONFIG))) .build(); } - } + } + + /** + * + * + *
+   * The Artifact Registry API service.
+   * Artifact Registry is an artifact management system for storing artifacts
+   * from different package management systems.
+   * The resources managed by this API are:
+   * * Repositories, which group packages and their data.
+   * * Packages, which group versions and their tags.
+   * * Versions, which are specific forms of a package.
+   * * Tags, which represent alternative names for versions.
+   * * Files, which contain content and are optionally associated with a Package
+   *   or Version.
+   * 
+ */ + public static final class ArtifactRegistryStub + extends io.grpc.stub.AbstractAsyncStub { + private ArtifactRegistryStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ArtifactRegistryStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ArtifactRegistryStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists docker images.
+     * 
+ */ + public void listDockerImages( + com.google.devtools.artifactregistry.v1.ListDockerImagesRequest request, + io.grpc.stub.StreamObserver< + com.google.devtools.artifactregistry.v1.ListDockerImagesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDockerImagesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a docker image.
+     * 
+ */ + public void getDockerImage( + com.google.devtools.artifactregistry.v1.GetDockerImageRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDockerImageMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists maven artifacts.
+     * 
+ */ + public void listMavenArtifacts( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest request, + io.grpc.stub.StreamObserver< + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMavenArtifactsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a maven artifact.
+     * 
+ */ + public void getMavenArtifact( + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMavenArtifactMethod(), getCallOptions()), + request, + responseObserver); + } - /** - * - * - *
-   * The Artifact Registry API service.
-   * Artifact Registry is an artifact management system for storing artifacts
-   * from different package management systems.
-   * The resources managed by this API are:
-   * * Repositories, which group packages and their data.
-   * * Packages, which group versions and their tags.
-   * * Versions, which are specific forms of a package.
-   * * Tags, which represent alternative names for versions.
-   * * Files, which contain content and are optionally associated with a Package
-   *   or Version.
-   * 
- */ - public static final class ArtifactRegistryStub - extends io.grpc.stub.AbstractAsyncStub { - private ArtifactRegistryStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); + /** + * + * + *
+     * Lists npm packages.
+     * 
+ */ + public void listNpmPackages( + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNpmPackagesMethod(), getCallOptions()), + request, + responseObserver); } - @java.lang.Override - protected ArtifactRegistryStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ArtifactRegistryStub(channel, callOptions); + /** + * + * + *
+     * Gets a npm package.
+     * 
+ */ + public void getNpmPackage( + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNpmPackageMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Lists docker images.
+     * Lists python packages.
      * 
*/ - public void listDockerImages( - com.google.devtools.artifactregistry.v1.ListDockerImagesRequest request, + public void listPythonPackages( + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest request, io.grpc.stub.StreamObserver< - com.google.devtools.artifactregistry.v1.ListDockerImagesResponse> + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListDockerImagesMethod(), getCallOptions()), + getChannel().newCall(getListPythonPackagesMethod(), getCallOptions()), request, responseObserver); } @@ -1967,15 +2628,15 @@ public void listDockerImages( * * *
-     * Gets a docker image.
+     * Gets a python package.
      * 
*/ - public void getDockerImage( - com.google.devtools.artifactregistry.v1.GetDockerImageRequest request, - io.grpc.stub.StreamObserver + public void getPythonPackage( + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetDockerImageMethod(), getCallOptions()), + getChannel().newCall(getGetPythonPackageMethod(), getCallOptions()), request, responseObserver); } @@ -2386,6 +3047,40 @@ public void updateProjectSettings( request, responseObserver); } + + /** + * + * + *
+     * Retrieves the VPCSC Config for the Project.
+     * 
+ */ + public void getVPCSCConfig( + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetVPCSCConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the VPCSC Config for the Project.
+     * 
+ */ + public void updateVPCSCConfig( + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateVPCSCConfigMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -2442,6 +3137,84 @@ public com.google.devtools.artifactregistry.v1.DockerImage getDockerImage( getChannel(), getGetDockerImageMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Lists maven artifacts.
+     * 
+ */ + public com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse listMavenArtifacts( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMavenArtifactsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a maven artifact.
+     * 
+ */ + public com.google.devtools.artifactregistry.v1.MavenArtifact getMavenArtifact( + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMavenArtifactMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists npm packages.
+     * 
+ */ + public com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse listNpmPackages( + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNpmPackagesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a npm package.
+     * 
+ */ + public com.google.devtools.artifactregistry.v1.NpmPackage getNpmPackage( + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNpmPackageMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists python packages.
+     * 
+ */ + public com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse listPythonPackages( + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPythonPackagesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a python package.
+     * 
+ */ + public com.google.devtools.artifactregistry.v1.PythonPackage getPythonPackage( + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPythonPackageMethod(), getCallOptions(), request); + } + /** * * @@ -2775,6 +3548,32 @@ public com.google.devtools.artifactregistry.v1.ProjectSettings updateProjectSett return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getUpdateProjectSettingsMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Retrieves the VPCSC Config for the Project.
+     * 
+ */ + public com.google.devtools.artifactregistry.v1.VPCSCConfig getVPCSCConfig( + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetVPCSCConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the VPCSC Config for the Project.
+     * 
+ */ + public com.google.devtools.artifactregistry.v1.VPCSCConfig updateVPCSCConfig( + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateVPCSCConfigMethod(), getCallOptions(), request); + } } /** @@ -2833,6 +3632,92 @@ protected ArtifactRegistryFutureStub build( getChannel().newCall(getGetDockerImageMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Lists maven artifacts.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse> + listMavenArtifacts( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMavenArtifactsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a maven artifact.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devtools.artifactregistry.v1.MavenArtifact> + getMavenArtifact(com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMavenArtifactMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists npm packages.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse> + listNpmPackages(com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNpmPackagesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a npm package.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devtools.artifactregistry.v1.NpmPackage> + getNpmPackage(com.google.devtools.artifactregistry.v1.GetNpmPackageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNpmPackageMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists python packages.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse> + listPythonPackages( + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPythonPackagesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a python package.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devtools.artifactregistry.v1.PythonPackage> + getPythonPackage(com.google.devtools.artifactregistry.v1.GetPythonPackageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPythonPackageMethod(), getCallOptions()), request); + } + /** * * @@ -3188,35 +4073,72 @@ public com.google.common.util.concurrent.ListenableFuture + * Retrieves the VPCSC Config for the Project. + * + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devtools.artifactregistry.v1.VPCSCConfig> + getVPCSCConfig(com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetVPCSCConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the VPCSC Config for the Project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devtools.artifactregistry.v1.VPCSCConfig> + updateVPCSCConfig( + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateVPCSCConfigMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_DOCKER_IMAGES = 0; private static final int METHODID_GET_DOCKER_IMAGE = 1; - private static final int METHODID_IMPORT_APT_ARTIFACTS = 2; - private static final int METHODID_IMPORT_YUM_ARTIFACTS = 3; - private static final int METHODID_LIST_REPOSITORIES = 4; - private static final int METHODID_GET_REPOSITORY = 5; - private static final int METHODID_CREATE_REPOSITORY = 6; - private static final int METHODID_UPDATE_REPOSITORY = 7; - private static final int METHODID_DELETE_REPOSITORY = 8; - private static final int METHODID_LIST_PACKAGES = 9; - private static final int METHODID_GET_PACKAGE = 10; - private static final int METHODID_DELETE_PACKAGE = 11; - private static final int METHODID_LIST_VERSIONS = 12; - private static final int METHODID_GET_VERSION = 13; - private static final int METHODID_DELETE_VERSION = 14; - private static final int METHODID_LIST_FILES = 15; - private static final int METHODID_GET_FILE = 16; - private static final int METHODID_LIST_TAGS = 17; - private static final int METHODID_GET_TAG = 18; - private static final int METHODID_CREATE_TAG = 19; - private static final int METHODID_UPDATE_TAG = 20; - private static final int METHODID_DELETE_TAG = 21; - private static final int METHODID_SET_IAM_POLICY = 22; - private static final int METHODID_GET_IAM_POLICY = 23; - private static final int METHODID_TEST_IAM_PERMISSIONS = 24; - private static final int METHODID_GET_PROJECT_SETTINGS = 25; - private static final int METHODID_UPDATE_PROJECT_SETTINGS = 26; + private static final int METHODID_LIST_MAVEN_ARTIFACTS = 2; + private static final int METHODID_GET_MAVEN_ARTIFACT = 3; + private static final int METHODID_LIST_NPM_PACKAGES = 4; + private static final int METHODID_GET_NPM_PACKAGE = 5; + private static final int METHODID_LIST_PYTHON_PACKAGES = 6; + private static final int METHODID_GET_PYTHON_PACKAGE = 7; + private static final int METHODID_IMPORT_APT_ARTIFACTS = 8; + private static final int METHODID_IMPORT_YUM_ARTIFACTS = 9; + private static final int METHODID_LIST_REPOSITORIES = 10; + private static final int METHODID_GET_REPOSITORY = 11; + private static final int METHODID_CREATE_REPOSITORY = 12; + private static final int METHODID_UPDATE_REPOSITORY = 13; + private static final int METHODID_DELETE_REPOSITORY = 14; + private static final int METHODID_LIST_PACKAGES = 15; + private static final int METHODID_GET_PACKAGE = 16; + private static final int METHODID_DELETE_PACKAGE = 17; + private static final int METHODID_LIST_VERSIONS = 18; + private static final int METHODID_GET_VERSION = 19; + private static final int METHODID_DELETE_VERSION = 20; + private static final int METHODID_LIST_FILES = 21; + private static final int METHODID_GET_FILE = 22; + private static final int METHODID_LIST_TAGS = 23; + private static final int METHODID_GET_TAG = 24; + private static final int METHODID_CREATE_TAG = 25; + private static final int METHODID_UPDATE_TAG = 26; + private static final int METHODID_DELETE_TAG = 27; + private static final int METHODID_SET_IAM_POLICY = 28; + private static final int METHODID_GET_IAM_POLICY = 29; + private static final int METHODID_TEST_IAM_PERMISSIONS = 30; + private static final int METHODID_GET_PROJECT_SETTINGS = 31; + private static final int METHODID_UPDATE_PROJECT_SETTINGS = 32; + private static final int METHODID_GET_VPCSCCONFIG = 33; + private static final int METHODID_UPDATE_VPCSCCONFIG = 34; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3248,6 +4170,45 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_MAVEN_ARTIFACTS: + serviceImpl.listMavenArtifacts( + (com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse>) + responseObserver); + break; + case METHODID_GET_MAVEN_ARTIFACT: + serviceImpl.getMavenArtifact( + (com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_NPM_PACKAGES: + serviceImpl.listNpmPackages( + (com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse>) + responseObserver); + break; + case METHODID_GET_NPM_PACKAGE: + serviceImpl.getNpmPackage( + (com.google.devtools.artifactregistry.v1.GetNpmPackageRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PYTHON_PACKAGES: + serviceImpl.listPythonPackages( + (com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse>) + responseObserver); + break; + case METHODID_GET_PYTHON_PACKAGE: + serviceImpl.getPythonPackage( + (com.google.devtools.artifactregistry.v1.GetPythonPackageRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_IMPORT_APT_ARTIFACTS: serviceImpl.importAptArtifacts( (com.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest) request, @@ -3394,6 +4355,18 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_VPCSCCONFIG: + serviceImpl.getVPCSCConfig( + (com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_VPCSCCONFIG: + serviceImpl.updateVPCSCConfig( + (com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -3460,6 +4433,12 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .setSchemaDescriptor(new ArtifactRegistryFileDescriptorSupplier()) .addMethod(getListDockerImagesMethod()) .addMethod(getGetDockerImageMethod()) + .addMethod(getListMavenArtifactsMethod()) + .addMethod(getGetMavenArtifactMethod()) + .addMethod(getListNpmPackagesMethod()) + .addMethod(getGetNpmPackageMethod()) + .addMethod(getListPythonPackagesMethod()) + .addMethod(getGetPythonPackageMethod()) .addMethod(getImportAptArtifactsMethod()) .addMethod(getImportYumArtifactsMethod()) .addMethod(getListRepositoriesMethod()) @@ -3485,6 +4464,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getTestIamPermissionsMethod()) .addMethod(getGetProjectSettingsMethod()) .addMethod(getUpdateProjectSettingsMethod()) + .addMethod(getGetVPCSCConfigMethod()) + .addMethod(getUpdateVPCSCConfigMethod()) .build(); } } diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactProto.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactProto.java index 9fd5ca983707..7176d0701309 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactProto.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactProto.java @@ -43,6 +43,54 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_devtools_artifactregistry_v1_GetDockerImageRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_devtools_artifactregistry_v1_GetDockerImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_MavenArtifact_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_MavenArtifact_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_GetMavenArtifactRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_GetMavenArtifactRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_NpmPackage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_NpmPackage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_GetNpmPackageRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_GetNpmPackageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_PythonPackage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_PythonPackage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_GetPythonPackageRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_GetPythonPackageRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -56,30 +104,86 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tifact.proto\022#google.devtools.artifactre" + "gistry.v1\032\037google/api/field_behavior.pro" + "to\032\031google/api/resource.proto\032\037google/pr" - + "otobuf/timestamp.proto\"\342\002\n\013DockerImage\022\021" + + "otobuf/timestamp.proto\"\230\003\n\013DockerImage\022\021" + "\n\004name\030\001 \001(\tB\003\340A\002\022\020\n\003uri\030\002 \001(\tB\003\340A\002\022\014\n\004t" + "ags\030\003 \003(\t\022\030\n\020image_size_bytes\030\004 \001(\003\022/\n\013u" + "pload_time\030\005 \001(\0132\032.google.protobuf.Times" + "tamp\022\022\n\nmedia_type\030\006 \001(\t\022.\n\nbuild_time\030\007" - + " \001(\0132\032.google.protobuf.Timestamp:\220\001\352A\214\001\n" - + "+artifactregistry.googleapis.com/DockerI" - + "mage\022]projects/{project}/locations/{loca" - + "tion}/repositories/{repository}/dockerIm" - + "ages/{docker_image}\"U\n\027ListDockerImagesR" - + "equest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size" - + "\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"|\n\030ListDocker" - + "ImagesResponse\022G\n\rdocker_images\030\001 \003(\01320." - + "google.devtools.artifactregistry.v1.Dock" - + "erImage\022\027\n\017next_page_token\030\002 \001(\t\"Z\n\025GetD" - + "ockerImageRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n" - + "+artifactregistry.googleapis.com/DockerI" - + "mageB\373\001\n\'com.google.devtools.artifactreg" - + "istry.v1B\rArtifactProtoP\001ZSgoogle.golang" - + ".org/genproto/googleapis/devtools/artifa" - + "ctregistry/v1;artifactregistry\252\002 Google." - + "Cloud.ArtifactRegistry.V1\312\002 Google\\Cloud" - + "\\ArtifactRegistry\\V1\352\002#Google::Cloud::Ar" - + "tifactRegistry::V1b\006proto3" + + " \001(\0132\032.google.protobuf.Timestamp\0224\n\013upda" + + "te_time\030\010 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003:\220\001\352A\214\001\n+artifactregistry.googleap" + + "is.com/DockerImage\022]projects/{project}/l" + + "ocations/{location}/repositories/{reposi" + + "tory}/dockerImages/{docker_image}\"g\n\027Lis" + + "tDockerImagesRequest\022\023\n\006parent\030\001 \001(\tB\003\340A" + + "\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" + + "\022\020\n\010order_by\030\004 \001(\t\"|\n\030ListDockerImagesRe" + + "sponse\022G\n\rdocker_images\030\001 \003(\01320.google.d" + + "evtools.artifactregistry.v1.DockerImage\022" + + "\027\n\017next_page_token\030\002 \001(\t\"Z\n\025GetDockerIma" + + "geRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+artifac" + + "tregistry.googleapis.com/DockerImage\"\365\002\n" + + "\rMavenArtifact\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\024\n\007pom" + + "_uri\030\002 \001(\tB\003\340A\002\022\020\n\010group_id\030\003 \001(\t\022\023\n\013art" + + "ifact_id\030\004 \001(\t\022\017\n\007version\030\005 \001(\t\0224\n\013creat" + + "e_time\030\006 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\0224\n\013update_time\030\007 \001(\0132\032.google.prot" + + "obuf.TimestampB\003\340A\003:\226\001\352A\222\001\n-artifactregi" + + "stry.googleapis.com/MavenArtifact\022aproje" + + "cts/{project}/locations/{location}/repos" + + "itories/{repository}/mavenArtifacts/{mav" + + "en_artifact}\"\211\001\n\031ListMavenArtifactsReque" + + "st\022E\n\006parent\030\001 \001(\tB5\340A\002\372A/\022-artifactregi" + + "stry.googleapis.com/MavenArtifact\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\202\001\n\032Lis" + + "tMavenArtifactsResponse\022K\n\017maven_artifac" + + "ts\030\001 \003(\01322.google.devtools.artifactregis" + + "try.v1.MavenArtifact\022\027\n\017next_page_token\030" + + "\002 \001(\t\"^\n\027GetMavenArtifactRequest\022C\n\004name" + + "\030\001 \001(\tB5\340A\002\372A/\n-artifactregistry.googlea" + + "pis.com/MavenArtifact\"\320\002\n\nNpmPackage\022\021\n\004" + + "name\030\001 \001(\tB\003\340A\002\022\024\n\014package_name\030\003 \001(\t\022\017\n" + + "\007version\030\004 \001(\t\022\014\n\004tags\030\005 \003(\t\0224\n\013create_t" + + "ime\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\0224\n\013update_time\030\007 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003:\215\001\352A\211\001\n*artifactregistr" + + "y.googleapis.com/NpmPackage\022[projects/{p" + + "roject}/locations/{location}/repositorie" + + "s/{repository}/npmPackages/{npm_package}" + + "\"\203\001\n\026ListNpmPackagesRequest\022B\n\006parent\030\001 " + + "\001(\tB2\340A\002\372A,\022*artifactregistry.googleapis" + + ".com/NpmPackage\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa" + + "ge_token\030\003 \001(\t\"y\n\027ListNpmPackagesRespons" + + "e\022E\n\014npm_packages\030\001 \003(\0132/.google.devtool" + + "s.artifactregistry.v1.NpmPackage\022\027\n\017next" + + "_page_token\030\002 \001(\t\"X\n\024GetNpmPackageReques" + + "t\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*artifactregistr" + + "y.googleapis.com/NpmPackage\"\340\002\n\rPythonPa" + + "ckage\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\020\n\003uri\030\002 \001(\tB\003\340" + + "A\002\022\024\n\014package_name\030\003 \001(\t\022\017\n\007version\030\004 \001(" + + "\t\0224\n\013create_time\030\006 \001(\0132\032.google.protobuf" + + ".TimestampB\003\340A\003\0224\n\013update_time\030\007 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\003\340A\003:\226\001\352A\222\001\n-ar" + + "tifactregistry.googleapis.com/PythonPack" + + "age\022aprojects/{project}/locations/{locat" + + "ion}/repositories/{repository}/pythonPac" + + "kages/{python_package}\"\211\001\n\031ListPythonPac" + + "kagesRequest\022E\n\006parent\030\001 \001(\tB5\340A\002\372A/\022-ar" + + "tifactregistry.googleapis.com/PythonPack" + + "age\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" + + "(\t\"\202\001\n\032ListPythonPackagesResponse\022K\n\017pyt" + + "hon_packages\030\001 \003(\01322.google.devtools.art" + + "ifactregistry.v1.PythonPackage\022\027\n\017next_p" + + "age_token\030\002 \001(\t\"^\n\027GetPythonPackageReque" + + "st\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-artifactregist" + + "ry.googleapis.com/PythonPackageB\373\001\n\'com." + + "google.devtools.artifactregistry.v1B\rArt" + + "ifactProtoP\001ZSgoogle.golang.org/genproto" + + "/googleapis/devtools/artifactregistry/v1" + + ";artifactregistry\252\002 Google.Cloud.Artifac" + + "tRegistry.V1\312\002 Google\\Cloud\\ArtifactRegi" + + "stry\\V1\352\002#Google::Cloud::ArtifactRegistr" + + "y::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -95,7 +199,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_DockerImage_descriptor, new java.lang.String[] { - "Name", "Uri", "Tags", "ImageSizeBytes", "UploadTime", "MediaType", "BuildTime", + "Name", + "Uri", + "Tags", + "ImageSizeBytes", + "UploadTime", + "MediaType", + "BuildTime", + "UpdateTime", }); internal_static_google_devtools_artifactregistry_v1_ListDockerImagesRequest_descriptor = getDescriptor().getMessageTypes().get(1); @@ -103,7 +214,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_ListDockerImagesRequest_descriptor, new java.lang.String[] { - "Parent", "PageSize", "PageToken", + "Parent", "PageSize", "PageToken", "OrderBy", }); internal_static_google_devtools_artifactregistry_v1_ListDockerImagesResponse_descriptor = getDescriptor().getMessageTypes().get(2); @@ -121,6 +232,102 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); + internal_static_google_devtools_artifactregistry_v1_MavenArtifact_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_devtools_artifactregistry_v1_MavenArtifact_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_MavenArtifact_descriptor, + new java.lang.String[] { + "Name", "PomUri", "GroupId", "ArtifactId", "Version", "CreateTime", "UpdateTime", + }); + internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsResponse_descriptor, + new java.lang.String[] { + "MavenArtifacts", "NextPageToken", + }); + internal_static_google_devtools_artifactregistry_v1_GetMavenArtifactRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_devtools_artifactregistry_v1_GetMavenArtifactRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_GetMavenArtifactRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_devtools_artifactregistry_v1_NpmPackage_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_devtools_artifactregistry_v1_NpmPackage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_NpmPackage_descriptor, + new java.lang.String[] { + "Name", "PackageName", "Version", "Tags", "CreateTime", "UpdateTime", + }); + internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesResponse_descriptor, + new java.lang.String[] { + "NpmPackages", "NextPageToken", + }); + internal_static_google_devtools_artifactregistry_v1_GetNpmPackageRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_devtools_artifactregistry_v1_GetNpmPackageRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_GetNpmPackageRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_devtools_artifactregistry_v1_PythonPackage_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_devtools_artifactregistry_v1_PythonPackage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_PythonPackage_descriptor, + new java.lang.String[] { + "Name", "Uri", "PackageName", "Version", "CreateTime", "UpdateTime", + }); + internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesResponse_descriptor, + new java.lang.String[] { + "PythonPackages", "NextPageToken", + }); + internal_static_google_devtools_artifactregistry_v1_GetPythonPackageRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_devtools_artifactregistry_v1_GetPythonPackageRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_GetPythonPackageRequest_descriptor, + new java.lang.String[] { + "Name", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsMetadata.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsMetadata.java new file mode 100644 index 000000000000..625a65b2905f --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsMetadata.java @@ -0,0 +1,736 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/version.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * The metadata of an LRO from deleting multiple versions.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} + */ +public final class BatchDeleteVersionsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata) + BatchDeleteVersionsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeleteVersionsMetadata.newBuilder() to construct. + private BatchDeleteVersionsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeleteVersionsMetadata() { + failedVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeleteVersionsMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.VersionProto + .internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.VersionProto + .internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.class, + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.Builder.class); + } + + public static final int FAILED_VERSIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList failedVersions_; + /** + * + * + *
+   * The versions the operation failed to delete.
+   * 
+ * + * repeated string failed_versions = 2; + * + * @return A list containing the failedVersions. + */ + public com.google.protobuf.ProtocolStringList getFailedVersionsList() { + return failedVersions_; + } + /** + * + * + *
+   * The versions the operation failed to delete.
+   * 
+ * + * repeated string failed_versions = 2; + * + * @return The count of failedVersions. + */ + public int getFailedVersionsCount() { + return failedVersions_.size(); + } + /** + * + * + *
+   * The versions the operation failed to delete.
+   * 
+ * + * repeated string failed_versions = 2; + * + * @param index The index of the element to return. + * @return The failedVersions at the given index. + */ + public java.lang.String getFailedVersions(int index) { + return failedVersions_.get(index); + } + /** + * + * + *
+   * The versions the operation failed to delete.
+   * 
+ * + * repeated string failed_versions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the failedVersions at the given index. + */ + public com.google.protobuf.ByteString getFailedVersionsBytes(int index) { + return failedVersions_.getByteString(index); + } + + 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 < failedVersions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, failedVersions_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < failedVersions_.size(); i++) { + dataSize += computeStringSizeNoTag(failedVersions_.getRaw(i)); + } + size += dataSize; + size += 1 * getFailedVersionsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata other = + (com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata) obj; + + if (!getFailedVersionsList().equals(other.getFailedVersionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFailedVersionsCount() > 0) { + hash = (37 * hash) + FAILED_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getFailedVersionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata 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.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata 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.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + 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.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata 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.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The metadata of an LRO from deleting multiple versions.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata) + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.VersionProto + .internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.VersionProto + .internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.class, + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + failedVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.VersionProto + .internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata build() { + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata buildPartial() { + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata result = + new com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata result) { + if (((bitField0_ & 0x00000001) != 0)) { + failedVersions_ = failedVersions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.failedVersions_ = failedVersions_; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata result) { + int from_bitField0_ = bitField0_; + } + + @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.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata other) { + if (other + == com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + .getDefaultInstance()) return this; + if (!other.failedVersions_.isEmpty()) { + if (failedVersions_.isEmpty()) { + failedVersions_ = other.failedVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFailedVersionsIsMutable(); + failedVersions_.addAll(other.failedVersions_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFailedVersionsIsMutable(); + failedVersions_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList failedVersions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureFailedVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + failedVersions_ = new com.google.protobuf.LazyStringArrayList(failedVersions_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The versions the operation failed to delete.
+     * 
+ * + * repeated string failed_versions = 2; + * + * @return A list containing the failedVersions. + */ + public com.google.protobuf.ProtocolStringList getFailedVersionsList() { + return failedVersions_.getUnmodifiableView(); + } + /** + * + * + *
+     * The versions the operation failed to delete.
+     * 
+ * + * repeated string failed_versions = 2; + * + * @return The count of failedVersions. + */ + public int getFailedVersionsCount() { + return failedVersions_.size(); + } + /** + * + * + *
+     * The versions the operation failed to delete.
+     * 
+ * + * repeated string failed_versions = 2; + * + * @param index The index of the element to return. + * @return The failedVersions at the given index. + */ + public java.lang.String getFailedVersions(int index) { + return failedVersions_.get(index); + } + /** + * + * + *
+     * The versions the operation failed to delete.
+     * 
+ * + * repeated string failed_versions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the failedVersions at the given index. + */ + public com.google.protobuf.ByteString getFailedVersionsBytes(int index) { + return failedVersions_.getByteString(index); + } + /** + * + * + *
+     * The versions the operation failed to delete.
+     * 
+ * + * repeated string failed_versions = 2; + * + * @param index The index to set the value at. + * @param value The failedVersions to set. + * @return This builder for chaining. + */ + public Builder setFailedVersions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedVersionsIsMutable(); + failedVersions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The versions the operation failed to delete.
+     * 
+ * + * repeated string failed_versions = 2; + * + * @param value The failedVersions to add. + * @return This builder for chaining. + */ + public Builder addFailedVersions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedVersionsIsMutable(); + failedVersions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The versions the operation failed to delete.
+     * 
+ * + * repeated string failed_versions = 2; + * + * @param values The failedVersions to add. + * @return This builder for chaining. + */ + public Builder addAllFailedVersions(java.lang.Iterable values) { + ensureFailedVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, failedVersions_); + onChanged(); + return this; + } + /** + * + * + *
+     * The versions the operation failed to delete.
+     * 
+ * + * repeated string failed_versions = 2; + * + * @return This builder for chaining. + */ + public Builder clearFailedVersions() { + failedVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The versions the operation failed to delete.
+     * 
+ * + * repeated string failed_versions = 2; + * + * @param value The bytes of the failedVersions to add. + * @return This builder for chaining. + */ + public Builder addFailedVersionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFailedVersionsIsMutable(); + failedVersions_.add(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.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata) + private static final com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata(); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteVersionsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsMetadataOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsMetadataOrBuilder.java new file mode 100644 index 000000000000..5f98378b0f0e --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsMetadataOrBuilder.java @@ -0,0 +1,76 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/version.proto + +package com.google.devtools.artifactregistry.v1; + +public interface BatchDeleteVersionsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The versions the operation failed to delete.
+   * 
+ * + * repeated string failed_versions = 2; + * + * @return A list containing the failedVersions. + */ + java.util.List getFailedVersionsList(); + /** + * + * + *
+   * The versions the operation failed to delete.
+   * 
+ * + * repeated string failed_versions = 2; + * + * @return The count of failedVersions. + */ + int getFailedVersionsCount(); + /** + * + * + *
+   * The versions the operation failed to delete.
+   * 
+ * + * repeated string failed_versions = 2; + * + * @param index The index of the element to return. + * @return The failedVersions at the given index. + */ + java.lang.String getFailedVersions(int index); + /** + * + * + *
+   * The versions the operation failed to delete.
+   * 
+ * + * repeated string failed_versions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the failedVersions at the given index. + */ + com.google.protobuf.ByteString getFailedVersionsBytes(int index); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DeletePackageRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DeletePackageRequest.java index 4628ab95c955..310c7f7f7623 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DeletePackageRequest.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DeletePackageRequest.java @@ -78,7 +78,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Required. The name of the package to delete. * * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -101,7 +103,9 @@ public java.lang.String getName() { * Required. The name of the package to delete. * * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -472,7 +476,9 @@ public Builder mergeFrom( * Required. The name of the package to delete. * * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -494,7 +500,9 @@ public java.lang.String getName() { * Required. The name of the package to delete. * * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -516,7 +524,9 @@ public com.google.protobuf.ByteString getNameBytes() { * Required. The name of the package to delete. * * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -537,7 +547,9 @@ public Builder setName(java.lang.String value) { * Required. The name of the package to delete. * * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -554,7 +566,9 @@ public Builder clearName() { * Required. The name of the package to delete. * * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DeletePackageRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DeletePackageRequestOrBuilder.java index e347b7771576..45cb83be83ae 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DeletePackageRequestOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DeletePackageRequestOrBuilder.java @@ -30,7 +30,9 @@ public interface DeletePackageRequestOrBuilder * Required. The name of the package to delete. * * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -42,7 +44,9 @@ public interface DeletePackageRequestOrBuilder * Required. The name of the package to delete. * * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DockerImage.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DockerImage.java index 8726bf7a59ea..3832505bc0a3 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DockerImage.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DockerImage.java @@ -83,8 +83,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. registry_location, project_id, repository_name and image id forms a unique
-   * image
+   * Required. registry_location, project_id, repository_name and image id forms
+   * a unique image
    * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`.
    * For example,
    * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
@@ -115,8 +115,8 @@ public java.lang.String getName() {
    *
    *
    * 
-   * Required. registry_location, project_id, repository_name and image id forms a unique
-   * image
+   * Required. registry_location, project_id, repository_name and image id forms
+   * a unique image
    * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`.
    * For example,
    * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
@@ -443,6 +443,55 @@ public com.google.protobuf.TimestampOrBuilder getBuildTimeOrBuilder() {
     return buildTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildTime_;
   }
 
+  public static final int UPDATE_TIME_FIELD_NUMBER = 8;
+  private com.google.protobuf.Timestamp updateTime_;
+  /**
+   *
+   *
+   * 
+   * Output only. The time when the docker image was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time when the docker image was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time when the docker image was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -478,6 +527,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (buildTime_ != null) { output.writeMessage(7, getBuildTime()); } + if (updateTime_ != null) { + output.writeMessage(8, getUpdateTime()); + } getUnknownFields().writeTo(output); } @@ -513,6 +565,9 @@ public int getSerializedSize() { if (buildTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getBuildTime()); } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -542,6 +597,10 @@ public boolean equals(final java.lang.Object obj) { if (hasBuildTime()) { if (!getBuildTime().equals(other.getBuildTime())) return false; } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -573,6 +632,10 @@ public int hashCode() { hash = (37 * hash) + BUILD_TIME_FIELD_NUMBER; hash = (53 * hash) + getBuildTime().hashCode(); } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -733,6 +796,11 @@ public Builder clear() { buildTimeBuilder_.dispose(); buildTimeBuilder_ = null; } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } return this; } @@ -797,6 +865,9 @@ private void buildPartial0(com.google.devtools.artifactregistry.v1.DockerImage r if (((from_bitField0_ & 0x00000040) != 0)) { result.buildTime_ = buildTimeBuilder_ == null ? buildTime_ : buildTimeBuilder_.build(); } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } } @java.lang.Override @@ -879,6 +950,9 @@ public Builder mergeFrom(com.google.devtools.artifactregistry.v1.DockerImage oth if (other.hasBuildTime()) { mergeBuildTime(other.getBuildTime()); } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -948,6 +1022,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 58 + case 66: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -972,8 +1052,8 @@ public Builder mergeFrom( * * *
-     * Required. registry_location, project_id, repository_name and image id forms a unique
-     * image
+     * Required. registry_location, project_id, repository_name and image id forms
+     * a unique image
      * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`.
      * For example,
      * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
@@ -1003,8 +1083,8 @@ public java.lang.String getName() {
      *
      *
      * 
-     * Required. registry_location, project_id, repository_name and image id forms a unique
-     * image
+     * Required. registry_location, project_id, repository_name and image id forms
+     * a unique image
      * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`.
      * For example,
      * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
@@ -1034,8 +1114,8 @@ public com.google.protobuf.ByteString getNameBytes() {
      *
      *
      * 
-     * Required. registry_location, project_id, repository_name and image id forms a unique
-     * image
+     * Required. registry_location, project_id, repository_name and image id forms
+     * a unique image
      * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`.
      * For example,
      * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
@@ -1064,8 +1144,8 @@ public Builder setName(java.lang.String value) {
      *
      *
      * 
-     * Required. registry_location, project_id, repository_name and image id forms a unique
-     * image
+     * Required. registry_location, project_id, repository_name and image id forms
+     * a unique image
      * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`.
      * For example,
      * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
@@ -1090,8 +1170,8 @@ public Builder clearName() {
      *
      *
      * 
-     * Required. registry_location, project_id, repository_name and image id forms a unique
-     * image
+     * Required. registry_location, project_id, repository_name and image id forms
+     * a unique image
      * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`.
      * For example,
      * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
@@ -1980,6 +2060,207 @@ public com.google.protobuf.TimestampOrBuilder getBuildTimeOrBuilder() {
       return buildTimeBuilder_;
     }
 
+    private com.google.protobuf.Timestamp updateTime_;
+    private com.google.protobuf.SingleFieldBuilderV3<
+            com.google.protobuf.Timestamp,
+            com.google.protobuf.Timestamp.Builder,
+            com.google.protobuf.TimestampOrBuilder>
+        updateTimeBuilder_;
+    /**
+     *
+     *
+     * 
+     * Output only. The time when the docker image was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. The time when the docker image was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time when the docker image was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the docker image was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the docker image was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the docker image was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the docker image was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the docker image was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time when the docker image was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.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_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DockerImageOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DockerImageOrBuilder.java index 23262b8cdb05..a9db5095fd69 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DockerImageOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/DockerImageOrBuilder.java @@ -27,8 +27,8 @@ public interface DockerImageOrBuilder * * *
-   * Required. registry_location, project_id, repository_name and image id forms a unique
-   * image
+   * Required. registry_location, project_id, repository_name and image id forms
+   * a unique image
    * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`.
    * For example,
    * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
@@ -48,8 +48,8 @@ public interface DockerImageOrBuilder
    *
    *
    * 
-   * Required. registry_location, project_id, repository_name and image id forms a unique
-   * image
+   * Required. registry_location, project_id, repository_name and image id forms
+   * a unique image
    * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`.
    * For example,
    * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
@@ -273,4 +273,42 @@ public interface DockerImageOrBuilder
    * .google.protobuf.Timestamp build_time = 7;
    */
   com.google.protobuf.TimestampOrBuilder getBuildTimeOrBuilder();
+
+  /**
+   *
+   *
+   * 
+   * Output only. The time when the docker image was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time when the docker image was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time when the docker image was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); } diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/File.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/File.java index cb085b4d7fed..b1f042a0df3b 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/File.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/File.java @@ -219,10 +219,11 @@ public com.google.devtools.artifactregistry.v1.HashOrBuilder getHashesOrBuilder( * * *
-   * The time when the File was created.
+   * Output only. The time when the File was created.
    * 
* - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ @@ -234,10 +235,11 @@ public boolean hasCreateTime() { * * *
-   * The time when the File was created.
+   * Output only. The time when the File was created.
    * 
* - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ @@ -249,10 +251,11 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
-   * The time when the File was created.
+   * Output only. The time when the File was created.
    * 
* - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { @@ -265,10 +268,11 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-   * The time when the File was last updated.
+   * Output only. The time when the File was last updated.
    * 
* - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ @@ -280,10 +284,11 @@ public boolean hasUpdateTime() { * * *
-   * The time when the File was last updated.
+   * Output only. The time when the File was last updated.
    * 
* - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ @@ -295,10 +300,11 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
-   * The time when the File was last updated.
+   * Output only. The time when the File was last updated.
    * 
* - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { @@ -356,6 +362,58 @@ public com.google.protobuf.ByteString getOwnerBytes() { } } + public static final int FETCH_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp fetchTime_; + /** + * + * + *
+   * Output only. The time when the last attempt to refresh the file's data was
+   * made. Only set when the repository is remote.
+   * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the fetchTime field is set. + */ + @java.lang.Override + public boolean hasFetchTime() { + return fetchTime_ != null; + } + /** + * + * + *
+   * Output only. The time when the last attempt to refresh the file's data was
+   * made. Only set when the repository is remote.
+   * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fetchTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getFetchTime() { + return fetchTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : fetchTime_; + } + /** + * + * + *
+   * Output only. The time when the last attempt to refresh the file's data was
+   * made. Only set when the repository is remote.
+   * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getFetchTimeOrBuilder() { + return fetchTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : fetchTime_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -388,6 +446,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, owner_); } + if (fetchTime_ != null) { + output.writeMessage(8, getFetchTime()); + } getUnknownFields().writeTo(output); } @@ -415,6 +476,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, owner_); } + if (fetchTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getFetchTime()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -443,6 +507,10 @@ public boolean equals(final java.lang.Object obj) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } if (!getOwner().equals(other.getOwner())) return false; + if (hasFetchTime() != other.hasFetchTime()) return false; + if (hasFetchTime()) { + if (!getFetchTime().equals(other.getFetchTime())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -472,6 +540,10 @@ public int hashCode() { } hash = (37 * hash) + OWNER_FIELD_NUMBER; hash = (53 * hash) + getOwner().hashCode(); + if (hasFetchTime()) { + hash = (37 * hash) + FETCH_TIME_FIELD_NUMBER; + hash = (53 * hash) + getFetchTime().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -631,6 +703,11 @@ public Builder clear() { updateTimeBuilder_ = null; } owner_ = ""; + fetchTime_ = null; + if (fetchTimeBuilder_ != null) { + fetchTimeBuilder_.dispose(); + fetchTimeBuilder_ = null; + } return this; } @@ -695,6 +772,9 @@ private void buildPartial0(com.google.devtools.artifactregistry.v1.File result) if (((from_bitField0_ & 0x00000020) != 0)) { result.owner_ = owner_; } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.fetchTime_ = fetchTimeBuilder_ == null ? fetchTime_ : fetchTimeBuilder_.build(); + } } @java.lang.Override @@ -788,6 +868,9 @@ public Builder mergeFrom(com.google.devtools.artifactregistry.v1.File other) { bitField0_ |= 0x00000020; onChanged(); } + if (other.hasFetchTime()) { + mergeFetchTime(other.getFetchTime()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -857,6 +940,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000020; break; } // case 58 + case 66: + { + input.readMessage(getFetchTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1404,10 +1493,12 @@ public com.google.devtools.artifactregistry.v1.Hash.Builder addHashesBuilder(int * * *
-     * The time when the File was created.
+     * Output only. The time when the File was created.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ @@ -1418,10 +1509,12 @@ public boolean hasCreateTime() { * * *
-     * The time when the File was created.
+     * Output only. The time when the File was created.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ @@ -1438,10 +1531,12 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
-     * The time when the File was created.
+     * Output only. The time when the File was created.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { @@ -1460,10 +1555,12 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * The time when the File was created.
+     * Output only. The time when the File was created.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { @@ -1479,10 +1576,12 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * The time when the File was created.
+     * Output only. The time when the File was created.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { @@ -1504,10 +1603,12 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * The time when the File was created.
+     * Output only. The time when the File was created.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder clearCreateTime() { bitField0_ = (bitField0_ & ~0x00000008); @@ -1523,10 +1624,12 @@ public Builder clearCreateTime() { * * *
-     * The time when the File was created.
+     * Output only. The time when the File was created.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000008; @@ -1537,10 +1640,12 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { * * *
-     * The time when the File was created.
+     * Output only. The time when the File was created.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { @@ -1555,10 +1660,12 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-     * The time when the File was created.
+     * Output only. The time when the File was created.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -1587,10 +1694,12 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-     * The time when the File was last updated.
+     * Output only. The time when the File was last updated.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ @@ -1601,10 +1710,12 @@ public boolean hasUpdateTime() { * * *
-     * The time when the File was last updated.
+     * Output only. The time when the File was last updated.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ @@ -1621,10 +1732,12 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
-     * The time when the File was last updated.
+     * Output only. The time when the File was last updated.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { @@ -1643,10 +1756,12 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * The time when the File was last updated.
+     * Output only. The time when the File was last updated.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (updateTimeBuilder_ == null) { @@ -1662,10 +1777,12 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * The time when the File was last updated.
+     * Output only. The time when the File was last updated.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { @@ -1687,10 +1804,12 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * The time when the File was last updated.
+     * Output only. The time when the File was last updated.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder clearUpdateTime() { bitField0_ = (bitField0_ & ~0x00000010); @@ -1706,10 +1825,12 @@ public Builder clearUpdateTime() { * * *
-     * The time when the File was last updated.
+     * Output only. The time when the File was last updated.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { bitField0_ |= 0x00000010; @@ -1720,10 +1841,12 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { * * *
-     * The time when the File was last updated.
+     * Output only. The time when the File was last updated.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if (updateTimeBuilder_ != null) { @@ -1738,10 +1861,12 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-     * The time when the File was last updated.
+     * Output only. The time when the File was last updated.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -1866,6 +1991,203 @@ public Builder setOwnerBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.Timestamp fetchTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + fetchTimeBuilder_; + /** + * + * + *
+     * Output only. The time when the last attempt to refresh the file's data was
+     * made. Only set when the repository is remote.
+     * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the fetchTime field is set. + */ + public boolean hasFetchTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. The time when the last attempt to refresh the file's data was
+     * made. Only set when the repository is remote.
+     * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fetchTime. + */ + public com.google.protobuf.Timestamp getFetchTime() { + if (fetchTimeBuilder_ == null) { + return fetchTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : fetchTime_; + } else { + return fetchTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time when the last attempt to refresh the file's data was
+     * made. Only set when the repository is remote.
+     * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFetchTime(com.google.protobuf.Timestamp value) { + if (fetchTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fetchTime_ = value; + } else { + fetchTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the last attempt to refresh the file's data was
+     * made. Only set when the repository is remote.
+     * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFetchTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (fetchTimeBuilder_ == null) { + fetchTime_ = builderForValue.build(); + } else { + fetchTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the last attempt to refresh the file's data was
+     * made. Only set when the repository is remote.
+     * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeFetchTime(com.google.protobuf.Timestamp value) { + if (fetchTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && fetchTime_ != null + && fetchTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getFetchTimeBuilder().mergeFrom(value); + } else { + fetchTime_ = value; + } + } else { + fetchTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the last attempt to refresh the file's data was
+     * made. Only set when the repository is remote.
+     * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearFetchTime() { + bitField0_ = (bitField0_ & ~0x00000040); + fetchTime_ = null; + if (fetchTimeBuilder_ != null) { + fetchTimeBuilder_.dispose(); + fetchTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the last attempt to refresh the file's data was
+     * made. Only set when the repository is remote.
+     * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getFetchTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getFetchTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the last attempt to refresh the file's data was
+     * made. Only set when the repository is remote.
+     * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getFetchTimeOrBuilder() { + if (fetchTimeBuilder_ != null) { + return fetchTimeBuilder_.getMessageOrBuilder(); + } else { + return fetchTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : fetchTime_; + } + } + /** + * + * + *
+     * Output only. The time when the last attempt to refresh the file's data was
+     * made. Only set when the repository is remote.
+     * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getFetchTimeFieldBuilder() { + if (fetchTimeBuilder_ == null) { + fetchTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getFetchTime(), getParentForChildren(), isClean()); + fetchTime_ = null; + } + return fetchTimeBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileName.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileName.java new file mode 100644 index 000000000000..b309eb4ed44a --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileName.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.devtools.artifactregistry.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 FileName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_REPOSITORY_FILE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/repositories/{repository}/files/{file}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String repository; + private final String file; + + @Deprecated + protected FileName() { + project = null; + location = null; + repository = null; + file = null; + } + + private FileName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + repository = Preconditions.checkNotNull(builder.getRepository()); + file = Preconditions.checkNotNull(builder.getFile()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getFile() { + return file; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FileName of(String project, String location, String repository, String file) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setFile(file) + .build(); + } + + public static String format(String project, String location, String repository, String file) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setFile(file) + .build() + .toString(); + } + + public static FileName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_REPOSITORY_FILE.validatedMatch( + formattedString, "FileName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("repository"), + matchMap.get("file")); + } + + 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 (FileName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_REPOSITORY_FILE.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 (repository != null) { + fieldMapBuilder.put("repository", repository); + } + if (file != null) { + fieldMapBuilder.put("file", file); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_REPOSITORY_FILE.instantiate( + "project", project, "location", location, "repository", repository, "file", file); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + FileName that = ((FileName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.repository, that.repository) + && Objects.equals(this.file, that.file); + } + 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(repository); + h *= 1000003; + h ^= Objects.hashCode(file); + return h; + } + + /** Builder for projects/{project}/locations/{location}/repositories/{repository}/files/{file}. */ + public static class Builder { + private String project; + private String location; + private String repository; + private String file; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getFile() { + return file; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRepository(String repository) { + this.repository = repository; + return this; + } + + public Builder setFile(String file) { + this.file = file; + return this; + } + + private Builder(FileName fileName) { + this.project = fileName.project; + this.location = fileName.location; + this.repository = fileName.repository; + this.file = fileName.file; + } + + public FileName build() { + return new FileName(this); + } + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileOrBuilder.java index 1fcb148d3f93..311dfd8434ad 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileOrBuilder.java @@ -121,10 +121,11 @@ public interface FileOrBuilder * * *
-   * The time when the File was created.
+   * Output only. The time when the File was created.
    * 
* - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ @@ -133,10 +134,11 @@ public interface FileOrBuilder * * *
-   * The time when the File was created.
+   * Output only. The time when the File was created.
    * 
* - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ @@ -145,10 +147,11 @@ public interface FileOrBuilder * * *
-   * The time when the File was created.
+   * Output only. The time when the File was created.
    * 
* - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); @@ -156,10 +159,11 @@ public interface FileOrBuilder * * *
-   * The time when the File was last updated.
+   * Output only. The time when the File was last updated.
    * 
* - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ @@ -168,10 +172,11 @@ public interface FileOrBuilder * * *
-   * The time when the File was last updated.
+   * Output only. The time when the File was last updated.
    * 
* - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ @@ -180,10 +185,11 @@ public interface FileOrBuilder * * *
-   * The time when the File was last updated.
+   * Output only. The time when the File was last updated.
    * 
* - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); @@ -211,4 +217,45 @@ public interface FileOrBuilder * @return The bytes for owner. */ com.google.protobuf.ByteString getOwnerBytes(); + + /** + * + * + *
+   * Output only. The time when the last attempt to refresh the file's data was
+   * made. Only set when the repository is remote.
+   * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the fetchTime field is set. + */ + boolean hasFetchTime(); + /** + * + * + *
+   * Output only. The time when the last attempt to refresh the file's data was
+   * made. Only set when the repository is remote.
+   * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fetchTime. + */ + com.google.protobuf.Timestamp getFetchTime(); + /** + * + * + *
+   * Output only. The time when the last attempt to refresh the file's data was
+   * made. Only set when the repository is remote.
+   * 
+ * + * .google.protobuf.Timestamp fetch_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getFetchTimeOrBuilder(); } diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileProto.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileProto.java index 0a01aeb9750f..255fe1241f39 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileProto.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/FileProto.java @@ -58,38 +58,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n.google/devtools/artifactregistry/v1/fi" + "le.proto\022#google.devtools.artifactregist" - + "ry.v1\032\031google/api/resource.proto\032\037google" - + "/protobuf/timestamp.proto\"\223\001\n\004Hash\022@\n\004ty" - + "pe\030\001 \001(\01622.google.devtools.artifactregis" - + "try.v1.Hash.HashType\022\r\n\005value\030\002 \001(\014\":\n\010H" - + "ashType\022\031\n\025HASH_TYPE_UNSPECIFIED\020\000\022\n\n\006SH" - + "A256\020\001\022\007\n\003MD5\020\002\"\317\002\n\004File\022\014\n\004name\030\001 \001(\t\022\022" - + "\n\nsize_bytes\030\003 \001(\003\0229\n\006hashes\030\004 \003(\0132).goo" - + "gle.devtools.artifactregistry.v1.Hash\022/\n" - + "\013create_time\030\005 \001(\0132\032.google.protobuf.Tim" - + "estamp\022/\n\013update_time\030\006 \001(\0132\032.google.pro" - + "tobuf.Timestamp\022\r\n\005owner\030\007 \001(\t:y\352Av\n$art" - + "ifactregistry.googleapis.com/File\022Nproje" - + "cts/{project}/locations/{location}/repos" - + "itories/{repository}/files/{file}\"k\n\020Lis" - + "tFilesRequest\022\016\n\006parent\030\001 \001(\t\022\016\n\006filter\030" - + "\004 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" - + " \001(\t\022\020\n\010order_by\030\005 \001(\t\"f\n\021ListFilesRespo" - + "nse\0228\n\005files\030\001 \003(\0132).google.devtools.art" - + "ifactregistry.v1.File\022\027\n\017next_page_token" - + "\030\002 \001(\t\"\036\n\016GetFileRequest\022\014\n\004name\030\001 \001(\tB\367" - + "\001\n\'com.google.devtools.artifactregistry." - + "v1B\tFileProtoP\001ZSgoogle.golang.org/genpr" - + "oto/googleapis/devtools/artifactregistry" - + "/v1;artifactregistry\252\002 Google.Cloud.Arti" - + "factRegistry.V1\312\002 Google\\Cloud\\ArtifactR" - + "egistry\\V1\352\002#Google::Cloud::ArtifactRegi" - + "stry::V1b\006proto3" + + "ry.v1\032\037google/api/field_behavior.proto\032\031" + + "google/api/resource.proto\032\037google/protob" + + "uf/timestamp.proto\"\223\001\n\004Hash\022@\n\004type\030\001 \001(" + + "\01622.google.devtools.artifactregistry.v1." + + "Hash.HashType\022\r\n\005value\030\002 \001(\014\":\n\010HashType" + + "\022\031\n\025HASH_TYPE_UNSPECIFIED\020\000\022\n\n\006SHA256\020\001\022" + + "\007\n\003MD5\020\002\"\216\003\n\004File\022\014\n\004name\030\001 \001(\t\022\022\n\nsize_" + + "bytes\030\003 \001(\003\0229\n\006hashes\030\004 \003(\0132).google.dev" + + "tools.artifactregistry.v1.Hash\0224\n\013create" + + "_time\030\005 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\0224\n\013update_time\030\006 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\022\r\n\005owner\030\007 \001(\t\0223\n\nfet" + + "ch_time\030\010 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003:y\352Av\n$artifactregistry.googleapis" + + ".com/File\022Nprojects/{project}/locations/" + + "{location}/repositories/{repository}/fil" + + "es/{file}\"\231\001\n\020ListFilesRequest\022<\n\006parent" + + "\030\001 \001(\tB,\340A\002\372A&\022$artifactregistry.googlea" + + "pis.com/File\022\016\n\006filter\030\004 \001(\t\022\021\n\tpage_siz" + + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\020\n\010order_by\030" + + "\005 \001(\t\"f\n\021ListFilesResponse\0228\n\005files\030\001 \003(" + + "\0132).google.devtools.artifactregistry.v1." + + "File\022\027\n\017next_page_token\030\002 \001(\t\"L\n\016GetFile" + + "Request\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$artifactr" + + "egistry.googleapis.com/FileB\367\001\n\'com.goog" + + "le.devtools.artifactregistry.v1B\tFilePro" + + "toP\001ZSgoogle.golang.org/genproto/googlea" + + "pis/devtools/artifactregistry/v1;artifac" + + "tregistry\252\002 Google.Cloud.ArtifactRegistr" + + "y.V1\312\002 Google\\Cloud\\ArtifactRegistry\\V1\352" + + "\002#Google::Cloud::ArtifactRegistry::V1b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); @@ -107,7 +113,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_File_descriptor, new java.lang.String[] { - "Name", "SizeBytes", "Hashes", "CreateTime", "UpdateTime", "Owner", + "Name", "SizeBytes", "Hashes", "CreateTime", "UpdateTime", "Owner", "FetchTime", }); internal_static_google_devtools_artifactregistry_v1_ListFilesRequest_descriptor = getDescriptor().getMessageTypes().get(2); @@ -135,9 +141,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetFileRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetFileRequest.java index 48330406383c..9ede4467fe0b 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetFileRequest.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetFileRequest.java @@ -75,10 +75,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The name of the file to retrieve.
+   * Required. The name of the file to retrieve.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -98,10 +100,12 @@ public java.lang.String getName() { * * *
-   * The name of the file to retrieve.
+   * Required. The name of the file to retrieve.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -466,10 +470,12 @@ public Builder mergeFrom( * * *
-     * The name of the file to retrieve.
+     * Required. The name of the file to retrieve.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -488,10 +494,12 @@ public java.lang.String getName() { * * *
-     * The name of the file to retrieve.
+     * Required. The name of the file to retrieve.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -510,10 +518,12 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * The name of the file to retrieve.
+     * Required. The name of the file to retrieve.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -531,10 +541,12 @@ public Builder setName(java.lang.String value) { * * *
-     * The name of the file to retrieve.
+     * Required. The name of the file to retrieve.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -548,10 +560,12 @@ public Builder clearName() { * * *
-     * The name of the file to retrieve.
+     * Required. The name of the file to retrieve.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetFileRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetFileRequestOrBuilder.java index 0499ed5e0408..d2cbf5d59694 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetFileRequestOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetFileRequestOrBuilder.java @@ -27,10 +27,12 @@ public interface GetFileRequestOrBuilder * * *
-   * The name of the file to retrieve.
+   * Required. The name of the file to retrieve.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -39,10 +41,12 @@ public interface GetFileRequestOrBuilder * * *
-   * The name of the file to retrieve.
+   * Required. The name of the file to retrieve.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetMavenArtifactRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetMavenArtifactRequest.java new file mode 100644 index 000000000000..37cfc262fc55 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetMavenArtifactRequest.java @@ -0,0 +1,651 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * The request to get maven artifacts.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.GetMavenArtifactRequest} + */ +public final class GetMavenArtifactRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.GetMavenArtifactRequest) + GetMavenArtifactRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetMavenArtifactRequest.newBuilder() to construct. + private GetMavenArtifactRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetMavenArtifactRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetMavenArtifactRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetMavenArtifactRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetMavenArtifactRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest.class, + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the maven artifact.
+   * 
+ * + * + * 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 maven artifact.
+   * 
+ * + * + * 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_); + } + getUnknownFields().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 += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest other = + (com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest 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.devtools.artifactregistry.v1.GetMavenArtifactRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest 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.devtools.artifactregistry.v1.GetMavenArtifactRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest 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.devtools.artifactregistry.v1.GetMavenArtifactRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest 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.devtools.artifactregistry.v1.GetMavenArtifactRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request to get maven artifacts.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.GetMavenArtifactRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.GetMavenArtifactRequest) + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetMavenArtifactRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetMavenArtifactRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest.class, + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetMavenArtifactRequest_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest build() { + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest buildPartial() { + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest result = + new com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.devtools.artifactregistry.v1.GetMavenArtifactRequest) { + return mergeFrom((com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest other) { + if (other + == com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the maven artifact.
+     * 
+ * + * + * 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 maven artifact.
+     * 
+ * + * + * 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 maven artifact.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the maven artifact.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the maven artifact.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @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.devtools.artifactregistry.v1.GetMavenArtifactRequest) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.GetMavenArtifactRequest) + private static final com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest(); + } + + public static com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMavenArtifactRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetMavenArtifactRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetMavenArtifactRequestOrBuilder.java new file mode 100644 index 000000000000..7d1a2ed1dd32 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetMavenArtifactRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface GetMavenArtifactRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.GetMavenArtifactRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the maven artifact.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the maven artifact.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetNpmPackageRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetNpmPackageRequest.java new file mode 100644 index 000000000000..eb6c1bbb07e0 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetNpmPackageRequest.java @@ -0,0 +1,648 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * The request to get npm packages.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.GetNpmPackageRequest} + */ +public final class GetNpmPackageRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.GetNpmPackageRequest) + GetNpmPackageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNpmPackageRequest.newBuilder() to construct. + private GetNpmPackageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNpmPackageRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNpmPackageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetNpmPackageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetNpmPackageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest.class, + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the npm package.
+   * 
+ * + * + * 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 npm package.
+   * 
+ * + * + * 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_); + } + getUnknownFields().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 += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.GetNpmPackageRequest)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest other = + (com.google.devtools.artifactregistry.v1.GetNpmPackageRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.GetNpmPackageRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetNpmPackageRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.GetNpmPackageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetNpmPackageRequest 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.devtools.artifactregistry.v1.GetNpmPackageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetNpmPackageRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.GetNpmPackageRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetNpmPackageRequest 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.devtools.artifactregistry.v1.GetNpmPackageRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetNpmPackageRequest 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.devtools.artifactregistry.v1.GetNpmPackageRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetNpmPackageRequest 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.devtools.artifactregistry.v1.GetNpmPackageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request to get npm packages.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.GetNpmPackageRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.GetNpmPackageRequest) + com.google.devtools.artifactregistry.v1.GetNpmPackageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetNpmPackageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetNpmPackageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest.class, + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.GetNpmPackageRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetNpmPackageRequest_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetNpmPackageRequest + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.GetNpmPackageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetNpmPackageRequest build() { + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetNpmPackageRequest buildPartial() { + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest result = + new com.google.devtools.artifactregistry.v1.GetNpmPackageRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.GetNpmPackageRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.devtools.artifactregistry.v1.GetNpmPackageRequest) { + return mergeFrom((com.google.devtools.artifactregistry.v1.GetNpmPackageRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.GetNpmPackageRequest other) { + if (other + == com.google.devtools.artifactregistry.v1.GetNpmPackageRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the npm package.
+     * 
+ * + * + * 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 npm package.
+     * 
+ * + * + * 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 npm package.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the npm package.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the npm package.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @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.devtools.artifactregistry.v1.GetNpmPackageRequest) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.GetNpmPackageRequest) + private static final com.google.devtools.artifactregistry.v1.GetNpmPackageRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.GetNpmPackageRequest(); + } + + public static com.google.devtools.artifactregistry.v1.GetNpmPackageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNpmPackageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetNpmPackageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetNpmPackageRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetNpmPackageRequestOrBuilder.java new file mode 100644 index 000000000000..8884231c877c --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetNpmPackageRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface GetNpmPackageRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.GetNpmPackageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the npm package.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the npm package.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPackageRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPackageRequest.java index eac66a696331..2c6c250c1a2e 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPackageRequest.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPackageRequest.java @@ -78,7 +78,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Required. The name of the package to retrieve. *
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -101,7 +103,9 @@ public java.lang.String getName() { * Required. The name of the package to retrieve. *
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -469,7 +473,9 @@ public Builder mergeFrom( * Required. The name of the package to retrieve. *
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -491,7 +497,9 @@ public java.lang.String getName() { * Required. The name of the package to retrieve. *
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -513,7 +521,9 @@ public com.google.protobuf.ByteString getNameBytes() { * Required. The name of the package to retrieve. *
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -534,7 +544,9 @@ public Builder setName(java.lang.String value) { * Required. The name of the package to retrieve. *
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -551,7 +563,9 @@ public Builder clearName() { * Required. The name of the package to retrieve. *
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPackageRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPackageRequestOrBuilder.java index 76ccce9abe74..4a187dc339c7 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPackageRequestOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPackageRequestOrBuilder.java @@ -30,7 +30,9 @@ public interface GetPackageRequestOrBuilder * Required. The name of the package to retrieve. *
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -42,7 +44,9 @@ public interface GetPackageRequestOrBuilder * Required. The name of the package to retrieve. *
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPythonPackageRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPythonPackageRequest.java new file mode 100644 index 000000000000..4d59167dd06f --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPythonPackageRequest.java @@ -0,0 +1,651 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * The request to get python packages.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.GetPythonPackageRequest} + */ +public final class GetPythonPackageRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.GetPythonPackageRequest) + GetPythonPackageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPythonPackageRequest.newBuilder() to construct. + private GetPythonPackageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPythonPackageRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPythonPackageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetPythonPackageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetPythonPackageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest.class, + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the python package.
+   * 
+ * + * + * 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 python package.
+   * 
+ * + * + * 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_); + } + getUnknownFields().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 += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.GetPythonPackageRequest)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest other = + (com.google.devtools.artifactregistry.v1.GetPythonPackageRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.GetPythonPackageRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetPythonPackageRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.GetPythonPackageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetPythonPackageRequest 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.devtools.artifactregistry.v1.GetPythonPackageRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetPythonPackageRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.GetPythonPackageRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetPythonPackageRequest 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.devtools.artifactregistry.v1.GetPythonPackageRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetPythonPackageRequest 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.devtools.artifactregistry.v1.GetPythonPackageRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetPythonPackageRequest 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.devtools.artifactregistry.v1.GetPythonPackageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request to get python packages.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.GetPythonPackageRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.GetPythonPackageRequest) + com.google.devtools.artifactregistry.v1.GetPythonPackageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetPythonPackageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetPythonPackageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest.class, + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.GetPythonPackageRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_GetPythonPackageRequest_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetPythonPackageRequest + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.GetPythonPackageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetPythonPackageRequest build() { + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetPythonPackageRequest buildPartial() { + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest result = + new com.google.devtools.artifactregistry.v1.GetPythonPackageRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.devtools.artifactregistry.v1.GetPythonPackageRequest) { + return mergeFrom((com.google.devtools.artifactregistry.v1.GetPythonPackageRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.GetPythonPackageRequest other) { + if (other + == com.google.devtools.artifactregistry.v1.GetPythonPackageRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the python package.
+     * 
+ * + * + * 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 python package.
+     * 
+ * + * + * 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 python package.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the python package.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the python package.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @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.devtools.artifactregistry.v1.GetPythonPackageRequest) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.GetPythonPackageRequest) + private static final com.google.devtools.artifactregistry.v1.GetPythonPackageRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.GetPythonPackageRequest(); + } + + public static com.google.devtools.artifactregistry.v1.GetPythonPackageRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPythonPackageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetPythonPackageRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPythonPackageRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPythonPackageRequestOrBuilder.java new file mode 100644 index 000000000000..4c65a1a0409b --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetPythonPackageRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface GetPythonPackageRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.GetPythonPackageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the python package.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the python package.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetVPCSCConfigRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetVPCSCConfigRequest.java new file mode 100644 index 000000000000..77539fc94517 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetVPCSCConfigRequest.java @@ -0,0 +1,648 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/vpcsc_config.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * Gets the VPC SC config for a project.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} + */ +public final class GetVPCSCConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.GetVPCSCConfigRequest) + GetVPCSCConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetVPCSCConfigRequest.newBuilder() to construct. + private GetVPCSCConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetVPCSCConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetVPCSCConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_GetVPCSCConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_GetVPCSCConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.class, + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the VPCSCConfig resource.
+   * 
+ * + * + * 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 VPCSCConfig resource.
+   * 
+ * + * + * 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_); + } + getUnknownFields().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 += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest other = + (com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest 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.devtools.artifactregistry.v1.GetVPCSCConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest 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.devtools.artifactregistry.v1.GetVPCSCConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest 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.devtools.artifactregistry.v1.GetVPCSCConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest 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.devtools.artifactregistry.v1.GetVPCSCConfigRequest 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; + } + /** + * + * + *
+   * Gets the VPC SC config for a project.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.GetVPCSCConfigRequest) + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_GetVPCSCConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_GetVPCSCConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.class, + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_GetVPCSCConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest build() { + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest buildPartial() { + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest result = + new com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.devtools.artifactregistry.v1.GetVPCSCConfigRequest) { + return mergeFrom((com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest other) { + if (other + == com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the VPCSCConfig resource.
+     * 
+ * + * + * 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 VPCSCConfig resource.
+     * 
+ * + * + * 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 VPCSCConfig resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the VPCSCConfig resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the VPCSCConfig resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @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.devtools.artifactregistry.v1.GetVPCSCConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.GetVPCSCConfigRequest) + private static final com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest(); + } + + public static com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetVPCSCConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetVPCSCConfigRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetVPCSCConfigRequestOrBuilder.java new file mode 100644 index 000000000000..b4826a7c8ade --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/GetVPCSCConfigRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/vpcsc_config.proto + +package com.google.devtools.artifactregistry.v1; + +public interface GetVPCSCConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.GetVPCSCConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the VPCSCConfig resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the VPCSCConfig resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListDockerImagesRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListDockerImagesRequest.java index 261590953e2e..2aa06e7a17fd 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListDockerImagesRequest.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListDockerImagesRequest.java @@ -40,6 +40,7 @@ private ListDockerImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder - * Required. The name of the parent resource whose docker images will be listed. + * Required. The name of the parent resource whose docker images will be + * listed. * * * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -99,7 +101,8 @@ public java.lang.String getParent() { * * *
-   * Required. The name of the parent resource whose docker images will be listed.
+   * Required. The name of the parent resource whose docker images will be
+   * listed.
    * 
* * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -188,6 +191,57 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int ORDER_BY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * The field to order the results by.
+   * 
+ * + * string order_by = 4; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * The field to order the results by.
+   * 
+ * + * string order_by = 4; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -211,6 +265,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); + } getUnknownFields().writeTo(output); } @@ -229,6 +286,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -248,6 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -265,6 +326,8 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -408,6 +471,7 @@ public Builder clear() { parent_ = ""; pageSize_ = 0; pageToken_ = ""; + orderBy_ = ""; return this; } @@ -455,6 +519,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000004) != 0)) { result.pageToken_ = pageToken_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.orderBy_ = orderBy_; + } } @java.lang.Override @@ -518,6 +585,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; onChanged(); } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -562,6 +634,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -586,7 +664,8 @@ public Builder mergeFrom( * * *
-     * Required. The name of the parent resource whose docker images will be listed.
+     * Required. The name of the parent resource whose docker images will be
+     * listed.
      * 
* * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -608,7 +687,8 @@ public java.lang.String getParent() { * * *
-     * Required. The name of the parent resource whose docker images will be listed.
+     * Required. The name of the parent resource whose docker images will be
+     * listed.
      * 
* * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -630,7 +710,8 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The name of the parent resource whose docker images will be listed.
+     * Required. The name of the parent resource whose docker images will be
+     * listed.
      * 
* * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -651,7 +732,8 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The name of the parent resource whose docker images will be listed.
+     * Required. The name of the parent resource whose docker images will be
+     * listed.
      * 
* * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -668,7 +750,8 @@ public Builder clearParent() { * * *
-     * Required. The name of the parent resource whose docker images will be listed.
+     * Required. The name of the parent resource whose docker images will be
+     * listed.
      * 
* * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -846,6 +929,112 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * The field to order the results by.
+     * 
+ * + * string order_by = 4; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The field to order the results by.
+     * 
+ * + * string order_by = 4; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The field to order the results by.
+     * 
+ * + * string order_by = 4; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The field to order the results by.
+     * 
+ * + * string order_by = 4; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The field to order the results by.
+     * 
+ * + * string order_by = 4; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListDockerImagesRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListDockerImagesRequestOrBuilder.java index 30b4accd74b8..1c4c105efebf 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListDockerImagesRequestOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListDockerImagesRequestOrBuilder.java @@ -27,7 +27,8 @@ public interface ListDockerImagesRequestOrBuilder * * *
-   * Required. The name of the parent resource whose docker images will be listed.
+   * Required. The name of the parent resource whose docker images will be
+   * listed.
    * 
* * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -39,7 +40,8 @@ public interface ListDockerImagesRequestOrBuilder * * *
-   * Required. The name of the parent resource whose docker images will be listed.
+   * Required. The name of the parent resource whose docker images will be
+   * listed.
    * 
* * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -85,4 +87,29 @@ public interface ListDockerImagesRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The field to order the results by.
+   * 
+ * + * string order_by = 4; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * The field to order the results by.
+   * 
+ * + * string order_by = 4; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); } diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListFilesRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListFilesRequest.java index a110eb97ab09..aa3118625152 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListFilesRequest.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListFilesRequest.java @@ -78,11 +78,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The name of the repository whose files will be listed. For example:
-   * "projects/p1/locations/us-central1/repositories/repo1
+   * Required. The name of the repository whose files will be listed. For
+   * example: "projects/p1/locations/us-central1/repositories/repo1
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -102,11 +104,13 @@ public java.lang.String getParent() { * * *
-   * The name of the repository whose files will be listed. For example:
-   * "projects/p1/locations/us-central1/repositories/repo1
+   * Required. The name of the repository whose files will be listed. For
+   * example: "projects/p1/locations/us-central1/repositories/repo1
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -752,11 +756,13 @@ public Builder mergeFrom( * * *
-     * The name of the repository whose files will be listed. For example:
-     * "projects/p1/locations/us-central1/repositories/repo1
+     * Required. The name of the repository whose files will be listed. For
+     * example: "projects/p1/locations/us-central1/repositories/repo1
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -775,11 +781,13 @@ public java.lang.String getParent() { * * *
-     * The name of the repository whose files will be listed. For example:
-     * "projects/p1/locations/us-central1/repositories/repo1
+     * Required. The name of the repository whose files will be listed. For
+     * example: "projects/p1/locations/us-central1/repositories/repo1
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -798,11 +806,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * The name of the repository whose files will be listed. For example:
-     * "projects/p1/locations/us-central1/repositories/repo1
+     * Required. The name of the repository whose files will be listed. For
+     * example: "projects/p1/locations/us-central1/repositories/repo1
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -820,11 +830,13 @@ public Builder setParent(java.lang.String value) { * * *
-     * The name of the repository whose files will be listed. For example:
-     * "projects/p1/locations/us-central1/repositories/repo1
+     * Required. The name of the repository whose files will be listed. For
+     * example: "projects/p1/locations/us-central1/repositories/repo1
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -838,11 +850,13 @@ public Builder clearParent() { * * *
-     * The name of the repository whose files will be listed. For example:
-     * "projects/p1/locations/us-central1/repositories/repo1
+     * Required. The name of the repository whose files will be listed. For
+     * example: "projects/p1/locations/us-central1/repositories/repo1
      * 
* - * string parent = 1; + * + * 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. diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListFilesRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListFilesRequestOrBuilder.java index b5e9231508a3..e62116e82fb7 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListFilesRequestOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListFilesRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface ListFilesRequestOrBuilder * * *
-   * The name of the repository whose files will be listed. For example:
-   * "projects/p1/locations/us-central1/repositories/repo1
+   * Required. The name of the repository whose files will be listed. For
+   * example: "projects/p1/locations/us-central1/repositories/repo1
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -40,11 +42,13 @@ public interface ListFilesRequestOrBuilder * * *
-   * The name of the repository whose files will be listed. For example:
-   * "projects/p1/locations/us-central1/repositories/repo1
+   * Required. The name of the repository whose files will be listed. For
+   * example: "projects/p1/locations/us-central1/repositories/repo1
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsRequest.java new file mode 100644 index 000000000000..74956667e972 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsRequest.java @@ -0,0 +1,935 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * The request to list maven artifacts.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} + */ +public final class ListMavenArtifactsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.ListMavenArtifactsRequest) + ListMavenArtifactsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListMavenArtifactsRequest.newBuilder() to construct. + private ListMavenArtifactsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListMavenArtifactsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListMavenArtifactsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.class, + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the parent resource whose maven artifacts will be
+   * listed.
+   * 
+ * + * + * 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 name of the parent resource whose maven artifacts will be
+   * listed.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of artifacts to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The next_page_token value returned from a previous list request, if any.
+   * 
+ * + * 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 next_page_token value returned from a previous list request, if any.
+   * 
+ * + * 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(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_); + } + getUnknownFields().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_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest other = + (com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest 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.devtools.artifactregistry.v1.ListMavenArtifactsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest 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.devtools.artifactregistry.v1.ListMavenArtifactsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + 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.devtools.artifactregistry.v1.ListMavenArtifactsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest 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.devtools.artifactregistry.v1.ListMavenArtifactsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request to list maven artifacts.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.ListMavenArtifactsRequest) + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.class, + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsRequest_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest build() { + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest buildPartial() { + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest result = + new com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder 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.devtools.artifactregistry.v1.ListMavenArtifactsRequest) { + return mergeFrom((com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest other) { + if (other + == com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the parent resource whose maven artifacts will be
+     * listed.
+     * 
+ * + * + * 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 name of the parent resource whose maven artifacts will be
+     * listed.
+     * 
+ * + * + * 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 name of the parent resource whose maven artifacts will be
+     * listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent resource whose maven artifacts will be
+     * listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent resource whose maven artifacts will be
+     * listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of artifacts to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of artifacts to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of artifacts to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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 next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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 next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + 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.devtools.artifactregistry.v1.ListMavenArtifactsRequest) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.ListMavenArtifactsRequest) + private static final com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest(); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMavenArtifactsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsRequestOrBuilder.java new file mode 100644 index 000000000000..896577a721f2 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsRequestOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface ListMavenArtifactsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.ListMavenArtifactsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent resource whose maven artifacts will be
+   * listed.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the parent resource whose maven artifacts will be
+   * listed.
+   * 
+ * + * + * 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.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous list request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsResponse.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsResponse.java new file mode 100644 index 000000000000..9042e02b884c --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsResponse.java @@ -0,0 +1,1159 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * The response from listing maven artifacts.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} + */ +public final class ListMavenArtifactsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.ListMavenArtifactsResponse) + ListMavenArtifactsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListMavenArtifactsResponse.newBuilder() to construct. + private ListMavenArtifactsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListMavenArtifactsResponse() { + mavenArtifacts_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListMavenArtifactsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.class, + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.Builder.class); + } + + public static final int MAVEN_ARTIFACTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List mavenArtifacts_; + /** + * + * + *
+   * The maven artifacts returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + @java.lang.Override + public java.util.List + getMavenArtifactsList() { + return mavenArtifacts_; + } + /** + * + * + *
+   * The maven artifacts returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + @java.lang.Override + public java.util.List + getMavenArtifactsOrBuilderList() { + return mavenArtifacts_; + } + /** + * + * + *
+   * The maven artifacts returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + @java.lang.Override + public int getMavenArtifactsCount() { + return mavenArtifacts_.size(); + } + /** + * + * + *
+   * The maven artifacts returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.MavenArtifact getMavenArtifacts(int index) { + return mavenArtifacts_.get(index); + } + /** + * + * + *
+   * The maven artifacts returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.MavenArtifactOrBuilder getMavenArtifactsOrBuilder( + int index) { + return mavenArtifacts_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * 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 < mavenArtifacts_.size(); i++) { + output.writeMessage(1, mavenArtifacts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < mavenArtifacts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, mavenArtifacts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse other = + (com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse) obj; + + if (!getMavenArtifactsList().equals(other.getMavenArtifactsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMavenArtifactsCount() > 0) { + hash = (37 * hash) + MAVEN_ARTIFACTS_FIELD_NUMBER; + hash = (53 * hash) + getMavenArtifactsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse 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.devtools.artifactregistry.v1.ListMavenArtifactsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse 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.devtools.artifactregistry.v1.ListMavenArtifactsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + 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.devtools.artifactregistry.v1.ListMavenArtifactsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse 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.devtools.artifactregistry.v1.ListMavenArtifactsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response from listing maven artifacts.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.ListMavenArtifactsResponse) + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.class, + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (mavenArtifactsBuilder_ == null) { + mavenArtifacts_ = java.util.Collections.emptyList(); + } else { + mavenArtifacts_ = null; + mavenArtifactsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListMavenArtifactsResponse_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse build() { + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse buildPartial() { + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse result = + new com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse result) { + if (mavenArtifactsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + mavenArtifacts_ = java.util.Collections.unmodifiableList(mavenArtifacts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.mavenArtifacts_ = mavenArtifacts_; + } else { + result.mavenArtifacts_ = mavenArtifactsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.devtools.artifactregistry.v1.ListMavenArtifactsResponse) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse other) { + if (other + == com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + .getDefaultInstance()) return this; + if (mavenArtifactsBuilder_ == null) { + if (!other.mavenArtifacts_.isEmpty()) { + if (mavenArtifacts_.isEmpty()) { + mavenArtifacts_ = other.mavenArtifacts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMavenArtifactsIsMutable(); + mavenArtifacts_.addAll(other.mavenArtifacts_); + } + onChanged(); + } + } else { + if (!other.mavenArtifacts_.isEmpty()) { + if (mavenArtifactsBuilder_.isEmpty()) { + mavenArtifactsBuilder_.dispose(); + mavenArtifactsBuilder_ = null; + mavenArtifacts_ = other.mavenArtifacts_; + bitField0_ = (bitField0_ & ~0x00000001); + mavenArtifactsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMavenArtifactsFieldBuilder() + : null; + } else { + mavenArtifactsBuilder_.addAllMessages(other.mavenArtifacts_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devtools.artifactregistry.v1.MavenArtifact m = + input.readMessage( + com.google.devtools.artifactregistry.v1.MavenArtifact.parser(), + extensionRegistry); + if (mavenArtifactsBuilder_ == null) { + ensureMavenArtifactsIsMutable(); + mavenArtifacts_.add(m); + } else { + mavenArtifactsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List mavenArtifacts_ = + java.util.Collections.emptyList(); + + private void ensureMavenArtifactsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + mavenArtifacts_ = + new java.util.ArrayList( + mavenArtifacts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.MavenArtifact, + com.google.devtools.artifactregistry.v1.MavenArtifact.Builder, + com.google.devtools.artifactregistry.v1.MavenArtifactOrBuilder> + mavenArtifactsBuilder_; + + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public java.util.List + getMavenArtifactsList() { + if (mavenArtifactsBuilder_ == null) { + return java.util.Collections.unmodifiableList(mavenArtifacts_); + } else { + return mavenArtifactsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public int getMavenArtifactsCount() { + if (mavenArtifactsBuilder_ == null) { + return mavenArtifacts_.size(); + } else { + return mavenArtifactsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public com.google.devtools.artifactregistry.v1.MavenArtifact getMavenArtifacts(int index) { + if (mavenArtifactsBuilder_ == null) { + return mavenArtifacts_.get(index); + } else { + return mavenArtifactsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public Builder setMavenArtifacts( + int index, com.google.devtools.artifactregistry.v1.MavenArtifact value) { + if (mavenArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMavenArtifactsIsMutable(); + mavenArtifacts_.set(index, value); + onChanged(); + } else { + mavenArtifactsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public Builder setMavenArtifacts( + int index, com.google.devtools.artifactregistry.v1.MavenArtifact.Builder builderForValue) { + if (mavenArtifactsBuilder_ == null) { + ensureMavenArtifactsIsMutable(); + mavenArtifacts_.set(index, builderForValue.build()); + onChanged(); + } else { + mavenArtifactsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public Builder addMavenArtifacts(com.google.devtools.artifactregistry.v1.MavenArtifact value) { + if (mavenArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMavenArtifactsIsMutable(); + mavenArtifacts_.add(value); + onChanged(); + } else { + mavenArtifactsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public Builder addMavenArtifacts( + int index, com.google.devtools.artifactregistry.v1.MavenArtifact value) { + if (mavenArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMavenArtifactsIsMutable(); + mavenArtifacts_.add(index, value); + onChanged(); + } else { + mavenArtifactsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public Builder addMavenArtifacts( + com.google.devtools.artifactregistry.v1.MavenArtifact.Builder builderForValue) { + if (mavenArtifactsBuilder_ == null) { + ensureMavenArtifactsIsMutable(); + mavenArtifacts_.add(builderForValue.build()); + onChanged(); + } else { + mavenArtifactsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public Builder addMavenArtifacts( + int index, com.google.devtools.artifactregistry.v1.MavenArtifact.Builder builderForValue) { + if (mavenArtifactsBuilder_ == null) { + ensureMavenArtifactsIsMutable(); + mavenArtifacts_.add(index, builderForValue.build()); + onChanged(); + } else { + mavenArtifactsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public Builder addAllMavenArtifacts( + java.lang.Iterable + values) { + if (mavenArtifactsBuilder_ == null) { + ensureMavenArtifactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mavenArtifacts_); + onChanged(); + } else { + mavenArtifactsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public Builder clearMavenArtifacts() { + if (mavenArtifactsBuilder_ == null) { + mavenArtifacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + mavenArtifactsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public Builder removeMavenArtifacts(int index) { + if (mavenArtifactsBuilder_ == null) { + ensureMavenArtifactsIsMutable(); + mavenArtifacts_.remove(index); + onChanged(); + } else { + mavenArtifactsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public com.google.devtools.artifactregistry.v1.MavenArtifact.Builder getMavenArtifactsBuilder( + int index) { + return getMavenArtifactsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public com.google.devtools.artifactregistry.v1.MavenArtifactOrBuilder + getMavenArtifactsOrBuilder(int index) { + if (mavenArtifactsBuilder_ == null) { + return mavenArtifacts_.get(index); + } else { + return mavenArtifactsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public java.util.List + getMavenArtifactsOrBuilderList() { + if (mavenArtifactsBuilder_ != null) { + return mavenArtifactsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mavenArtifacts_); + } + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public com.google.devtools.artifactregistry.v1.MavenArtifact.Builder + addMavenArtifactsBuilder() { + return getMavenArtifactsFieldBuilder() + .addBuilder(com.google.devtools.artifactregistry.v1.MavenArtifact.getDefaultInstance()); + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public com.google.devtools.artifactregistry.v1.MavenArtifact.Builder addMavenArtifactsBuilder( + int index) { + return getMavenArtifactsFieldBuilder() + .addBuilder( + index, com.google.devtools.artifactregistry.v1.MavenArtifact.getDefaultInstance()); + } + /** + * + * + *
+     * The maven artifacts returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + public java.util.List + getMavenArtifactsBuilderList() { + return getMavenArtifactsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.MavenArtifact, + com.google.devtools.artifactregistry.v1.MavenArtifact.Builder, + com.google.devtools.artifactregistry.v1.MavenArtifactOrBuilder> + getMavenArtifactsFieldBuilder() { + if (mavenArtifactsBuilder_ == null) { + mavenArtifactsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.MavenArtifact, + com.google.devtools.artifactregistry.v1.MavenArtifact.Builder, + com.google.devtools.artifactregistry.v1.MavenArtifactOrBuilder>( + mavenArtifacts_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + mavenArtifacts_ = null; + } + return mavenArtifactsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @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.devtools.artifactregistry.v1.ListMavenArtifactsResponse) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.ListMavenArtifactsResponse) + private static final com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse(); + } + + public static com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMavenArtifactsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsResponseOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsResponseOrBuilder.java new file mode 100644 index 000000000000..bdd71e3ea230 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListMavenArtifactsResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface ListMavenArtifactsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.ListMavenArtifactsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The maven artifacts returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + java.util.List getMavenArtifactsList(); + /** + * + * + *
+   * The maven artifacts returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + com.google.devtools.artifactregistry.v1.MavenArtifact getMavenArtifacts(int index); + /** + * + * + *
+   * The maven artifacts returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + int getMavenArtifactsCount(); + /** + * + * + *
+   * The maven artifacts returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + java.util.List + getMavenArtifactsOrBuilderList(); + /** + * + * + *
+   * The maven artifacts returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.MavenArtifact maven_artifacts = 1; + */ + com.google.devtools.artifactregistry.v1.MavenArtifactOrBuilder getMavenArtifactsOrBuilder( + int index); + + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesRequest.java new file mode 100644 index 000000000000..bdb401be3bb9 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesRequest.java @@ -0,0 +1,932 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * The request to list npm packages.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListNpmPackagesRequest} + */ +public final class ListNpmPackagesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.ListNpmPackagesRequest) + ListNpmPackagesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNpmPackagesRequest.newBuilder() to construct. + private ListNpmPackagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNpmPackagesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNpmPackagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest.class, + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the parent resource whose npm packages will be
+   * listed.
+   * 
+ * + * + * 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 name of the parent resource whose npm packages will be
+   * listed.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of artifacts to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The next_page_token value returned from a previous list request, if any.
+   * 
+ * + * 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 next_page_token value returned from a previous list request, if any.
+   * 
+ * + * 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(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_); + } + getUnknownFields().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_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest other = + (com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest 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.devtools.artifactregistry.v1.ListNpmPackagesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest 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.devtools.artifactregistry.v1.ListNpmPackagesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest 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.devtools.artifactregistry.v1.ListNpmPackagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest 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.devtools.artifactregistry.v1.ListNpmPackagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request to list npm packages.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListNpmPackagesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.ListNpmPackagesRequest) + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest.class, + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesRequest_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest build() { + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest buildPartial() { + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest result = + new com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder 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.devtools.artifactregistry.v1.ListNpmPackagesRequest) { + return mergeFrom((com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest other) { + if (other + == com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the parent resource whose npm packages will be
+     * listed.
+     * 
+ * + * + * 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 name of the parent resource whose npm packages will be
+     * listed.
+     * 
+ * + * + * 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 name of the parent resource whose npm packages will be
+     * listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent resource whose npm packages will be
+     * listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent resource whose npm packages will be
+     * listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of artifacts to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of artifacts to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of artifacts to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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 next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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 next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + 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.devtools.artifactregistry.v1.ListNpmPackagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.ListNpmPackagesRequest) + private static final com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest(); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNpmPackagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesRequestOrBuilder.java new file mode 100644 index 000000000000..fd38ebc85512 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesRequestOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface ListNpmPackagesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.ListNpmPackagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent resource whose npm packages will be
+   * listed.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the parent resource whose npm packages will be
+   * listed.
+   * 
+ * + * + * 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.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous list request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesResponse.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesResponse.java new file mode 100644 index 000000000000..5d4bd1fe1cc4 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesResponse.java @@ -0,0 +1,1148 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * The response from listing npm packages.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListNpmPackagesResponse} + */ +public final class ListNpmPackagesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.ListNpmPackagesResponse) + ListNpmPackagesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNpmPackagesResponse.newBuilder() to construct. + private ListNpmPackagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNpmPackagesResponse() { + npmPackages_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNpmPackagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse.class, + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse.Builder.class); + } + + public static final int NPM_PACKAGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List npmPackages_; + /** + * + * + *
+   * The npm packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + @java.lang.Override + public java.util.List getNpmPackagesList() { + return npmPackages_; + } + /** + * + * + *
+   * The npm packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + @java.lang.Override + public java.util.List + getNpmPackagesOrBuilderList() { + return npmPackages_; + } + /** + * + * + *
+   * The npm packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + @java.lang.Override + public int getNpmPackagesCount() { + return npmPackages_.size(); + } + /** + * + * + *
+   * The npm packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.NpmPackage getNpmPackages(int index) { + return npmPackages_.get(index); + } + /** + * + * + *
+   * The npm packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.NpmPackageOrBuilder getNpmPackagesOrBuilder( + int index) { + return npmPackages_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * 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 < npmPackages_.size(); i++) { + output.writeMessage(1, npmPackages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < npmPackages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, npmPackages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse other = + (com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse) obj; + + if (!getNpmPackagesList().equals(other.getNpmPackagesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNpmPackagesCount() > 0) { + hash = (37 * hash) + NPM_PACKAGES_FIELD_NUMBER; + hash = (53 * hash) + getNpmPackagesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse 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.devtools.artifactregistry.v1.ListNpmPackagesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse 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.devtools.artifactregistry.v1.ListNpmPackagesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse 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.devtools.artifactregistry.v1.ListNpmPackagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse 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.devtools.artifactregistry.v1.ListNpmPackagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response from listing npm packages.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListNpmPackagesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.ListNpmPackagesResponse) + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse.class, + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (npmPackagesBuilder_ == null) { + npmPackages_ = java.util.Collections.emptyList(); + } else { + npmPackages_ = null; + npmPackagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListNpmPackagesResponse_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse build() { + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse buildPartial() { + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse result = + new com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse result) { + if (npmPackagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + npmPackages_ = java.util.Collections.unmodifiableList(npmPackages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.npmPackages_ = npmPackages_; + } else { + result.npmPackages_ = npmPackagesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.devtools.artifactregistry.v1.ListNpmPackagesResponse) { + return mergeFrom((com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse other) { + if (other + == com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse.getDefaultInstance()) + return this; + if (npmPackagesBuilder_ == null) { + if (!other.npmPackages_.isEmpty()) { + if (npmPackages_.isEmpty()) { + npmPackages_ = other.npmPackages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNpmPackagesIsMutable(); + npmPackages_.addAll(other.npmPackages_); + } + onChanged(); + } + } else { + if (!other.npmPackages_.isEmpty()) { + if (npmPackagesBuilder_.isEmpty()) { + npmPackagesBuilder_.dispose(); + npmPackagesBuilder_ = null; + npmPackages_ = other.npmPackages_; + bitField0_ = (bitField0_ & ~0x00000001); + npmPackagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNpmPackagesFieldBuilder() + : null; + } else { + npmPackagesBuilder_.addAllMessages(other.npmPackages_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devtools.artifactregistry.v1.NpmPackage m = + input.readMessage( + com.google.devtools.artifactregistry.v1.NpmPackage.parser(), + extensionRegistry); + if (npmPackagesBuilder_ == null) { + ensureNpmPackagesIsMutable(); + npmPackages_.add(m); + } else { + npmPackagesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List npmPackages_ = + java.util.Collections.emptyList(); + + private void ensureNpmPackagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + npmPackages_ = + new java.util.ArrayList( + npmPackages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.NpmPackage, + com.google.devtools.artifactregistry.v1.NpmPackage.Builder, + com.google.devtools.artifactregistry.v1.NpmPackageOrBuilder> + npmPackagesBuilder_; + + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public java.util.List getNpmPackagesList() { + if (npmPackagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(npmPackages_); + } else { + return npmPackagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public int getNpmPackagesCount() { + if (npmPackagesBuilder_ == null) { + return npmPackages_.size(); + } else { + return npmPackagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public com.google.devtools.artifactregistry.v1.NpmPackage getNpmPackages(int index) { + if (npmPackagesBuilder_ == null) { + return npmPackages_.get(index); + } else { + return npmPackagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public Builder setNpmPackages( + int index, com.google.devtools.artifactregistry.v1.NpmPackage value) { + if (npmPackagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNpmPackagesIsMutable(); + npmPackages_.set(index, value); + onChanged(); + } else { + npmPackagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public Builder setNpmPackages( + int index, com.google.devtools.artifactregistry.v1.NpmPackage.Builder builderForValue) { + if (npmPackagesBuilder_ == null) { + ensureNpmPackagesIsMutable(); + npmPackages_.set(index, builderForValue.build()); + onChanged(); + } else { + npmPackagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public Builder addNpmPackages(com.google.devtools.artifactregistry.v1.NpmPackage value) { + if (npmPackagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNpmPackagesIsMutable(); + npmPackages_.add(value); + onChanged(); + } else { + npmPackagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public Builder addNpmPackages( + int index, com.google.devtools.artifactregistry.v1.NpmPackage value) { + if (npmPackagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNpmPackagesIsMutable(); + npmPackages_.add(index, value); + onChanged(); + } else { + npmPackagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public Builder addNpmPackages( + com.google.devtools.artifactregistry.v1.NpmPackage.Builder builderForValue) { + if (npmPackagesBuilder_ == null) { + ensureNpmPackagesIsMutable(); + npmPackages_.add(builderForValue.build()); + onChanged(); + } else { + npmPackagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public Builder addNpmPackages( + int index, com.google.devtools.artifactregistry.v1.NpmPackage.Builder builderForValue) { + if (npmPackagesBuilder_ == null) { + ensureNpmPackagesIsMutable(); + npmPackages_.add(index, builderForValue.build()); + onChanged(); + } else { + npmPackagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public Builder addAllNpmPackages( + java.lang.Iterable values) { + if (npmPackagesBuilder_ == null) { + ensureNpmPackagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, npmPackages_); + onChanged(); + } else { + npmPackagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public Builder clearNpmPackages() { + if (npmPackagesBuilder_ == null) { + npmPackages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + npmPackagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public Builder removeNpmPackages(int index) { + if (npmPackagesBuilder_ == null) { + ensureNpmPackagesIsMutable(); + npmPackages_.remove(index); + onChanged(); + } else { + npmPackagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public com.google.devtools.artifactregistry.v1.NpmPackage.Builder getNpmPackagesBuilder( + int index) { + return getNpmPackagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public com.google.devtools.artifactregistry.v1.NpmPackageOrBuilder getNpmPackagesOrBuilder( + int index) { + if (npmPackagesBuilder_ == null) { + return npmPackages_.get(index); + } else { + return npmPackagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public java.util.List + getNpmPackagesOrBuilderList() { + if (npmPackagesBuilder_ != null) { + return npmPackagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(npmPackages_); + } + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public com.google.devtools.artifactregistry.v1.NpmPackage.Builder addNpmPackagesBuilder() { + return getNpmPackagesFieldBuilder() + .addBuilder(com.google.devtools.artifactregistry.v1.NpmPackage.getDefaultInstance()); + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public com.google.devtools.artifactregistry.v1.NpmPackage.Builder addNpmPackagesBuilder( + int index) { + return getNpmPackagesFieldBuilder() + .addBuilder( + index, com.google.devtools.artifactregistry.v1.NpmPackage.getDefaultInstance()); + } + /** + * + * + *
+     * The npm packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + public java.util.List + getNpmPackagesBuilderList() { + return getNpmPackagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.NpmPackage, + com.google.devtools.artifactregistry.v1.NpmPackage.Builder, + com.google.devtools.artifactregistry.v1.NpmPackageOrBuilder> + getNpmPackagesFieldBuilder() { + if (npmPackagesBuilder_ == null) { + npmPackagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.NpmPackage, + com.google.devtools.artifactregistry.v1.NpmPackage.Builder, + com.google.devtools.artifactregistry.v1.NpmPackageOrBuilder>( + npmPackages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + npmPackages_ = null; + } + return npmPackagesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @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.devtools.artifactregistry.v1.ListNpmPackagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.ListNpmPackagesResponse) + private static final com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse(); + } + + public static com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNpmPackagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesResponseOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesResponseOrBuilder.java new file mode 100644 index 000000000000..3d98221ef9a3 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListNpmPackagesResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface ListNpmPackagesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.ListNpmPackagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The npm packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + java.util.List getNpmPackagesList(); + /** + * + * + *
+   * The npm packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + com.google.devtools.artifactregistry.v1.NpmPackage getNpmPackages(int index); + /** + * + * + *
+   * The npm packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + int getNpmPackagesCount(); + /** + * + * + *
+   * The npm packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + java.util.List + getNpmPackagesOrBuilderList(); + /** + * + * + *
+   * The npm packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.NpmPackage npm_packages = 1; + */ + com.google.devtools.artifactregistry.v1.NpmPackageOrBuilder getNpmPackagesOrBuilder(int index); + + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPackagesRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPackagesRequest.java index 60eac2f4e6ce..42ca72333ba6 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPackagesRequest.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPackagesRequest.java @@ -79,7 +79,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Required. The name of the parent resource whose packages will be listed. * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -102,7 +104,9 @@ public java.lang.String getParent() { * Required. The name of the parent resource whose packages will be listed. * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -585,7 +589,9 @@ public Builder mergeFrom( * Required. The name of the parent resource whose packages will be listed. * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -607,7 +613,9 @@ public java.lang.String getParent() { * Required. The name of the parent resource whose packages will be listed. * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -629,7 +637,9 @@ public com.google.protobuf.ByteString getParentBytes() { * Required. The name of the parent resource whose packages will be listed. * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -650,7 +660,9 @@ public Builder setParent(java.lang.String value) { * Required. The name of the parent resource whose packages will be listed. * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -667,7 +679,9 @@ public Builder clearParent() { * Required. The name of the parent resource whose packages will be listed. * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * 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. diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPackagesRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPackagesRequestOrBuilder.java index d503daf4e6e7..a3332e1f6c99 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPackagesRequestOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPackagesRequestOrBuilder.java @@ -30,7 +30,9 @@ public interface ListPackagesRequestOrBuilder * Required. The name of the parent resource whose packages will be listed. * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -42,7 +44,9 @@ public interface ListPackagesRequestOrBuilder * Required. The name of the parent resource whose packages will be listed. * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesRequest.java new file mode 100644 index 000000000000..f73aec4729ec --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesRequest.java @@ -0,0 +1,935 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * The request to list python packages.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListPythonPackagesRequest} + */ +public final class ListPythonPackagesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.ListPythonPackagesRequest) + ListPythonPackagesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPythonPackagesRequest.newBuilder() to construct. + private ListPythonPackagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPythonPackagesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPythonPackagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest.class, + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the parent resource whose python packages will be
+   * listed.
+   * 
+ * + * + * 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 name of the parent resource whose python packages will be
+   * listed.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of artifacts to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The next_page_token value returned from a previous list request, if any.
+   * 
+ * + * 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 next_page_token value returned from a previous list request, if any.
+   * 
+ * + * 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(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_); + } + getUnknownFields().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_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest other = + (com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest 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.devtools.artifactregistry.v1.ListPythonPackagesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest 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.devtools.artifactregistry.v1.ListPythonPackagesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest + 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.devtools.artifactregistry.v1.ListPythonPackagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest 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.devtools.artifactregistry.v1.ListPythonPackagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request to list python packages.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListPythonPackagesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.ListPythonPackagesRequest) + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest.class, + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest.Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesRequest_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest build() { + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest buildPartial() { + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest result = + new com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder 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.devtools.artifactregistry.v1.ListPythonPackagesRequest) { + return mergeFrom((com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest other) { + if (other + == com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the parent resource whose python packages will be
+     * listed.
+     * 
+ * + * + * 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 name of the parent resource whose python packages will be
+     * listed.
+     * 
+ * + * + * 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 name of the parent resource whose python packages will be
+     * listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent resource whose python packages will be
+     * listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent resource whose python packages will be
+     * listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of artifacts to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of artifacts to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of artifacts to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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 next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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 next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request, if any.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + 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.devtools.artifactregistry.v1.ListPythonPackagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.ListPythonPackagesRequest) + private static final com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest(); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPythonPackagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesRequestOrBuilder.java new file mode 100644 index 000000000000..ceaf41c10bfc --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesRequestOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface ListPythonPackagesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.ListPythonPackagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent resource whose python packages will be
+   * listed.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the parent resource whose python packages will be
+   * listed.
+   * 
+ * + * + * 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.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous list request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesResponse.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesResponse.java new file mode 100644 index 000000000000..37aabe2c5c7e --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesResponse.java @@ -0,0 +1,1159 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * The response from listing python packages.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListPythonPackagesResponse} + */ +public final class ListPythonPackagesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.ListPythonPackagesResponse) + ListPythonPackagesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPythonPackagesResponse.newBuilder() to construct. + private ListPythonPackagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPythonPackagesResponse() { + pythonPackages_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPythonPackagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse.class, + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse.Builder.class); + } + + public static final int PYTHON_PACKAGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List pythonPackages_; + /** + * + * + *
+   * The python packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + @java.lang.Override + public java.util.List + getPythonPackagesList() { + return pythonPackages_; + } + /** + * + * + *
+   * The python packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + @java.lang.Override + public java.util.List + getPythonPackagesOrBuilderList() { + return pythonPackages_; + } + /** + * + * + *
+   * The python packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + @java.lang.Override + public int getPythonPackagesCount() { + return pythonPackages_.size(); + } + /** + * + * + *
+   * The python packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.PythonPackage getPythonPackages(int index) { + return pythonPackages_.get(index); + } + /** + * + * + *
+   * The python packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.PythonPackageOrBuilder getPythonPackagesOrBuilder( + int index) { + return pythonPackages_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * 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 < pythonPackages_.size(); i++) { + output.writeMessage(1, pythonPackages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < pythonPackages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, pythonPackages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse other = + (com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse) obj; + + if (!getPythonPackagesList().equals(other.getPythonPackagesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPythonPackagesCount() > 0) { + hash = (37 * hash) + PYTHON_PACKAGES_FIELD_NUMBER; + hash = (53 * hash) + getPythonPackagesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse 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.devtools.artifactregistry.v1.ListPythonPackagesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse 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.devtools.artifactregistry.v1.ListPythonPackagesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse + 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.devtools.artifactregistry.v1.ListPythonPackagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse 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.devtools.artifactregistry.v1.ListPythonPackagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response from listing python packages.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.ListPythonPackagesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.ListPythonPackagesResponse) + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse.class, + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse.Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (pythonPackagesBuilder_ == null) { + pythonPackages_ = java.util.Collections.emptyList(); + } else { + pythonPackages_ = null; + pythonPackagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_ListPythonPackagesResponse_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse build() { + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse buildPartial() { + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse result = + new com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse result) { + if (pythonPackagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pythonPackages_ = java.util.Collections.unmodifiableList(pythonPackages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pythonPackages_ = pythonPackages_; + } else { + result.pythonPackages_ = pythonPackagesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.devtools.artifactregistry.v1.ListPythonPackagesResponse) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse other) { + if (other + == com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse + .getDefaultInstance()) return this; + if (pythonPackagesBuilder_ == null) { + if (!other.pythonPackages_.isEmpty()) { + if (pythonPackages_.isEmpty()) { + pythonPackages_ = other.pythonPackages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePythonPackagesIsMutable(); + pythonPackages_.addAll(other.pythonPackages_); + } + onChanged(); + } + } else { + if (!other.pythonPackages_.isEmpty()) { + if (pythonPackagesBuilder_.isEmpty()) { + pythonPackagesBuilder_.dispose(); + pythonPackagesBuilder_ = null; + pythonPackages_ = other.pythonPackages_; + bitField0_ = (bitField0_ & ~0x00000001); + pythonPackagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPythonPackagesFieldBuilder() + : null; + } else { + pythonPackagesBuilder_.addAllMessages(other.pythonPackages_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devtools.artifactregistry.v1.PythonPackage m = + input.readMessage( + com.google.devtools.artifactregistry.v1.PythonPackage.parser(), + extensionRegistry); + if (pythonPackagesBuilder_ == null) { + ensurePythonPackagesIsMutable(); + pythonPackages_.add(m); + } else { + pythonPackagesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List pythonPackages_ = + java.util.Collections.emptyList(); + + private void ensurePythonPackagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pythonPackages_ = + new java.util.ArrayList( + pythonPackages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.PythonPackage, + com.google.devtools.artifactregistry.v1.PythonPackage.Builder, + com.google.devtools.artifactregistry.v1.PythonPackageOrBuilder> + pythonPackagesBuilder_; + + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public java.util.List + getPythonPackagesList() { + if (pythonPackagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pythonPackages_); + } else { + return pythonPackagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public int getPythonPackagesCount() { + if (pythonPackagesBuilder_ == null) { + return pythonPackages_.size(); + } else { + return pythonPackagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public com.google.devtools.artifactregistry.v1.PythonPackage getPythonPackages(int index) { + if (pythonPackagesBuilder_ == null) { + return pythonPackages_.get(index); + } else { + return pythonPackagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public Builder setPythonPackages( + int index, com.google.devtools.artifactregistry.v1.PythonPackage value) { + if (pythonPackagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePythonPackagesIsMutable(); + pythonPackages_.set(index, value); + onChanged(); + } else { + pythonPackagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public Builder setPythonPackages( + int index, com.google.devtools.artifactregistry.v1.PythonPackage.Builder builderForValue) { + if (pythonPackagesBuilder_ == null) { + ensurePythonPackagesIsMutable(); + pythonPackages_.set(index, builderForValue.build()); + onChanged(); + } else { + pythonPackagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public Builder addPythonPackages(com.google.devtools.artifactregistry.v1.PythonPackage value) { + if (pythonPackagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePythonPackagesIsMutable(); + pythonPackages_.add(value); + onChanged(); + } else { + pythonPackagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public Builder addPythonPackages( + int index, com.google.devtools.artifactregistry.v1.PythonPackage value) { + if (pythonPackagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePythonPackagesIsMutable(); + pythonPackages_.add(index, value); + onChanged(); + } else { + pythonPackagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public Builder addPythonPackages( + com.google.devtools.artifactregistry.v1.PythonPackage.Builder builderForValue) { + if (pythonPackagesBuilder_ == null) { + ensurePythonPackagesIsMutable(); + pythonPackages_.add(builderForValue.build()); + onChanged(); + } else { + pythonPackagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public Builder addPythonPackages( + int index, com.google.devtools.artifactregistry.v1.PythonPackage.Builder builderForValue) { + if (pythonPackagesBuilder_ == null) { + ensurePythonPackagesIsMutable(); + pythonPackages_.add(index, builderForValue.build()); + onChanged(); + } else { + pythonPackagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public Builder addAllPythonPackages( + java.lang.Iterable + values) { + if (pythonPackagesBuilder_ == null) { + ensurePythonPackagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pythonPackages_); + onChanged(); + } else { + pythonPackagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public Builder clearPythonPackages() { + if (pythonPackagesBuilder_ == null) { + pythonPackages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pythonPackagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public Builder removePythonPackages(int index) { + if (pythonPackagesBuilder_ == null) { + ensurePythonPackagesIsMutable(); + pythonPackages_.remove(index); + onChanged(); + } else { + pythonPackagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public com.google.devtools.artifactregistry.v1.PythonPackage.Builder getPythonPackagesBuilder( + int index) { + return getPythonPackagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public com.google.devtools.artifactregistry.v1.PythonPackageOrBuilder + getPythonPackagesOrBuilder(int index) { + if (pythonPackagesBuilder_ == null) { + return pythonPackages_.get(index); + } else { + return pythonPackagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public java.util.List + getPythonPackagesOrBuilderList() { + if (pythonPackagesBuilder_ != null) { + return pythonPackagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pythonPackages_); + } + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public com.google.devtools.artifactregistry.v1.PythonPackage.Builder + addPythonPackagesBuilder() { + return getPythonPackagesFieldBuilder() + .addBuilder(com.google.devtools.artifactregistry.v1.PythonPackage.getDefaultInstance()); + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public com.google.devtools.artifactregistry.v1.PythonPackage.Builder addPythonPackagesBuilder( + int index) { + return getPythonPackagesFieldBuilder() + .addBuilder( + index, com.google.devtools.artifactregistry.v1.PythonPackage.getDefaultInstance()); + } + /** + * + * + *
+     * The python packages returned.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + public java.util.List + getPythonPackagesBuilderList() { + return getPythonPackagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.PythonPackage, + com.google.devtools.artifactregistry.v1.PythonPackage.Builder, + com.google.devtools.artifactregistry.v1.PythonPackageOrBuilder> + getPythonPackagesFieldBuilder() { + if (pythonPackagesBuilder_ == null) { + pythonPackagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.PythonPackage, + com.google.devtools.artifactregistry.v1.PythonPackage.Builder, + com.google.devtools.artifactregistry.v1.PythonPackageOrBuilder>( + pythonPackages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + pythonPackages_ = null; + } + return pythonPackagesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The token to retrieve the next page of artifacts, or empty if there are no
+     * more artifacts to return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @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.devtools.artifactregistry.v1.ListPythonPackagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.ListPythonPackagesResponse) + private static final com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse(); + } + + public static com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPythonPackagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesResponseOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesResponseOrBuilder.java new file mode 100644 index 000000000000..c55f1c011ef8 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListPythonPackagesResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface ListPythonPackagesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.ListPythonPackagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The python packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + java.util.List getPythonPackagesList(); + /** + * + * + *
+   * The python packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + com.google.devtools.artifactregistry.v1.PythonPackage getPythonPackages(int index); + /** + * + * + *
+   * The python packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + int getPythonPackagesCount(); + /** + * + * + *
+   * The python packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + java.util.List + getPythonPackagesOrBuilderList(); + /** + * + * + *
+   * The python packages returned.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.PythonPackage python_packages = 1; + */ + com.google.devtools.artifactregistry.v1.PythonPackageOrBuilder getPythonPackagesOrBuilder( + int index); + + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token to retrieve the next page of artifacts, or empty if there are no
+   * more artifacts to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifact.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifact.java new file mode 100644 index 000000000000..e7443b3cfcfe --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifact.java @@ -0,0 +1,1997 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * MavenArtifact represents a maven artifact.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.MavenArtifact} + */ +public final class MavenArtifact extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.MavenArtifact) + MavenArtifactOrBuilder { + private static final long serialVersionUID = 0L; + // Use MavenArtifact.newBuilder() to construct. + private MavenArtifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MavenArtifact() { + name_ = ""; + pomUri_ = ""; + groupId_ = ""; + artifactId_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MavenArtifact(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_MavenArtifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_MavenArtifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.MavenArtifact.class, + com.google.devtools.artifactregistry.v1.MavenArtifact.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and maven_artifact
+   * forms a unique artifact For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
+   * com.google.guava:guava:31.0-jre",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * "com.google.guava:guava:31.0-jre"
+   * is the maven artifact.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and maven_artifact
+   * forms a unique artifact For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
+   * com.google.guava:guava:31.0-jre",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * "com.google.guava:guava:31.0-jre"
+   * is the maven artifact.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POM_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object pomUri_ = ""; + /** + * + * + *
+   * Required. URL to access the pom file of the artifact.
+   * Example:
+   * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
+   * 
+ * + * string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pomUri. + */ + @java.lang.Override + public java.lang.String getPomUri() { + java.lang.Object ref = pomUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pomUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. URL to access the pom file of the artifact.
+   * Example:
+   * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
+   * 
+ * + * string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for pomUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPomUriBytes() { + java.lang.Object ref = pomUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pomUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + * + * + *
+   * Group ID for the artifact.
+   * Example:
+   * com.google.guava
+   * 
+ * + * string group_id = 3; + * + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + * + * + *
+   * Group ID for the artifact.
+   * Example:
+   * com.google.guava
+   * 
+ * + * string group_id = 3; + * + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIFACT_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object artifactId_ = ""; + /** + * + * + *
+   * Artifact ID for the artifact.
+   * 
+ * + * string artifact_id = 4; + * + * @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; + } + } + /** + * + * + *
+   * Artifact ID for the artifact.
+   * 
+ * + * string artifact_id = 4; + * + * @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; + } + } + + public static final int VERSION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * Version of this artifact.
+   * 
+ * + * string version = 5; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Version of this artifact.
+   * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time the artifact was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time the artifact was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.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. Time the artifact was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time the artifact was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time the artifact was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.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. Time the artifact was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pomUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pomUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, groupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, artifactId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(7, getUpdateTime()); + } + getUnknownFields().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(pomUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pomUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, groupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, artifactId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.MavenArtifact)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.MavenArtifact other = + (com.google.devtools.artifactregistry.v1.MavenArtifact) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPomUri().equals(other.getPomUri())) return false; + if (!getGroupId().equals(other.getGroupId())) return false; + if (!getArtifactId().equals(other.getArtifactId())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + POM_URI_FIELD_NUMBER; + hash = (53 * hash) + getPomUri().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (37 * hash) + ARTIFACT_ID_FIELD_NUMBER; + hash = (53 * hash) + getArtifactId().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.MavenArtifact parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.MavenArtifact parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.MavenArtifact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.MavenArtifact 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.devtools.artifactregistry.v1.MavenArtifact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.MavenArtifact parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.MavenArtifact parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.MavenArtifact 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.devtools.artifactregistry.v1.MavenArtifact parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.MavenArtifact 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.devtools.artifactregistry.v1.MavenArtifact parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.MavenArtifact 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.devtools.artifactregistry.v1.MavenArtifact 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; + } + /** + * + * + *
+   * MavenArtifact represents a maven artifact.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.MavenArtifact} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.MavenArtifact) + com.google.devtools.artifactregistry.v1.MavenArtifactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_MavenArtifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_MavenArtifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.MavenArtifact.class, + com.google.devtools.artifactregistry.v1.MavenArtifact.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.MavenArtifact.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + pomUri_ = ""; + groupId_ = ""; + artifactId_ = ""; + version_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_MavenArtifact_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.MavenArtifact getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.MavenArtifact.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.MavenArtifact build() { + com.google.devtools.artifactregistry.v1.MavenArtifact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.MavenArtifact buildPartial() { + com.google.devtools.artifactregistry.v1.MavenArtifact result = + new com.google.devtools.artifactregistry.v1.MavenArtifact(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devtools.artifactregistry.v1.MavenArtifact result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pomUri_ = pomUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.artifactId_ = artifactId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + } + + @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.devtools.artifactregistry.v1.MavenArtifact) { + return mergeFrom((com.google.devtools.artifactregistry.v1.MavenArtifact) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.MavenArtifact other) { + if (other == com.google.devtools.artifactregistry.v1.MavenArtifact.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPomUri().isEmpty()) { + pomUri_ = other.pomUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getArtifactId().isEmpty()) { + artifactId_ = other.artifactId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + pomUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + artifactId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and maven_artifact
+     * forms a unique artifact For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
+     * com.google.guava:guava:31.0-jre",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * "com.google.guava:guava:31.0-jre"
+     * is the maven artifact.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and maven_artifact
+     * forms a unique artifact For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
+     * com.google.guava:guava:31.0-jre",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * "com.google.guava:guava:31.0-jre"
+     * is the maven artifact.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and maven_artifact
+     * forms a unique artifact For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
+     * com.google.guava:guava:31.0-jre",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * "com.google.guava:guava:31.0-jre"
+     * is the maven artifact.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and maven_artifact
+     * forms a unique artifact For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
+     * com.google.guava:guava:31.0-jre",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * "com.google.guava:guava:31.0-jre"
+     * is the maven artifact.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and maven_artifact
+     * forms a unique artifact For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
+     * com.google.guava:guava:31.0-jre",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * "com.google.guava:guava:31.0-jre"
+     * is the maven artifact.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object pomUri_ = ""; + /** + * + * + *
+     * Required. URL to access the pom file of the artifact.
+     * Example:
+     * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
+     * 
+ * + * string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pomUri. + */ + public java.lang.String getPomUri() { + java.lang.Object ref = pomUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pomUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. URL to access the pom file of the artifact.
+     * Example:
+     * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
+     * 
+ * + * string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for pomUri. + */ + public com.google.protobuf.ByteString getPomUriBytes() { + java.lang.Object ref = pomUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pomUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. URL to access the pom file of the artifact.
+     * Example:
+     * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
+     * 
+ * + * string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The pomUri to set. + * @return This builder for chaining. + */ + public Builder setPomUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pomUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. URL to access the pom file of the artifact.
+     * Example:
+     * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
+     * 
+ * + * string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPomUri() { + pomUri_ = getDefaultInstance().getPomUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. URL to access the pom file of the artifact.
+     * Example:
+     * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
+     * 
+ * + * string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for pomUri to set. + * @return This builder for chaining. + */ + public Builder setPomUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pomUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object groupId_ = ""; + /** + * + * + *
+     * Group ID for the artifact.
+     * Example:
+     * com.google.guava
+     * 
+ * + * string group_id = 3; + * + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Group ID for the artifact.
+     * Example:
+     * com.google.guava
+     * 
+ * + * string group_id = 3; + * + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Group ID for the artifact.
+     * Example:
+     * com.google.guava
+     * 
+ * + * string group_id = 3; + * + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + groupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Group ID for the artifact.
+     * Example:
+     * com.google.guava
+     * 
+ * + * string group_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Group ID for the artifact.
+     * Example:
+     * com.google.guava
+     * 
+ * + * string group_id = 3; + * + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object artifactId_ = ""; + /** + * + * + *
+     * Artifact ID for the artifact.
+     * 
+ * + * string artifact_id = 4; + * + * @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; + } + } + /** + * + * + *
+     * Artifact ID for the artifact.
+     * 
+ * + * string artifact_id = 4; + * + * @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; + } + } + /** + * + * + *
+     * Artifact ID for the artifact.
+     * 
+ * + * string artifact_id = 4; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Artifact ID for the artifact.
+     * 
+ * + * string artifact_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearArtifactId() { + artifactId_ = getDefaultInstance().getArtifactId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Artifact ID for the artifact.
+     * 
+ * + * string artifact_id = 4; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Version of this artifact.
+     * 
+ * + * string version = 5; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of this artifact.
+     * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of this artifact.
+     * 
+ * + * string version = 5; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of this artifact.
+     * 
+ * + * string version = 5; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of this artifact.
+     * 
+ * + * string version = 5; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000010; + 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. Time the artifact was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. Time the artifact was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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. Time the artifact was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the artifact was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the artifact was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the artifact was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the artifact was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the artifact was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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. Time the artifact was created.
+     * 
+ * + * + * .google.protobuf.Timestamp 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> + 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. Time the artifact was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Time the artifact was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.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. Time the artifact was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the artifact was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the artifact was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the artifact was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the artifact was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the artifact was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.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. Time the artifact was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp 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> + 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_; + } + + @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.devtools.artifactregistry.v1.MavenArtifact) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.MavenArtifact) + private static final com.google.devtools.artifactregistry.v1.MavenArtifact DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.MavenArtifact(); + } + + public static com.google.devtools.artifactregistry.v1.MavenArtifact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MavenArtifact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.MavenArtifact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifactName.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifactName.java new file mode 100644 index 000000000000..7b4bbcad5a7e --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifactName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devtools.artifactregistry.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 MavenArtifactName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_REPOSITORY_MAVEN_ARTIFACT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String repository; + private final String mavenArtifact; + + @Deprecated + protected MavenArtifactName() { + project = null; + location = null; + repository = null; + mavenArtifact = null; + } + + private MavenArtifactName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + repository = Preconditions.checkNotNull(builder.getRepository()); + mavenArtifact = Preconditions.checkNotNull(builder.getMavenArtifact()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getMavenArtifact() { + return mavenArtifact; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static MavenArtifactName of( + String project, String location, String repository, String mavenArtifact) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setMavenArtifact(mavenArtifact) + .build(); + } + + public static String format( + String project, String location, String repository, String mavenArtifact) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setMavenArtifact(mavenArtifact) + .build() + .toString(); + } + + public static MavenArtifactName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_REPOSITORY_MAVEN_ARTIFACT.validatedMatch( + formattedString, "MavenArtifactName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("repository"), + matchMap.get("maven_artifact")); + } + + 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 (MavenArtifactName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_REPOSITORY_MAVEN_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 (repository != null) { + fieldMapBuilder.put("repository", repository); + } + if (mavenArtifact != null) { + fieldMapBuilder.put("maven_artifact", mavenArtifact); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_REPOSITORY_MAVEN_ARTIFACT.instantiate( + "project", + project, + "location", + location, + "repository", + repository, + "maven_artifact", + mavenArtifact); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + MavenArtifactName that = ((MavenArtifactName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.repository, that.repository) + && Objects.equals(this.mavenArtifact, that.mavenArtifact); + } + 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(repository); + h *= 1000003; + h ^= Objects.hashCode(mavenArtifact); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}. + */ + public static class Builder { + private String project; + private String location; + private String repository; + private String mavenArtifact; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getMavenArtifact() { + return mavenArtifact; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRepository(String repository) { + this.repository = repository; + return this; + } + + public Builder setMavenArtifact(String mavenArtifact) { + this.mavenArtifact = mavenArtifact; + return this; + } + + private Builder(MavenArtifactName mavenArtifactName) { + this.project = mavenArtifactName.project; + this.location = mavenArtifactName.location; + this.repository = mavenArtifactName.repository; + this.mavenArtifact = mavenArtifactName.mavenArtifact; + } + + public MavenArtifactName build() { + return new MavenArtifactName(this); + } + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifactOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifactOrBuilder.java new file mode 100644 index 000000000000..1168b75d8b44 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/MavenArtifactOrBuilder.java @@ -0,0 +1,248 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface MavenArtifactOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.MavenArtifact) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and maven_artifact
+   * forms a unique artifact For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
+   * com.google.guava:guava:31.0-jre",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * "com.google.guava:guava:31.0-jre"
+   * is the maven artifact.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and maven_artifact
+   * forms a unique artifact For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
+   * com.google.guava:guava:31.0-jre",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * "com.google.guava:guava:31.0-jre"
+   * is the maven artifact.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. URL to access the pom file of the artifact.
+   * Example:
+   * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
+   * 
+ * + * string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pomUri. + */ + java.lang.String getPomUri(); + /** + * + * + *
+   * Required. URL to access the pom file of the artifact.
+   * Example:
+   * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
+   * 
+ * + * string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for pomUri. + */ + com.google.protobuf.ByteString getPomUriBytes(); + + /** + * + * + *
+   * Group ID for the artifact.
+   * Example:
+   * com.google.guava
+   * 
+ * + * string group_id = 3; + * + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + * + * + *
+   * Group ID for the artifact.
+   * Example:
+   * com.google.guava
+   * 
+ * + * string group_id = 3; + * + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString getGroupIdBytes(); + + /** + * + * + *
+   * Artifact ID for the artifact.
+   * 
+ * + * string artifact_id = 4; + * + * @return The artifactId. + */ + java.lang.String getArtifactId(); + /** + * + * + *
+   * Artifact ID for the artifact.
+   * 
+ * + * string artifact_id = 4; + * + * @return The bytes for artifactId. + */ + com.google.protobuf.ByteString getArtifactIdBytes(); + + /** + * + * + *
+   * Version of this artifact.
+   * 
+ * + * string version = 5; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Version of this artifact.
+   * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Output only. Time the artifact was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time the artifact was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time the artifact was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time the artifact was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time the artifact was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time the artifact was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackage.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackage.java new file mode 100644 index 000000000000..ad35da217acd --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackage.java @@ -0,0 +1,1874 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * NpmPackage represents an npm artifact.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.NpmPackage} + */ +public final class NpmPackage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.NpmPackage) + NpmPackageOrBuilder { + private static final long serialVersionUID = 0L; + // Use NpmPackage.newBuilder() to construct. + private NpmPackage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NpmPackage() { + name_ = ""; + packageName_ = ""; + version_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NpmPackage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_NpmPackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_NpmPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.NpmPackage.class, + com.google.devtools.artifactregistry.v1.NpmPackage.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and npm_package
+   * forms a unique package For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/
+   * npm_test:1.0.0",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * npm_test:1.0.0" is the npm package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and npm_package
+   * forms a unique package For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/
+   * npm_test:1.0.0",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * npm_test:1.0.0" is the npm package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PACKAGE_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object packageName_ = ""; + /** + * + * + *
+   * Package for the artifact.
+   * 
+ * + * string package_name = 3; + * + * @return The packageName. + */ + @java.lang.Override + public java.lang.String getPackageName() { + java.lang.Object ref = packageName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageName_ = s; + return s; + } + } + /** + * + * + *
+   * Package for the artifact.
+   * 
+ * + * string package_name = 3; + * + * @return The bytes for packageName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPackageNameBytes() { + java.lang.Object ref = packageName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + packageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * Version of this package.
+   * 
+ * + * string version = 4; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Version of this package.
+   * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAGS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList tags_; + /** + * + * + *
+   * Tags attached to this package.
+   * 
+ * + * repeated string tags = 5; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_; + } + /** + * + * + *
+   * Tags attached to this package.
+   * 
+ * + * repeated string tags = 5; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+   * Tags attached to this package.
+   * 
+ * + * repeated string tags = 5; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+   * Tags attached to this package.
+   * 
+ * + * repeated string tags = 5; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.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. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.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. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, packageName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, tags_.getRaw(i)); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(7, getUpdateTime()); + } + getUnknownFields().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(packageName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, packageName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.NpmPackage)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.NpmPackage other = + (com.google.devtools.artifactregistry.v1.NpmPackage) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPackageName().equals(other.getPackageName())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PACKAGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPackageName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.NpmPackage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.NpmPackage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.NpmPackage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.NpmPackage 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.devtools.artifactregistry.v1.NpmPackage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.NpmPackage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.NpmPackage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.NpmPackage 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.devtools.artifactregistry.v1.NpmPackage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.NpmPackage 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.devtools.artifactregistry.v1.NpmPackage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.NpmPackage 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.devtools.artifactregistry.v1.NpmPackage 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; + } + /** + * + * + *
+   * NpmPackage represents an npm artifact.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.NpmPackage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.NpmPackage) + com.google.devtools.artifactregistry.v1.NpmPackageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_NpmPackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_NpmPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.NpmPackage.class, + com.google.devtools.artifactregistry.v1.NpmPackage.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.NpmPackage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + packageName_ = ""; + version_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_NpmPackage_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.NpmPackage getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.NpmPackage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.NpmPackage build() { + com.google.devtools.artifactregistry.v1.NpmPackage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.NpmPackage buildPartial() { + com.google.devtools.artifactregistry.v1.NpmPackage result = + new com.google.devtools.artifactregistry.v1.NpmPackage(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devtools.artifactregistry.v1.NpmPackage result) { + if (((bitField0_ & 0x00000008) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.tags_ = tags_; + } + + private void buildPartial0(com.google.devtools.artifactregistry.v1.NpmPackage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.packageName_ = packageName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + } + + @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.devtools.artifactregistry.v1.NpmPackage) { + return mergeFrom((com.google.devtools.artifactregistry.v1.NpmPackage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.NpmPackage other) { + if (other == com.google.devtools.artifactregistry.v1.NpmPackage.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPackageName().isEmpty()) { + packageName_ = other.packageName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + packageName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 42 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and npm_package
+     * forms a unique package For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/
+     * npm_test:1.0.0",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * npm_test:1.0.0" is the npm package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and npm_package
+     * forms a unique package For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/
+     * npm_test:1.0.0",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * npm_test:1.0.0" is the npm package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and npm_package
+     * forms a unique package For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/
+     * npm_test:1.0.0",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * npm_test:1.0.0" is the npm package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and npm_package
+     * forms a unique package For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/
+     * npm_test:1.0.0",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * npm_test:1.0.0" is the npm package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and npm_package
+     * forms a unique package For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/
+     * npm_test:1.0.0",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * npm_test:1.0.0" is the npm package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object packageName_ = ""; + /** + * + * + *
+     * Package for the artifact.
+     * 
+ * + * string package_name = 3; + * + * @return The packageName. + */ + public java.lang.String getPackageName() { + java.lang.Object ref = packageName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Package for the artifact.
+     * 
+ * + * string package_name = 3; + * + * @return The bytes for packageName. + */ + public com.google.protobuf.ByteString getPackageNameBytes() { + java.lang.Object ref = packageName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + packageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Package for the artifact.
+     * 
+ * + * string package_name = 3; + * + * @param value The packageName to set. + * @return This builder for chaining. + */ + public Builder setPackageName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + packageName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Package for the artifact.
+     * 
+ * + * string package_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearPackageName() { + packageName_ = getDefaultInstance().getPackageName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Package for the artifact.
+     * 
+ * + * string package_name = 3; + * + * @param value The bytes for packageName to set. + * @return This builder for chaining. + */ + public Builder setPackageNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + packageName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Version of this package.
+     * 
+ * + * string version = 4; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of this package.
+     * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of this package.
+     * 
+ * + * string version = 4; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of this package.
+     * 
+ * + * string version = 4; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of this package.
+     * 
+ * + * string version = 4; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList tags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * Tags attached to this package.
+     * 
+ * + * repeated string tags = 5; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Tags attached to this package.
+     * 
+ * + * repeated string tags = 5; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+     * Tags attached to this package.
+     * 
+ * + * repeated string tags = 5; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+     * Tags attached to this package.
+     * 
+ * + * repeated string tags = 5; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + * + * + *
+     * Tags attached to this package.
+     * 
+ * + * repeated string tags = 5; + * + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Tags attached to this package.
+     * 
+ * + * repeated string tags = 5; + * + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Tags attached to this package.
+     * 
+ * + * repeated string tags = 5; + * + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags(java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); + onChanged(); + return this; + } + /** + * + * + *
+     * Tags attached to this package.
+     * 
+ * + * repeated string tags = 5; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Tags attached to this package.
+     * 
+ * + * repeated string tags = 5; + * + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(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. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp 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> + 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. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.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. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.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. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp 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> + 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_; + } + + @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.devtools.artifactregistry.v1.NpmPackage) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.NpmPackage) + private static final com.google.devtools.artifactregistry.v1.NpmPackage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.NpmPackage(); + } + + public static com.google.devtools.artifactregistry.v1.NpmPackage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NpmPackage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.NpmPackage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackageName.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackageName.java new file mode 100644 index 000000000000..f3be0cc4ebf1 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackageName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devtools.artifactregistry.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 NpmPackageName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_REPOSITORY_NPM_PACKAGE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String repository; + private final String npmPackage; + + @Deprecated + protected NpmPackageName() { + project = null; + location = null; + repository = null; + npmPackage = null; + } + + private NpmPackageName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + repository = Preconditions.checkNotNull(builder.getRepository()); + npmPackage = Preconditions.checkNotNull(builder.getNpmPackage()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getNpmPackage() { + return npmPackage; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NpmPackageName of( + String project, String location, String repository, String npmPackage) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setNpmPackage(npmPackage) + .build(); + } + + public static String format( + String project, String location, String repository, String npmPackage) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setNpmPackage(npmPackage) + .build() + .toString(); + } + + public static NpmPackageName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_REPOSITORY_NPM_PACKAGE.validatedMatch( + formattedString, "NpmPackageName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("repository"), + matchMap.get("npm_package")); + } + + 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 (NpmPackageName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_REPOSITORY_NPM_PACKAGE.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 (repository != null) { + fieldMapBuilder.put("repository", repository); + } + if (npmPackage != null) { + fieldMapBuilder.put("npm_package", npmPackage); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_REPOSITORY_NPM_PACKAGE.instantiate( + "project", + project, + "location", + location, + "repository", + repository, + "npm_package", + npmPackage); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + NpmPackageName that = ((NpmPackageName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.repository, that.repository) + && Objects.equals(this.npmPackage, that.npmPackage); + } + 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(repository); + h *= 1000003; + h ^= Objects.hashCode(npmPackage); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}. + */ + public static class Builder { + private String project; + private String location; + private String repository; + private String npmPackage; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getNpmPackage() { + return npmPackage; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRepository(String repository) { + this.repository = repository; + return this; + } + + public Builder setNpmPackage(String npmPackage) { + this.npmPackage = npmPackage; + return this; + } + + private Builder(NpmPackageName npmPackageName) { + this.project = npmPackageName.project; + this.location = npmPackageName.location; + this.repository = npmPackageName.repository; + this.npmPackage = npmPackageName.npmPackage; + } + + public NpmPackageName build() { + return new NpmPackageName(this); + } + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackageOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackageOrBuilder.java new file mode 100644 index 000000000000..753b1b0c872f --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/NpmPackageOrBuilder.java @@ -0,0 +1,239 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface NpmPackageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.NpmPackage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and npm_package
+   * forms a unique package For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/
+   * npm_test:1.0.0",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * npm_test:1.0.0" is the npm package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and npm_package
+   * forms a unique package For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/
+   * npm_test:1.0.0",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * npm_test:1.0.0" is the npm package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Package for the artifact.
+   * 
+ * + * string package_name = 3; + * + * @return The packageName. + */ + java.lang.String getPackageName(); + /** + * + * + *
+   * Package for the artifact.
+   * 
+ * + * string package_name = 3; + * + * @return The bytes for packageName. + */ + com.google.protobuf.ByteString getPackageNameBytes(); + + /** + * + * + *
+   * Version of this package.
+   * 
+ * + * string version = 4; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Version of this package.
+   * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Tags attached to this package.
+   * 
+ * + * repeated string tags = 5; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + /** + * + * + *
+   * Tags attached to this package.
+   * 
+ * + * repeated string tags = 5; + * + * @return The count of tags. + */ + int getTagsCount(); + /** + * + * + *
+   * Tags attached to this package.
+   * 
+ * + * repeated string tags = 5; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + * + * + *
+   * Tags attached to this package.
+   * 
+ * + * repeated string tags = 5; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString getTagsBytes(int index); + + /** + * + * + *
+   * Output only. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageName.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageName.java new file mode 100644 index 000000000000..9c39cdd31353 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageName.java @@ -0,0 +1,261 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devtools.artifactregistry.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 PackageName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_REPOSITORY_PACKAGE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String repository; + private final String package_; + + @Deprecated + protected PackageName() { + project = null; + location = null; + repository = null; + package_ = null; + } + + private PackageName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + repository = Preconditions.checkNotNull(builder.getRepository()); + package_ = Preconditions.checkNotNull(builder.getPackage()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getPackage() { + return package_; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PackageName of( + String project, String location, String repository, String package_) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setPackage(package_) + .build(); + } + + public static String format(String project, String location, String repository, String package_) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setPackage(package_) + .build() + .toString(); + } + + public static PackageName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_REPOSITORY_PACKAGE.validatedMatch( + formattedString, "PackageName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("repository"), + matchMap.get("package")); + } + + 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 (PackageName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_REPOSITORY_PACKAGE.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 (repository != null) { + fieldMapBuilder.put("repository", repository); + } + if (package_ != null) { + fieldMapBuilder.put("package", package_); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_REPOSITORY_PACKAGE.instantiate( + "project", project, "location", location, "repository", repository, "package", package_); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + PackageName that = ((PackageName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.repository, that.repository) + && Objects.equals(this.package_, that.package_); + } + 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(repository); + h *= 1000003; + h ^= Objects.hashCode(package_); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/repositories/{repository}/packages/{package}. + */ + public static class Builder { + private String project; + private String location; + private String repository; + private String package_; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getPackage() { + return package_; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRepository(String repository) { + this.repository = repository; + return this; + } + + public Builder setPackage(String package_) { + this.package_ = package_; + return this; + } + + private Builder(PackageName packageName) { + this.project = packageName.project; + this.location = packageName.location; + this.repository = packageName.repository; + this.package_ = packageName.package_; + } + + public PackageName build() { + return new PackageName(this); + } + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageProto.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageProto.java index 38b252eca039..45d747cb96a0 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageProto.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageProto.java @@ -59,30 +59,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n1google/devtools/artifactregistry/v1/pa" + "ckage.proto\022#google.devtools.artifactreg" + "istry.v1\032\037google/api/field_behavior.prot" - + "o\032\037google/protobuf/timestamp.proto\"\217\001\n\007P" - + "ackage\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001" - + "(\t\022/\n\013create_time\030\005 \001(\0132\032.google.protobu" - + "f.Timestamp\022/\n\013update_time\030\006 \001(\0132\032.googl" - + "e.protobuf.Timestamp\"Q\n\023ListPackagesRequ" - + "est\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030\002 " - + "\001(\005\022\022\n\npage_token\030\003 \001(\t\"o\n\024ListPackagesR" - + "esponse\022>\n\010packages\030\001 \003(\0132,.google.devto" - + "ols.artifactregistry.v1.Package\022\027\n\017next_" - + "page_token\030\002 \001(\t\"&\n\021GetPackageRequest\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\002\")\n\024DeletePackageRequest" - + "\022\021\n\004name\030\001 \001(\tB\003\340A\002B\372\001\n\'com.google.devto" - + "ols.artifactregistry.v1B\014PackageProtoP\001Z" - + "Sgoogle.golang.org/genproto/googleapis/d" - + "evtools/artifactregistry/v1;artifactregi" - + "stry\252\002 Google.Cloud.ArtifactRegistry.V1\312" - + "\002 Google\\Cloud\\ArtifactRegistry\\V1\352\002#Goo" - + "gle::Cloud::ArtifactRegistry::V1b\006proto3" + + "o\032\031google/api/resource.proto\032\037google/pro" + + "tobuf/timestamp.proto\"\224\002\n\007Package\022\014\n\004nam" + + "e\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022/\n\013create_" + + "time\030\005 \001(\0132\032.google.protobuf.Timestamp\022/" + + "\n\013update_time\030\006 \001(\0132\032.google.protobuf.Ti" + + "mestamp:\202\001\352A\177\n\'artifactregistry.googleap" + + "is.com/Package\022Tprojects/{project}/locat" + + "ions/{location}/repositories/{repository" + + "}/packages/{package}\"}\n\023ListPackagesRequ" + + "est\022?\n\006parent\030\001 \001(\tB/\340A\002\372A)\022\'artifactreg" + + "istry.googleapis.com/Package\022\021\n\tpage_siz" + + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"o\n\024ListPacka" + + "gesResponse\022>\n\010packages\030\001 \003(\0132,.google.d" + + "evtools.artifactregistry.v1.Package\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\"R\n\021GetPackageReques" + + "t\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'artifactregistr" + + "y.googleapis.com/Package\"U\n\024DeletePackag" + + "eRequest\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'artifact" + + "registry.googleapis.com/PackageB\372\001\n\'com." + + "google.devtools.artifactregistry.v1B\014Pac" + + "kageProtoP\001ZSgoogle.golang.org/genproto/" + + "googleapis/devtools/artifactregistry/v1;" + + "artifactregistry\252\002 Google.Cloud.Artifact" + + "Registry.V1\312\002 Google\\Cloud\\ArtifactRegis" + + "try\\V1\352\002#Google::Cloud::ArtifactRegistry" + + "::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_devtools_artifactregistry_v1_Package_descriptor = @@ -128,9 +137,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ProjectSettings.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ProjectSettings.java index b4bb4a34047b..eac0abe94240 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ProjectSettings.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ProjectSettings.java @@ -115,8 +115,9 @@ public enum RedirectionState implements com.google.protobuf.ProtocolMessageEnum * Redirection is enabled, and has been finalized so cannot be reverted. * * - * REDIRECTION_FROM_GCR_IO_FINALIZED = 3; + * REDIRECTION_FROM_GCR_IO_FINALIZED = 3 [deprecated = true]; */ + @java.lang.Deprecated REDIRECTION_FROM_GCR_IO_FINALIZED(3), UNRECOGNIZED(-1), ; @@ -158,9 +159,9 @@ public enum RedirectionState implements com.google.protobuf.ProtocolMessageEnum * Redirection is enabled, and has been finalized so cannot be reverted. * * - * REDIRECTION_FROM_GCR_IO_FINALIZED = 3; + * REDIRECTION_FROM_GCR_IO_FINALIZED = 3 [deprecated = true]; */ - public static final int REDIRECTION_FROM_GCR_IO_FINALIZED_VALUE = 3; + @java.lang.Deprecated public static final int REDIRECTION_FROM_GCR_IO_FINALIZED_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackage.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackage.java new file mode 100644 index 000000000000..44499a4305ce --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackage.java @@ -0,0 +1,1808 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * PythonPackage represents a python artifact.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.PythonPackage} + */ +public final class PythonPackage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.PythonPackage) + PythonPackageOrBuilder { + private static final long serialVersionUID = 0L; + // Use PythonPackage.newBuilder() to construct. + private PythonPackage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PythonPackage() { + name_ = ""; + uri_ = ""; + packageName_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PythonPackage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_PythonPackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_PythonPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.PythonPackage.class, + com.google.devtools.artifactregistry.v1.PythonPackage.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and python_package
+   * forms a unique package
+   * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/pythonPackages/<python_package>`.
+   * For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/
+   * python_package:1.0.0",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * python_package:1.0.0" is the python package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and python_package
+   * forms a unique package
+   * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/pythonPackages/<python_package>`.
+   * For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/
+   * python_package:1.0.0",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * python_package:1.0.0" is the python package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * Required. URL to access the package.
+   * Example:
+   * us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. URL to access the package.
+   * Example:
+   * us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PACKAGE_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object packageName_ = ""; + /** + * + * + *
+   * Package for the artifact.
+   * 
+ * + * string package_name = 3; + * + * @return The packageName. + */ + @java.lang.Override + public java.lang.String getPackageName() { + java.lang.Object ref = packageName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageName_ = s; + return s; + } + } + /** + * + * + *
+   * Package for the artifact.
+   * 
+ * + * string package_name = 3; + * + * @return The bytes for packageName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPackageNameBytes() { + java.lang.Object ref = packageName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + packageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * Version of this package.
+   * 
+ * + * string version = 4; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Version of this package.
+   * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.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. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.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. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, packageName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(7, getUpdateTime()); + } + getUnknownFields().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(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, packageName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.PythonPackage)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.PythonPackage other = + (com.google.devtools.artifactregistry.v1.PythonPackage) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getPackageName().equals(other.getPackageName())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + PACKAGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPackageName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.PythonPackage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.PythonPackage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.PythonPackage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.PythonPackage 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.devtools.artifactregistry.v1.PythonPackage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.PythonPackage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.PythonPackage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.PythonPackage 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.devtools.artifactregistry.v1.PythonPackage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.PythonPackage 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.devtools.artifactregistry.v1.PythonPackage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.PythonPackage 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.devtools.artifactregistry.v1.PythonPackage 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; + } + /** + * + * + *
+   * PythonPackage represents a python artifact.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.PythonPackage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.PythonPackage) + com.google.devtools.artifactregistry.v1.PythonPackageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_PythonPackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_PythonPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.PythonPackage.class, + com.google.devtools.artifactregistry.v1.PythonPackage.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.PythonPackage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uri_ = ""; + packageName_ = ""; + version_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.ArtifactProto + .internal_static_google_devtools_artifactregistry_v1_PythonPackage_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.PythonPackage getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.PythonPackage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.PythonPackage build() { + com.google.devtools.artifactregistry.v1.PythonPackage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.PythonPackage buildPartial() { + com.google.devtools.artifactregistry.v1.PythonPackage result = + new com.google.devtools.artifactregistry.v1.PythonPackage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devtools.artifactregistry.v1.PythonPackage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.packageName_ = packageName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + } + + @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.devtools.artifactregistry.v1.PythonPackage) { + return mergeFrom((com.google.devtools.artifactregistry.v1.PythonPackage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.PythonPackage other) { + if (other == com.google.devtools.artifactregistry.v1.PythonPackage.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPackageName().isEmpty()) { + packageName_ = other.packageName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + packageName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and python_package
+     * forms a unique package
+     * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/pythonPackages/<python_package>`.
+     * For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/
+     * python_package:1.0.0",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * python_package:1.0.0" is the python package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and python_package
+     * forms a unique package
+     * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/pythonPackages/<python_package>`.
+     * For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/
+     * python_package:1.0.0",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * python_package:1.0.0" is the python package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and python_package
+     * forms a unique package
+     * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/pythonPackages/<python_package>`.
+     * For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/
+     * python_package:1.0.0",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * python_package:1.0.0" is the python package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and python_package
+     * forms a unique package
+     * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/pythonPackages/<python_package>`.
+     * For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/
+     * python_package:1.0.0",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * python_package:1.0.0" is the python package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. registry_location, project_id, repository_name and python_package
+     * forms a unique package
+     * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/pythonPackages/<python_package>`.
+     * For example,
+     * "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/
+     * python_package:1.0.0",
+     * where "us-west4" is the registry_location, "test-project" is the
+     * project_id, "test-repo" is the repository_name and
+     * python_package:1.0.0" is the python package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * Required. URL to access the package.
+     * Example:
+     * us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. URL to access the package.
+     * Example:
+     * us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. URL to access the package.
+     * Example:
+     * us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. URL to access the package.
+     * Example:
+     * us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. URL to access the package.
+     * Example:
+     * us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object packageName_ = ""; + /** + * + * + *
+     * Package for the artifact.
+     * 
+ * + * string package_name = 3; + * + * @return The packageName. + */ + public java.lang.String getPackageName() { + java.lang.Object ref = packageName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Package for the artifact.
+     * 
+ * + * string package_name = 3; + * + * @return The bytes for packageName. + */ + public com.google.protobuf.ByteString getPackageNameBytes() { + java.lang.Object ref = packageName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + packageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Package for the artifact.
+     * 
+ * + * string package_name = 3; + * + * @param value The packageName to set. + * @return This builder for chaining. + */ + public Builder setPackageName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + packageName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Package for the artifact.
+     * 
+ * + * string package_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearPackageName() { + packageName_ = getDefaultInstance().getPackageName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Package for the artifact.
+     * 
+ * + * string package_name = 3; + * + * @param value The bytes for packageName to set. + * @return This builder for chaining. + */ + public Builder setPackageNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + packageName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Version of this package.
+     * 
+ * + * string version = 4; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of this package.
+     * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of this package.
+     * 
+ * + * string version = 4; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of this package.
+     * 
+ * + * string version = 4; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of this package.
+     * 
+ * + * string version = 4; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000008; + 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. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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. Time the package was created.
+     * 
+ * + * + * .google.protobuf.Timestamp 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> + 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. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.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. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.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. Time the package was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp 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> + 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_; + } + + @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.devtools.artifactregistry.v1.PythonPackage) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.PythonPackage) + private static final com.google.devtools.artifactregistry.v1.PythonPackage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.PythonPackage(); + } + + public static com.google.devtools.artifactregistry.v1.PythonPackage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PythonPackage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.PythonPackage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackageName.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackageName.java new file mode 100644 index 000000000000..714217ab4d1b --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackageName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devtools.artifactregistry.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 PythonPackageName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_REPOSITORY_PYTHON_PACKAGE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String repository; + private final String pythonPackage; + + @Deprecated + protected PythonPackageName() { + project = null; + location = null; + repository = null; + pythonPackage = null; + } + + private PythonPackageName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + repository = Preconditions.checkNotNull(builder.getRepository()); + pythonPackage = Preconditions.checkNotNull(builder.getPythonPackage()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getPythonPackage() { + return pythonPackage; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PythonPackageName of( + String project, String location, String repository, String pythonPackage) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setPythonPackage(pythonPackage) + .build(); + } + + public static String format( + String project, String location, String repository, String pythonPackage) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setPythonPackage(pythonPackage) + .build() + .toString(); + } + + public static PythonPackageName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_REPOSITORY_PYTHON_PACKAGE.validatedMatch( + formattedString, "PythonPackageName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("repository"), + matchMap.get("python_package")); + } + + 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 (PythonPackageName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_REPOSITORY_PYTHON_PACKAGE.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 (repository != null) { + fieldMapBuilder.put("repository", repository); + } + if (pythonPackage != null) { + fieldMapBuilder.put("python_package", pythonPackage); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_REPOSITORY_PYTHON_PACKAGE.instantiate( + "project", + project, + "location", + location, + "repository", + repository, + "python_package", + pythonPackage); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + PythonPackageName that = ((PythonPackageName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.repository, that.repository) + && Objects.equals(this.pythonPackage, that.pythonPackage); + } + 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(repository); + h *= 1000003; + h ^= Objects.hashCode(pythonPackage); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}. + */ + public static class Builder { + private String project; + private String location; + private String repository; + private String pythonPackage; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getPythonPackage() { + return pythonPackage; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRepository(String repository) { + this.repository = repository; + return this; + } + + public Builder setPythonPackage(String pythonPackage) { + this.pythonPackage = pythonPackage; + return this; + } + + private Builder(PythonPackageName pythonPackageName) { + this.project = pythonPackageName.project; + this.location = pythonPackageName.location; + this.repository = pythonPackageName.repository; + this.pythonPackage = pythonPackageName.pythonPackage; + } + + public PythonPackageName build() { + return new PythonPackageName(this); + } + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackageOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackageOrBuilder.java new file mode 100644 index 000000000000..5d5d597f8ef3 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PythonPackageOrBuilder.java @@ -0,0 +1,221 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/artifact.proto + +package com.google.devtools.artifactregistry.v1; + +public interface PythonPackageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.PythonPackage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and python_package
+   * forms a unique package
+   * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/pythonPackages/<python_package>`.
+   * For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/
+   * python_package:1.0.0",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * python_package:1.0.0" is the python package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. registry_location, project_id, repository_name and python_package
+   * forms a unique package
+   * name:`projects/<project_id>/locations/<location>/repository/<repository_name>/pythonPackages/<python_package>`.
+   * For example,
+   * "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/
+   * python_package:1.0.0",
+   * where "us-west4" is the registry_location, "test-project" is the
+   * project_id, "test-repo" is the repository_name and
+   * python_package:1.0.0" is the python package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. URL to access the package.
+   * Example:
+   * us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * Required. URL to access the package.
+   * Example:
+   * us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Package for the artifact.
+   * 
+ * + * string package_name = 3; + * + * @return The packageName. + */ + java.lang.String getPackageName(); + /** + * + * + *
+   * Package for the artifact.
+   * 
+ * + * string package_name = 3; + * + * @return The bytes for packageName. + */ + com.google.protobuf.ByteString getPackageNameBytes(); + + /** + * + * + *
+   * Version of this package.
+   * 
+ * + * string version = 4; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Version of this package.
+   * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Output only. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time the package was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time the package was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ServiceProto.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ServiceProto.java index c1ef77d8e8f5..c83fefc959cb 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ServiceProto.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ServiceProto.java @@ -54,173 +54,219 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "1/settings.proto\032-google/devtools/artifa" + "ctregistry/v1/tag.proto\0321google/devtools" + "/artifactregistry/v1/version.proto\0326goog" - + "le/devtools/artifactregistry/v1/yum_arti" - + "fact.proto\032\036google/iam/v1/iam_policy.pro" - + "to\032\032google/iam/v1/policy.proto\032#google/l" - + "ongrunning/operations.proto\032\033google/prot" - + "obuf/empty.proto\"\023\n\021OperationMetadata2\2700" - + "\n\020ArtifactRegistry\022\341\001\n\020ListDockerImages\022" - + "<.google.devtools.artifactregistry.v1.Li" - + "stDockerImagesRequest\032=.google.devtools." - + "artifactregistry.v1.ListDockerImagesResp" - + "onse\"P\202\323\344\223\002A\022?/v1/{parent=projects/*/loc" - + "ations/*/repositories/*}/dockerImages\332A\006" - + "parent\022\316\001\n\016GetDockerImage\022:.google.devto" - + "ols.artifactregistry.v1.GetDockerImageRe" - + "quest\0320.google.devtools.artifactregistry" - + ".v1.DockerImage\"N\202\323\344\223\002A\022?/v1/{name=proje" - + "cts/*/locations/*/repositories/*/dockerI" - + "mages/*}\332A\004name\022\313\002\n\022ImportAptArtifacts\022>" - + ".google.devtools.artifactregistry.v1.Imp" - + "ortAptArtifactsRequest\032\035.google.longrunn" - + "ing.Operation\"\325\001\202\323\344\223\002K\"F/v1/{parent=proj" - + "ects/*/locations/*/repositories/*}/aptAr" - + "tifacts:import:\001*\312A\200\001\n>google.devtools.a" - + "rtifactregistry.v1.ImportAptArtifactsRes" - + "ponse\022>google.devtools.artifactregistry." - + "v1.ImportAptArtifactsMetadata\022\313\002\n\022Import" - + "YumArtifacts\022>.google.devtools.artifactr" - + "egistry.v1.ImportYumArtifactsRequest\032\035.g" - + "oogle.longrunning.Operation\"\325\001\202\323\344\223\002K\"F/v" - + "1/{parent=projects/*/locations/*/reposit" - + "ories/*}/yumArtifacts:import:\001*\312A\200\001\n>goo" - + "gle.devtools.artifactregistry.v1.ImportY" - + "umArtifactsResponse\022>google.devtools.art" - + "ifactregistry.v1.ImportYumArtifactsMetad" - + "ata\022\322\001\n\020ListRepositories\022<.google.devtoo" - + "ls.artifactregistry.v1.ListRepositoriesR" - + "equest\032=.google.devtools.artifactregistr" - + "y.v1.ListRepositoriesResponse\"A\202\323\344\223\0022\0220/" - + "v1/{parent=projects/*/locations/*}/repos" - + "itories\332A\006parent\022\274\001\n\rGetRepository\0229.goo" - + "gle.devtools.artifactregistry.v1.GetRepo" - + "sitoryRequest\032/.google.devtools.artifact" - + "registry.v1.Repository\"?\202\323\344\223\0022\0220/v1/{nam" - + "e=projects/*/locations/*/repositories/*}" - + "\332A\004name\022\302\002\n\020CreateRepository\022<.google.de" - + "vtools.artifactregistry.v1.CreateReposit" - + "oryRequest\032\035.google.longrunning.Operatio" - + "n\"\320\001\202\323\344\223\002>\"0/v1/{parent=projects/*/locat" - + "ions/*}/repositories:\nrepository\332A\037paren" - + "t,repository,repository_id\312Ag\n.google.de" - + "vtools.artifactregistry.v1.Repository\0225g" - + "oogle.devtools.artifactregistry.v1.Opera" - + "tionMetadata\022\353\001\n\020UpdateRepository\022<.goog" - + "le.devtools.artifactregistry.v1.UpdateRe" - + "positoryRequest\032/.google.devtools.artifa" - + "ctregistry.v1.Repository\"h\202\323\344\223\002I2;/v1/{r" - + "epository.name=projects/*/locations/*/re" - + "positories/*}:\nrepository\332A\026repository,u" - + "pdate_mask\022\202\002\n\020DeleteRepository\022<.google" - + ".devtools.artifactregistry.v1.DeleteRepo" - + "sitoryRequest\032\035.google.longrunning.Opera" - + "tion\"\220\001\202\323\344\223\0022*0/v1/{name=projects/*/loca" - + "tions/*/repositories/*}\332A\004name\312AN\n\025googl" - + "e.protobuf.Empty\0225google.devtools.artifa" - + "ctregistry.v1.OperationMetadata\022\321\001\n\014List" - + "Packages\0228.google.devtools.artifactregis" - + "try.v1.ListPackagesRequest\0329.google.devt" - + "ools.artifactregistry.v1.ListPackagesRes" - + "ponse\"L\202\323\344\223\002=\022;/v1/{parent=projects/*/lo" - + "cations/*/repositories/*}/packages\332A\006par" - + "ent\022\276\001\n\nGetPackage\0226.google.devtools.art" - + "ifactregistry.v1.GetPackageRequest\032,.goo" - + "gle.devtools.artifactregistry.v1.Package" - + "\"J\202\323\344\223\002=\022;/v1/{name=projects/*/locations" - + "/*/repositories/*/packages/*}\332A\004name\022\207\002\n" - + "\rDeletePackage\0229.google.devtools.artifac" - + "tregistry.v1.DeletePackageRequest\032\035.goog" - + "le.longrunning.Operation\"\233\001\202\323\344\223\002=*;/v1/{" - + "name=projects/*/locations/*/repositories" - + "/*/packages/*}\332A\004name\312AN\n\025google.protobu" + + "le/devtools/artifactregistry/v1/vpcsc_co" + + "nfig.proto\0326google/devtools/artifactregi" + + "stry/v1/yum_artifact.proto\032\036google/iam/v" + + "1/iam_policy.proto\032\032google/iam/v1/policy" + + ".proto\032#google/longrunning/operations.pr" + + "oto\032\033google/protobuf/empty.proto\"\023\n\021Oper" + + "ationMetadata2\242>\n\020ArtifactRegistry\022\341\001\n\020L" + + "istDockerImages\022<.google.devtools.artifa" + + "ctregistry.v1.ListDockerImagesRequest\032=." + + "google.devtools.artifactregistry.v1.List" + + "DockerImagesResponse\"P\202\323\344\223\002A\022?/v1/{paren" + + "t=projects/*/locations/*/repositories/*}" + + "/dockerImages\332A\006parent\022\316\001\n\016GetDockerImag" + + "e\022:.google.devtools.artifactregistry.v1." + + "GetDockerImageRequest\0320.google.devtools." + + "artifactregistry.v1.DockerImage\"N\202\323\344\223\002A\022" + + "?/v1/{name=projects/*/locations/*/reposi" + + "tories/*/dockerImages/*}\332A\004name\022\351\001\n\022List" + + "MavenArtifacts\022>.google.devtools.artifac" + + "tregistry.v1.ListMavenArtifactsRequest\032?" + + ".google.devtools.artifactregistry.v1.Lis" + + "tMavenArtifactsResponse\"R\202\323\344\223\002C\022A/v1/{pa" + + "rent=projects/*/locations/*/repositories" + + "/*}/mavenArtifacts\332A\006parent\022\326\001\n\020GetMaven" + + "Artifact\022<.google.devtools.artifactregis" + + "try.v1.GetMavenArtifactRequest\0322.google." + + "devtools.artifactregistry.v1.MavenArtifa" + + "ct\"P\202\323\344\223\002C\022A/v1/{name=projects/*/locatio" + + "ns/*/repositories/*/mavenArtifacts/*}\332A\004" + + "name\022\335\001\n\017ListNpmPackages\022;.google.devtoo" + + "ls.artifactregistry.v1.ListNpmPackagesRe" + + "quest\032<.google.devtools.artifactregistry" + + ".v1.ListNpmPackagesResponse\"O\202\323\344\223\002@\022>/v1" + + "/{parent=projects/*/locations/*/reposito" + + "ries/*}/npmPackages\332A\006parent\022\312\001\n\rGetNpmP" + + "ackage\0229.google.devtools.artifactregistr" + + "y.v1.GetNpmPackageRequest\032/.google.devto" + + "ols.artifactregistry.v1.NpmPackage\"M\202\323\344\223" + + "\002@\022>/v1/{name=projects/*/locations/*/rep" + + "ositories/*/npmPackages/*}\332A\004name\022\351\001\n\022Li" + + "stPythonPackages\022>.google.devtools.artif" + + "actregistry.v1.ListPythonPackagesRequest" + + "\032?.google.devtools.artifactregistry.v1.L" + + "istPythonPackagesResponse\"R\202\323\344\223\002C\022A/v1/{" + + "parent=projects/*/locations/*/repositori" + + "es/*}/pythonPackages\332A\006parent\022\326\001\n\020GetPyt" + + "honPackage\022<.google.devtools.artifactreg" + + "istry.v1.GetPythonPackageRequest\0322.googl" + + "e.devtools.artifactregistry.v1.PythonPac" + + "kage\"P\202\323\344\223\002C\022A/v1/{name=projects/*/locat" + + "ions/*/repositories/*/pythonPackages/*}\332" + + "A\004name\022\313\002\n\022ImportAptArtifacts\022>.google.d" + + "evtools.artifactregistry.v1.ImportAptArt" + + "ifactsRequest\032\035.google.longrunning.Opera" + + "tion\"\325\001\202\323\344\223\002K\"F/v1/{parent=projects/*/lo" + + "cations/*/repositories/*}/aptArtifacts:i" + + "mport:\001*\312A\200\001\n>google.devtools.artifactre" + + "gistry.v1.ImportAptArtifactsResponse\022>go" + + "ogle.devtools.artifactregistry.v1.Import" + + "AptArtifactsMetadata\022\313\002\n\022ImportYumArtifa" + + "cts\022>.google.devtools.artifactregistry.v" + + "1.ImportYumArtifactsRequest\032\035.google.lon" + + "grunning.Operation\"\325\001\202\323\344\223\002K\"F/v1/{parent" + + "=projects/*/locations/*/repositories/*}/" + + "yumArtifacts:import:\001*\312A\200\001\n>google.devto" + + "ols.artifactregistry.v1.ImportYumArtifac" + + "tsResponse\022>google.devtools.artifactregi" + + "stry.v1.ImportYumArtifactsMetadata\022\322\001\n\020L" + + "istRepositories\022<.google.devtools.artifa" + + "ctregistry.v1.ListRepositoriesRequest\032=." + + "google.devtools.artifactregistry.v1.List" + + "RepositoriesResponse\"A\202\323\344\223\0022\0220/v1/{paren" + + "t=projects/*/locations/*}/repositories\332A" + + "\006parent\022\274\001\n\rGetRepository\0229.google.devto" + + "ols.artifactregistry.v1.GetRepositoryReq" + + "uest\032/.google.devtools.artifactregistry." + + "v1.Repository\"?\202\323\344\223\0022\0220/v1/{name=project" + + "s/*/locations/*/repositories/*}\332A\004name\022\302" + + "\002\n\020CreateRepository\022<.google.devtools.ar" + + "tifactregistry.v1.CreateRepositoryReques" + + "t\032\035.google.longrunning.Operation\"\320\001\202\323\344\223\002" + + ">\"0/v1/{parent=projects/*/locations/*}/r" + + "epositories:\nrepository\332A\037parent,reposit" + + "ory,repository_id\312Ag\n.google.devtools.ar" + + "tifactregistry.v1.Repository\0225google.dev" + + "tools.artifactregistry.v1.OperationMetad" + + "ata\022\353\001\n\020UpdateRepository\022<.google.devtoo" + + "ls.artifactregistry.v1.UpdateRepositoryR" + + "equest\032/.google.devtools.artifactregistr" + + "y.v1.Repository\"h\202\323\344\223\002I2;/v1/{repository" + + ".name=projects/*/locations/*/repositorie" + + "s/*}:\nrepository\332A\026repository,update_mas" + + "k\022\202\002\n\020DeleteRepository\022<.google.devtools" + + ".artifactregistry.v1.DeleteRepositoryReq" + + "uest\032\035.google.longrunning.Operation\"\220\001\202\323" + + "\344\223\0022*0/v1/{name=projects/*/locations/*/r" + + "epositories/*}\332A\004name\312AN\n\025google.protobu" + "f.Empty\0225google.devtools.artifactregistr" - + "y.v1.OperationMetadata\022\334\001\n\014ListVersions\022" + + "y.v1.OperationMetadata\022\321\001\n\014ListPackages\022" + "8.google.devtools.artifactregistry.v1.Li" - + "stVersionsRequest\0329.google.devtools.arti" - + "factregistry.v1.ListVersionsResponse\"W\202\323" - + "\344\223\002H\022F/v1/{parent=projects/*/locations/*" - + "/repositories/*/packages/*}/versions\332A\006p" - + "arent\022\311\001\n\nGetVersion\0226.google.devtools.a" - + "rtifactregistry.v1.GetVersionRequest\032,.g" - + "oogle.devtools.artifactregistry.v1.Versi" - + "on\"U\202\323\344\223\002H\022F/v1/{name=projects/*/locatio" - + "ns/*/repositories/*/packages/*/versions/" - + "*}\332A\004name\022\222\002\n\rDeleteVersion\0229.google.dev" - + "tools.artifactregistry.v1.DeleteVersionR" - + "equest\032\035.google.longrunning.Operation\"\246\001" - + "\202\323\344\223\002H*F/v1/{name=projects/*/locations/*" - + "/repositories/*/packages/*/versions/*}\332A" - + "\004name\312AN\n\025google.protobuf.Empty\0225google." - + "devtools.artifactregistry.v1.OperationMe" - + "tadata\022\305\001\n\tListFiles\0225.google.devtools.a" - + "rtifactregistry.v1.ListFilesRequest\0326.go" - + "ogle.devtools.artifactregistry.v1.ListFi" - + "lesResponse\"I\202\323\344\223\002:\0228/v1/{parent=project" - + "s/*/locations/*/repositories/*}/files\332A\006" - + "parent\022\263\001\n\007GetFile\0223.google.devtools.art" - + "ifactregistry.v1.GetFileRequest\032).google" - + ".devtools.artifactregistry.v1.File\"H\202\323\344\223" - + "\002;\0229/v1/{name=projects/*/locations/*/rep" - + "ositories/*/files/**}\332A\004name\022\314\001\n\010ListTag" - + "s\0224.google.devtools.artifactregistry.v1." - + "ListTagsRequest\0325.google.devtools.artifa" - + "ctregistry.v1.ListTagsResponse\"S\202\323\344\223\002D\022B" - + "/v1/{parent=projects/*/locations/*/repos" - + "itories/*/packages/*}/tags\332A\006parent\022\271\001\n\006" - + "GetTag\0222.google.devtools.artifactregistr" - + "y.v1.GetTagRequest\032(.google.devtools.art" - + "ifactregistry.v1.Tag\"Q\202\323\344\223\002D\022B/v1/{name=" - + "projects/*/locations/*/repositories/*/pa" - + "ckages/*/tags/*}\332A\004name\022\321\001\n\tCreateTag\0225." - + "google.devtools.artifactregistry.v1.Crea" - + "teTagRequest\032(.google.devtools.artifactr" - + "egistry.v1.Tag\"c\202\323\344\223\002I\"B/v1/{parent=proj" + + "stPackagesRequest\0329.google.devtools.arti" + + "factregistry.v1.ListPackagesResponse\"L\202\323" + + "\344\223\002=\022;/v1/{parent=projects/*/locations/*" + + "/repositories/*}/packages\332A\006parent\022\276\001\n\nG" + + "etPackage\0226.google.devtools.artifactregi" + + "stry.v1.GetPackageRequest\032,.google.devto" + + "ols.artifactregistry.v1.Package\"J\202\323\344\223\002=\022" + + ";/v1/{name=projects/*/locations/*/reposi" + + "tories/*/packages/*}\332A\004name\022\207\002\n\rDeletePa" + + "ckage\0229.google.devtools.artifactregistry" + + ".v1.DeletePackageRequest\032\035.google.longru" + + "nning.Operation\"\233\001\202\323\344\223\002=*;/v1/{name=proj" + "ects/*/locations/*/repositories/*/packag" - + "es/*}/tags:\003tag\332A\021parent,tag,tag_id\022\323\001\n\t" - + "UpdateTag\0225.google.devtools.artifactregi" - + "stry.v1.UpdateTagRequest\032(.google.devtoo" - + "ls.artifactregistry.v1.Tag\"e\202\323\344\223\002M2F/v1/" - + "{tag.name=projects/*/locations/*/reposit" - + "ories/*/packages/*/tags/*}:\003tag\332A\017tag,up" - + "date_mask\022\255\001\n\tDeleteTag\0225.google.devtool" - + "s.artifactregistry.v1.DeleteTagRequest\032\026" - + ".google.protobuf.Empty\"Q\202\323\344\223\002D*B/v1/{nam" - + "e=projects/*/locations/*/repositories/*/" - + "packages/*/tags/*}\332A\004name\022\227\001\n\014SetIamPoli" - + "cy\022\".google.iam.v1.SetIamPolicyRequest\032\025" - + ".google.iam.v1.Policy\"L\202\323\344\223\002F\"A/v1/{reso" - + "urce=projects/*/locations/*/repositories" - + "/*}:setIamPolicy:\001*\022\224\001\n\014GetIamPolicy\022\".g" - + "oogle.iam.v1.GetIamPolicyRequest\032\025.googl" - + "e.iam.v1.Policy\"I\202\323\344\223\002C\022A/v1/{resource=p" - + "rojects/*/locations/*/repositories/*}:ge" - + "tIamPolicy\022\275\001\n\022TestIamPermissions\022(.goog" - + "le.iam.v1.TestIamPermissionsRequest\032).go" - + "ogle.iam.v1.TestIamPermissionsResponse\"R" - + "\202\323\344\223\002L\"G/v1/{resource=projects/*/locatio" - + "ns/*/repositories/*}:testIamPermissions:" - + "\001*\022\300\001\n\022GetProjectSettings\022>.google.devto" - + "ols.artifactregistry.v1.GetProjectSettin" - + "gsRequest\0324.google.devtools.artifactregi" - + "stry.v1.ProjectSettings\"4\202\323\344\223\002\'\022%/v1/{na" - + "me=projects/*/projectSettings}\332A\004name\022\201\002" - + "\n\025UpdateProjectSettings\022A.google.devtool" - + "s.artifactregistry.v1.UpdateProjectSetti" - + "ngsRequest\0324.google.devtools.artifactreg" - + "istry.v1.ProjectSettings\"o\202\323\344\223\002J26/v1/{p" - + "roject_settings.name=projects/*/projectS" - + "ettings}:\020project_settings\332A\034project_set" - + "tings,update_mask\032\214\001\312A\037artifactregistry." - + "googleapis.com\322Aghttps://www.googleapis." - + "com/auth/cloud-platform,https://www.goog" - + "leapis.com/auth/cloud-platform.read-only" - + "B\372\001\n\'com.google.devtools.artifactregistr" - + "y.v1B\014ServiceProtoP\001ZSgoogle.golang.org/" - + "genproto/googleapis/devtools/artifactreg" - + "istry/v1;artifactregistry\252\002 Google.Cloud" - + ".ArtifactRegistry.V1\312\002 Google\\Cloud\\Arti" - + "factRegistry\\V1\352\002#Google::Cloud::Artifac" - + "tRegistry::V1b\006proto3" + + "es/*}\332A\004name\312AN\n\025google.protobuf.Empty\0225" + + "google.devtools.artifactregistry.v1.Oper" + + "ationMetadata\022\334\001\n\014ListVersions\0228.google." + + "devtools.artifactregistry.v1.ListVersion" + + "sRequest\0329.google.devtools.artifactregis" + + "try.v1.ListVersionsResponse\"W\202\323\344\223\002H\022F/v1" + + "/{parent=projects/*/locations/*/reposito" + + "ries/*/packages/*}/versions\332A\006parent\022\311\001\n" + + "\nGetVersion\0226.google.devtools.artifactre" + + "gistry.v1.GetVersionRequest\032,.google.dev" + + "tools.artifactregistry.v1.Version\"U\202\323\344\223\002" + + "H\022F/v1/{name=projects/*/locations/*/repo" + + "sitories/*/packages/*/versions/*}\332A\004name" + + "\022\222\002\n\rDeleteVersion\0229.google.devtools.art" + + "ifactregistry.v1.DeleteVersionRequest\032\035." + + "google.longrunning.Operation\"\246\001\202\323\344\223\002H*F/" + + "v1/{name=projects/*/locations/*/reposito" + + "ries/*/packages/*/versions/*}\332A\004name\312AN\n" + + "\025google.protobuf.Empty\0225google.devtools." + + "artifactregistry.v1.OperationMetadata\022\305\001" + + "\n\tListFiles\0225.google.devtools.artifactre" + + "gistry.v1.ListFilesRequest\0326.google.devt" + + "ools.artifactregistry.v1.ListFilesRespon" + + "se\"I\202\323\344\223\002:\0228/v1/{parent=projects/*/locat" + + "ions/*/repositories/*}/files\332A\006parent\022\263\001" + + "\n\007GetFile\0223.google.devtools.artifactregi" + + "stry.v1.GetFileRequest\032).google.devtools" + + ".artifactregistry.v1.File\"H\202\323\344\223\002;\0229/v1/{" + + "name=projects/*/locations/*/repositories" + + "/*/files/**}\332A\004name\022\314\001\n\010ListTags\0224.googl" + + "e.devtools.artifactregistry.v1.ListTagsR" + + "equest\0325.google.devtools.artifactregistr" + + "y.v1.ListTagsResponse\"S\202\323\344\223\002D\022B/v1/{pare" + + "nt=projects/*/locations/*/repositories/*" + + "/packages/*}/tags\332A\006parent\022\271\001\n\006GetTag\0222." + + "google.devtools.artifactregistry.v1.GetT" + + "agRequest\032(.google.devtools.artifactregi" + + "stry.v1.Tag\"Q\202\323\344\223\002D\022B/v1/{name=projects/" + + "*/locations/*/repositories/*/packages/*/" + + "tags/*}\332A\004name\022\321\001\n\tCreateTag\0225.google.de" + + "vtools.artifactregistry.v1.CreateTagRequ" + + "est\032(.google.devtools.artifactregistry.v" + + "1.Tag\"c\202\323\344\223\002I\"B/v1/{parent=projects/*/lo" + + "cations/*/repositories/*/packages/*}/tag" + + "s:\003tag\332A\021parent,tag,tag_id\022\323\001\n\tUpdateTag" + + "\0225.google.devtools.artifactregistry.v1.U" + + "pdateTagRequest\032(.google.devtools.artifa" + + "ctregistry.v1.Tag\"e\202\323\344\223\002M2F/v1/{tag.name" + + "=projects/*/locations/*/repositories/*/p" + + "ackages/*/tags/*}:\003tag\332A\017tag,update_mask" + + "\022\255\001\n\tDeleteTag\0225.google.devtools.artifac" + + "tregistry.v1.DeleteTagRequest\032\026.google.p" + + "rotobuf.Empty\"Q\202\323\344\223\002D*B/v1/{name=project" + + "s/*/locations/*/repositories/*/packages/" + + "*/tags/*}\332A\004name\022\227\001\n\014SetIamPolicy\022\".goog" + + "le.iam.v1.SetIamPolicyRequest\032\025.google.i" + + "am.v1.Policy\"L\202\323\344\223\002F\"A/v1/{resource=proj" + + "ects/*/locations/*/repositories/*}:setIa" + + "mPolicy:\001*\022\224\001\n\014GetIamPolicy\022\".google.iam" + + ".v1.GetIamPolicyRequest\032\025.google.iam.v1." + + "Policy\"I\202\323\344\223\002C\022A/v1/{resource=projects/*" + + "/locations/*/repositories/*}:getIamPolic" + + "y\022\275\001\n\022TestIamPermissions\022(.google.iam.v1" + + ".TestIamPermissionsRequest\032).google.iam." + + "v1.TestIamPermissionsResponse\"R\202\323\344\223\002L\"G/" + + "v1/{resource=projects/*/locations/*/repo" + + "sitories/*}:testIamPermissions:\001*\022\300\001\n\022Ge" + + "tProjectSettings\022>.google.devtools.artif" + + "actregistry.v1.GetProjectSettingsRequest" + + "\0324.google.devtools.artifactregistry.v1.P" + + "rojectSettings\"4\202\323\344\223\002\'\022%/v1/{name=projec" + + "ts/*/projectSettings}\332A\004name\022\201\002\n\025UpdateP" + + "rojectSettings\022A.google.devtools.artifac" + + "tregistry.v1.UpdateProjectSettingsReques" + + "t\0324.google.devtools.artifactregistry.v1." + + "ProjectSettings\"o\202\323\344\223\002J26/v1/{project_se" + + "ttings.name=projects/*/projectSettings}:" + + "\020project_settings\332A\034project_settings,upd" + + "ate_mask\022\274\001\n\016GetVPCSCConfig\022:.google.dev" + + "tools.artifactregistry.v1.GetVPCSCConfig" + + "Request\0320.google.devtools.artifactregist" + + "ry.v1.VPCSCConfig\"<\202\323\344\223\002/\022-/v1/{name=pro" + + "jects/*/locations/*/vpcscConfig}\332A\004name\022" + + "\361\001\n\021UpdateVPCSCConfig\022=.google.devtools." + + "artifactregistry.v1.UpdateVPCSCConfigReq" + + "uest\0320.google.devtools.artifactregistry." + + "v1.VPCSCConfig\"k\202\323\344\223\002J2:/v1/{vpcsc_confi" + + "g.name=projects/*/locations/*/vpcscConfi" + + "g}:\014vpcsc_config\332A\030vpcsc_config,update_m" + + "ask\032\214\001\312A\037artifactregistry.googleapis.com" + + "\322Aghttps://www.googleapis.com/auth/cloud" + + "-platform,https://www.googleapis.com/aut" + + "h/cloud-platform.read-onlyB\372\001\n\'com.googl" + + "e.devtools.artifactregistry.v1B\014ServiceP" + + "rotoP\001ZSgoogle.golang.org/genproto/googl" + + "eapis/devtools/artifactregistry/v1;artif" + + "actregistry\252\002 Google.Cloud.ArtifactRegis" + + "try.V1\312\002 Google\\Cloud\\ArtifactRegistry\\V" + + "1\352\002#Google::Cloud::ArtifactRegistry::V1b" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -236,6 +282,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.devtools.artifactregistry.v1.SettingsProto.getDescriptor(), com.google.devtools.artifactregistry.v1.TagProto.getDescriptor(), com.google.devtools.artifactregistry.v1.VersionProto.getDescriptor(), + com.google.devtools.artifactregistry.v1.VPCSCConfigProto.getDescriptor(), com.google.devtools.artifactregistry.v1.YumArtifactProto.getDescriptor(), com.google.iam.v1.IamPolicyProto.getDescriptor(), com.google.iam.v1.PolicyProto.getDescriptor(), @@ -267,6 +314,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.devtools.artifactregistry.v1.SettingsProto.getDescriptor(); com.google.devtools.artifactregistry.v1.TagProto.getDescriptor(); com.google.devtools.artifactregistry.v1.VersionProto.getDescriptor(); + com.google.devtools.artifactregistry.v1.VPCSCConfigProto.getDescriptor(); com.google.devtools.artifactregistry.v1.YumArtifactProto.getDescriptor(); com.google.iam.v1.IamPolicyProto.getDescriptor(); com.google.iam.v1.PolicyProto.getDescriptor(); diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/SettingsProto.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/SettingsProto.java index 99a5156a3f56..7a684804e107 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/SettingsProto.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/SettingsProto.java @@ -52,30 +52,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ttings.proto\022#google.devtools.artifactre" + "gistry.v1\032\037google/api/field_behavior.pro" + "to\032\031google/api/resource.proto\032 google/pr" - + "otobuf/field_mask.proto\"\214\003\n\017ProjectSetti" + + "otobuf/field_mask.proto\"\220\003\n\017ProjectSetti" + "ngs\022\014\n\004name\030\001 \001(\t\022g\n\030legacy_redirection_" + "state\030\002 \001(\0162E.google.devtools.artifactre" + "gistry.v1.ProjectSettings.RedirectionSta" - + "te\"\247\001\n\020RedirectionState\022!\n\035REDIRECTION_S" + + "te\"\253\001\n\020RedirectionState\022!\n\035REDIRECTION_S" + "TATE_UNSPECIFIED\020\000\022$\n REDIRECTION_FROM_G" + "CR_IO_DISABLED\020\001\022#\n\037REDIRECTION_FROM_GCR" - + "_IO_ENABLED\020\002\022%\n!REDIRECTION_FROM_GCR_IO" - + "_FINALIZED\020\003:X\352AU\n/artifactregistry.goog" - + "leapis.com/ProjectSettings\022\"projects/{pr" - + "oject}/projectSettings\"b\n\031GetProjectSett" - + "ingsRequest\022E\n\004name\030\001 \001(\tB7\340A\002\372A1\n/artif" - + "actregistry.googleapis.com/ProjectSettin" - + "gs\"\237\001\n\034UpdateProjectSettingsRequest\022N\n\020p" - + "roject_settings\030\002 \001(\01324.google.devtools." - + "artifactregistry.v1.ProjectSettings\022/\n\013u" - + "pdate_mask\030\003 \001(\0132\032.google.protobuf.Field" - + "MaskB\373\001\n\'com.google.devtools.artifactreg" - + "istry.v1B\rSettingsProtoP\001ZSgoogle.golang" - + ".org/genproto/googleapis/devtools/artifa" - + "ctregistry/v1;artifactregistry\252\002 Google." - + "Cloud.ArtifactRegistry.V1\312\002 Google\\Cloud" - + "\\ArtifactRegistry\\V1\352\002#Google::Cloud::Ar" - + "tifactRegistry::V1b\006proto3" + + "_IO_ENABLED\020\002\022)\n!REDIRECTION_FROM_GCR_IO" + + "_FINALIZED\020\003\032\002\010\001:X\352AU\n/artifactregistry." + + "googleapis.com/ProjectSettings\022\"projects" + + "/{project}/projectSettings\"b\n\031GetProject" + + "SettingsRequest\022E\n\004name\030\001 \001(\tB7\340A\002\372A1\n/a" + + "rtifactregistry.googleapis.com/ProjectSe" + + "ttings\"\237\001\n\034UpdateProjectSettingsRequest\022" + + "N\n\020project_settings\030\002 \001(\01324.google.devto" + + "ols.artifactregistry.v1.ProjectSettings\022" + + "/\n\013update_mask\030\003 \001(\0132\032.google.protobuf.F" + + "ieldMaskB\373\001\n\'com.google.devtools.artifac" + + "tregistry.v1B\rSettingsProtoP\001ZSgoogle.go" + + "lang.org/genproto/googleapis/devtools/ar" + + "tifactregistry/v1;artifactregistry\252\002 Goo" + + "gle.Cloud.ArtifactRegistry.V1\312\002 Google\\C" + + "loud\\ArtifactRegistry\\V1\352\002#Google::Cloud" + + "::ArtifactRegistry::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpdateVPCSCConfigRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpdateVPCSCConfigRequest.java new file mode 100644 index 000000000000..4151065d01dd --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpdateVPCSCConfigRequest.java @@ -0,0 +1,981 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/vpcsc_config.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * Sets the VPCSC config of the project.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} + */ +public final class UpdateVPCSCConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest) + UpdateVPCSCConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateVPCSCConfigRequest.newBuilder() to construct. + private UpdateVPCSCConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateVPCSCConfigRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateVPCSCConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_UpdateVPCSCConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_UpdateVPCSCConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.class, + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.Builder.class); + } + + public static final int VPCSC_CONFIG_FIELD_NUMBER = 1; + private com.google.devtools.artifactregistry.v1.VPCSCConfig vpcscConfig_; + /** + * + * + *
+   * The project config.
+   * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + * + * @return Whether the vpcscConfig field is set. + */ + @java.lang.Override + public boolean hasVpcscConfig() { + return vpcscConfig_ != null; + } + /** + * + * + *
+   * The project config.
+   * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + * + * @return The vpcscConfig. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VPCSCConfig getVpcscConfig() { + return vpcscConfig_ == null + ? com.google.devtools.artifactregistry.v1.VPCSCConfig.getDefaultInstance() + : vpcscConfig_; + } + /** + * + * + *
+   * The project config.
+   * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VPCSCConfigOrBuilder getVpcscConfigOrBuilder() { + return vpcscConfig_ == null + ? com.google.devtools.artifactregistry.v1.VPCSCConfig.getDefaultInstance() + : vpcscConfig_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Field mask to support partial updates.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Field mask to support partial updates.
+   * 
+ * + * .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_; + } + /** + * + * + *
+   * Field mask to support partial updates.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (vpcscConfig_ != null) { + output.writeMessage(1, getVpcscConfig()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (vpcscConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getVpcscConfig()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest other = + (com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest) obj; + + if (hasVpcscConfig() != other.hasVpcscConfig()) return false; + if (hasVpcscConfig()) { + if (!getVpcscConfig().equals(other.getVpcscConfig())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVpcscConfig()) { + hash = (37 * hash) + VPCSC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVpcscConfig().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest 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.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest 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.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest 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.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest 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.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest 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; + } + /** + * + * + *
+   * Sets the VPCSC config of the project.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest) + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_UpdateVPCSCConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_UpdateVPCSCConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.class, + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + vpcscConfig_ = null; + if (vpcscConfigBuilder_ != null) { + vpcscConfigBuilder_.dispose(); + vpcscConfigBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_UpdateVPCSCConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest build() { + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest buildPartial() { + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest result = + new com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.vpcscConfig_ = + vpcscConfigBuilder_ == null ? vpcscConfig_ : vpcscConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + } + + @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.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest) { + return mergeFrom((com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest other) { + if (other + == com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.getDefaultInstance()) + return this; + if (other.hasVpcscConfig()) { + mergeVpcscConfig(other.getVpcscConfig()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getVpcscConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devtools.artifactregistry.v1.VPCSCConfig vpcscConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.VPCSCConfig, + com.google.devtools.artifactregistry.v1.VPCSCConfig.Builder, + com.google.devtools.artifactregistry.v1.VPCSCConfigOrBuilder> + vpcscConfigBuilder_; + /** + * + * + *
+     * The project config.
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + * + * @return Whether the vpcscConfig field is set. + */ + public boolean hasVpcscConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The project config.
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + * + * @return The vpcscConfig. + */ + public com.google.devtools.artifactregistry.v1.VPCSCConfig getVpcscConfig() { + if (vpcscConfigBuilder_ == null) { + return vpcscConfig_ == null + ? com.google.devtools.artifactregistry.v1.VPCSCConfig.getDefaultInstance() + : vpcscConfig_; + } else { + return vpcscConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The project config.
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + */ + public Builder setVpcscConfig(com.google.devtools.artifactregistry.v1.VPCSCConfig value) { + if (vpcscConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vpcscConfig_ = value; + } else { + vpcscConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The project config.
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + */ + public Builder setVpcscConfig( + com.google.devtools.artifactregistry.v1.VPCSCConfig.Builder builderForValue) { + if (vpcscConfigBuilder_ == null) { + vpcscConfig_ = builderForValue.build(); + } else { + vpcscConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The project config.
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + */ + public Builder mergeVpcscConfig(com.google.devtools.artifactregistry.v1.VPCSCConfig value) { + if (vpcscConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && vpcscConfig_ != null + && vpcscConfig_ + != com.google.devtools.artifactregistry.v1.VPCSCConfig.getDefaultInstance()) { + getVpcscConfigBuilder().mergeFrom(value); + } else { + vpcscConfig_ = value; + } + } else { + vpcscConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The project config.
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + */ + public Builder clearVpcscConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + vpcscConfig_ = null; + if (vpcscConfigBuilder_ != null) { + vpcscConfigBuilder_.dispose(); + vpcscConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The project config.
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + */ + public com.google.devtools.artifactregistry.v1.VPCSCConfig.Builder getVpcscConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getVpcscConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The project config.
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + */ + public com.google.devtools.artifactregistry.v1.VPCSCConfigOrBuilder getVpcscConfigOrBuilder() { + if (vpcscConfigBuilder_ != null) { + return vpcscConfigBuilder_.getMessageOrBuilder(); + } else { + return vpcscConfig_ == null + ? com.google.devtools.artifactregistry.v1.VPCSCConfig.getDefaultInstance() + : vpcscConfig_; + } + } + /** + * + * + *
+     * The project config.
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.VPCSCConfig, + com.google.devtools.artifactregistry.v1.VPCSCConfig.Builder, + com.google.devtools.artifactregistry.v1.VPCSCConfigOrBuilder> + getVpcscConfigFieldBuilder() { + if (vpcscConfigBuilder_ == null) { + vpcscConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.VPCSCConfig, + com.google.devtools.artifactregistry.v1.VPCSCConfig.Builder, + com.google.devtools.artifactregistry.v1.VPCSCConfigOrBuilder>( + getVpcscConfig(), getParentForChildren(), isClean()); + vpcscConfig_ = null; + } + return vpcscConfigBuilder_; + } + + 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_; + /** + * + * + *
+     * Field mask to support partial updates.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Field mask to support partial updates.
+     * 
+ * + * .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(); + } + } + /** + * + * + *
+     * Field mask to support partial updates.
+     * 
+ * + * .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; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask to support partial updates.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask to support partial updates.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask to support partial updates.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask to support partial updates.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Field mask to support partial updates.
+     * 
+ * + * .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_; + } + } + /** + * + * + *
+     * Field mask to support partial updates.
+     * 
+ * + * .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_; + } + + @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.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest) + private static final com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest(); + } + + public static com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateVPCSCConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpdateVPCSCConfigRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpdateVPCSCConfigRequestOrBuilder.java new file mode 100644 index 000000000000..c84a52c93be7 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpdateVPCSCConfigRequestOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/vpcsc_config.proto + +package com.google.devtools.artifactregistry.v1; + +public interface UpdateVPCSCConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The project config.
+   * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + * + * @return Whether the vpcscConfig field is set. + */ + boolean hasVpcscConfig(); + /** + * + * + *
+   * The project config.
+   * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + * + * @return The vpcscConfig. + */ + com.google.devtools.artifactregistry.v1.VPCSCConfig getVpcscConfig(); + /** + * + * + *
+   * The project config.
+   * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig vpcsc_config = 1; + */ + com.google.devtools.artifactregistry.v1.VPCSCConfigOrBuilder getVpcscConfigOrBuilder(); + + /** + * + * + *
+   * Field mask to support partial updates.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Field mask to support partial updates.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Field mask to support partial updates.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfig.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfig.java new file mode 100644 index 000000000000..495659bdf8af --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfig.java @@ -0,0 +1,988 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/vpcsc_config.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * The Artifact Registry VPC SC config that apply to a Project.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.VPCSCConfig} + */ +public final class VPCSCConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.VPCSCConfig) + VPCSCConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use VPCSCConfig.newBuilder() to construct. + private VPCSCConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VPCSCConfig() { + name_ = ""; + vpcscPolicy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VPCSCConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_VPCSCConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_VPCSCConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.VPCSCConfig.class, + com.google.devtools.artifactregistry.v1.VPCSCConfig.Builder.class); + } + + /** + * + * + *
+   * VPCSCPolicy is the VPC SC policy for project and location.
+   * 
+ * + * Protobuf enum {@code google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy} + */ + public enum VPCSCPolicy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * VPCSC_POLICY_UNSPECIFIED - the VPS SC policy is not defined.
+     * When VPS SC policy is not defined - the Service will use the default
+     * behavior (VPCSC_DENY).
+     * 
+ * + * VPCSC_POLICY_UNSPECIFIED = 0; + */ + VPCSC_POLICY_UNSPECIFIED(0), + /** + * + * + *
+     * VPCSC_DENY - repository will block the requests to the Upstreams for the
+     * Remote Repositories if the resource is in the perimeter.
+     * 
+ * + * DENY = 1; + */ + DENY(1), + /** + * + * + *
+     * VPCSC_ALLOW - repository will allow the requests to the Upstreams for the
+     * Remote Repositories if the resource is in the perimeter.
+     * 
+ * + * ALLOW = 2; + */ + ALLOW(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * VPCSC_POLICY_UNSPECIFIED - the VPS SC policy is not defined.
+     * When VPS SC policy is not defined - the Service will use the default
+     * behavior (VPCSC_DENY).
+     * 
+ * + * VPCSC_POLICY_UNSPECIFIED = 0; + */ + public static final int VPCSC_POLICY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * VPCSC_DENY - repository will block the requests to the Upstreams for the
+     * Remote Repositories if the resource is in the perimeter.
+     * 
+ * + * DENY = 1; + */ + public static final int DENY_VALUE = 1; + /** + * + * + *
+     * VPCSC_ALLOW - repository will allow the requests to the Upstreams for the
+     * Remote Repositories if the resource is in the perimeter.
+     * 
+ * + * ALLOW = 2; + */ + public static final int ALLOW_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VPCSCPolicy 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 VPCSCPolicy forNumber(int value) { + switch (value) { + case 0: + return VPCSC_POLICY_UNSPECIFIED; + case 1: + return DENY; + case 2: + return ALLOW; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public VPCSCPolicy findValueByNumber(int number) { + return VPCSCPolicy.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.devtools.artifactregistry.v1.VPCSCConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final VPCSCPolicy[] VALUES = values(); + + public static VPCSCPolicy 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 VPCSCPolicy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The name of the project's VPC SC Config.
+   * Always of the form:
+   * projects/{projectID}/locations/{location}/vpcscConfig
+   * In update request: never set
+   * In response: always set
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the project's VPC SC Config.
+   * Always of the form:
+   * projects/{projectID}/locations/{location}/vpcscConfig
+   * In update request: never set
+   * In response: always set
+   * 
+ * + * 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 VPCSC_POLICY_FIELD_NUMBER = 2; + private int vpcscPolicy_ = 0; + /** + * + * + *
+   * The project per location VPC SC policy that defines the VPC SC behavior for
+   * the Remote Repository (Allow/Deny).
+   * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy vpcsc_policy = 2; + * + * @return The enum numeric value on the wire for vpcscPolicy. + */ + @java.lang.Override + public int getVpcscPolicyValue() { + return vpcscPolicy_; + } + /** + * + * + *
+   * The project per location VPC SC policy that defines the VPC SC behavior for
+   * the Remote Repository (Allow/Deny).
+   * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy vpcsc_policy = 2; + * + * @return The vpcscPolicy. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy getVpcscPolicy() { + com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy result = + com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy.forNumber(vpcscPolicy_); + return result == null + ? com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (vpcscPolicy_ + != com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy.VPCSC_POLICY_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, vpcscPolicy_); + } + getUnknownFields().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 (vpcscPolicy_ + != com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy.VPCSC_POLICY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, vpcscPolicy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devtools.artifactregistry.v1.VPCSCConfig)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.VPCSCConfig other = + (com.google.devtools.artifactregistry.v1.VPCSCConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (vpcscPolicy_ != other.vpcscPolicy_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VPCSC_POLICY_FIELD_NUMBER; + hash = (53 * hash) + vpcscPolicy_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.VPCSCConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.VPCSCConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.VPCSCConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.VPCSCConfig 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.devtools.artifactregistry.v1.VPCSCConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.VPCSCConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devtools.artifactregistry.v1.VPCSCConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.VPCSCConfig 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.devtools.artifactregistry.v1.VPCSCConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.VPCSCConfig 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.devtools.artifactregistry.v1.VPCSCConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.VPCSCConfig 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.devtools.artifactregistry.v1.VPCSCConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Artifact Registry VPC SC config that apply to a Project.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.VPCSCConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.VPCSCConfig) + com.google.devtools.artifactregistry.v1.VPCSCConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_VPCSCConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_VPCSCConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.VPCSCConfig.class, + com.google.devtools.artifactregistry.v1.VPCSCConfig.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.VPCSCConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + vpcscPolicy_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.VPCSCConfigProto + .internal_static_google_devtools_artifactregistry_v1_VPCSCConfig_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VPCSCConfig getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.VPCSCConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VPCSCConfig build() { + com.google.devtools.artifactregistry.v1.VPCSCConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VPCSCConfig buildPartial() { + com.google.devtools.artifactregistry.v1.VPCSCConfig result = + new com.google.devtools.artifactregistry.v1.VPCSCConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devtools.artifactregistry.v1.VPCSCConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vpcscPolicy_ = vpcscPolicy_; + } + } + + @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.devtools.artifactregistry.v1.VPCSCConfig) { + return mergeFrom((com.google.devtools.artifactregistry.v1.VPCSCConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.VPCSCConfig other) { + if (other == com.google.devtools.artifactregistry.v1.VPCSCConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.vpcscPolicy_ != 0) { + setVpcscPolicyValue(other.getVpcscPolicyValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + vpcscPolicy_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the project's VPC SC Config.
+     * Always of the form:
+     * projects/{projectID}/locations/{location}/vpcscConfig
+     * In update request: never set
+     * In response: always set
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the project's VPC SC Config.
+     * Always of the form:
+     * projects/{projectID}/locations/{location}/vpcscConfig
+     * In update request: never set
+     * In response: always set
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the project's VPC SC Config.
+     * Always of the form:
+     * projects/{projectID}/locations/{location}/vpcscConfig
+     * In update request: never set
+     * In response: always set
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the project's VPC SC Config.
+     * Always of the form:
+     * projects/{projectID}/locations/{location}/vpcscConfig
+     * In update request: never set
+     * In response: always set
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the project's VPC SC Config.
+     * Always of the form:
+     * projects/{projectID}/locations/{location}/vpcscConfig
+     * In update request: never set
+     * In response: always set
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int vpcscPolicy_ = 0; + /** + * + * + *
+     * The project per location VPC SC policy that defines the VPC SC behavior for
+     * the Remote Repository (Allow/Deny).
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy vpcsc_policy = 2; + * + * @return The enum numeric value on the wire for vpcscPolicy. + */ + @java.lang.Override + public int getVpcscPolicyValue() { + return vpcscPolicy_; + } + /** + * + * + *
+     * The project per location VPC SC policy that defines the VPC SC behavior for
+     * the Remote Repository (Allow/Deny).
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy vpcsc_policy = 2; + * + * @param value The enum numeric value on the wire for vpcscPolicy to set. + * @return This builder for chaining. + */ + public Builder setVpcscPolicyValue(int value) { + vpcscPolicy_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The project per location VPC SC policy that defines the VPC SC behavior for
+     * the Remote Repository (Allow/Deny).
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy vpcsc_policy = 2; + * + * @return The vpcscPolicy. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy getVpcscPolicy() { + com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy result = + com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy.forNumber(vpcscPolicy_); + return result == null + ? com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The project per location VPC SC policy that defines the VPC SC behavior for
+     * the Remote Repository (Allow/Deny).
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy vpcsc_policy = 2; + * + * @param value The vpcscPolicy to set. + * @return This builder for chaining. + */ + public Builder setVpcscPolicy( + com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + vpcscPolicy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The project per location VPC SC policy that defines the VPC SC behavior for
+     * the Remote Repository (Allow/Deny).
+     * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy vpcsc_policy = 2; + * + * @return This builder for chaining. + */ + public Builder clearVpcscPolicy() { + bitField0_ = (bitField0_ & ~0x00000002); + vpcscPolicy_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.devtools.artifactregistry.v1.VPCSCConfig) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.VPCSCConfig) + private static final com.google.devtools.artifactregistry.v1.VPCSCConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.VPCSCConfig(); + } + + public static com.google.devtools.artifactregistry.v1.VPCSCConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VPCSCConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VPCSCConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfigOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfigOrBuilder.java new file mode 100644 index 000000000000..84e4c9aa36e2 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfigOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/vpcsc_config.proto + +package com.google.devtools.artifactregistry.v1; + +public interface VPCSCConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.VPCSCConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the project's VPC SC Config.
+   * Always of the form:
+   * projects/{projectID}/locations/{location}/vpcscConfig
+   * In update request: never set
+   * In response: always set
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of the project's VPC SC Config.
+   * Always of the form:
+   * projects/{projectID}/locations/{location}/vpcscConfig
+   * In update request: never set
+   * In response: always set
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The project per location VPC SC policy that defines the VPC SC behavior for
+   * the Remote Repository (Allow/Deny).
+   * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy vpcsc_policy = 2; + * + * @return The enum numeric value on the wire for vpcscPolicy. + */ + int getVpcscPolicyValue(); + /** + * + * + *
+   * The project per location VPC SC policy that defines the VPC SC behavior for
+   * the Remote Repository (Allow/Deny).
+   * 
+ * + * .google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy vpcsc_policy = 2; + * + * @return The vpcscPolicy. + */ + com.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy getVpcscPolicy(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfigProto.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfigProto.java new file mode 100644 index 000000000000..c7ca5a46a4b3 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VPCSCConfigProto.java @@ -0,0 +1,122 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/artifactregistry/v1/vpcsc_config.proto + +package com.google.devtools.artifactregistry.v1; + +public final class VPCSCConfigProto { + private VPCSCConfigProto() {} + + 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_devtools_artifactregistry_v1_VPCSCConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_VPCSCConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_GetVPCSCConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_GetVPCSCConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_UpdateVPCSCConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_UpdateVPCSCConfigRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n6google/devtools/artifactregistry/v1/vp" + + "csc_config.proto\022#google.devtools.artifa" + + "ctregistry.v1\032\037google/api/field_behavior" + + ".proto\032\031google/api/resource.proto\032 googl" + + "e/protobuf/field_mask.proto\"\230\002\n\013VPCSCCon" + + "fig\022\014\n\004name\030\001 \001(\t\022R\n\014vpcsc_policy\030\002 \001(\0162" + + "<.google.devtools.artifactregistry.v1.VP" + + "CSCConfig.VPCSCPolicy\"@\n\013VPCSCPolicy\022\034\n\030" + + "VPCSC_POLICY_UNSPECIFIED\020\000\022\010\n\004DENY\020\001\022\t\n\005" + + "ALLOW\020\002:e\352Ab\n+artifactregistry.googleapi" + + "s.com/VpcscConfig\0223projects/{project}/lo" + + "cations/{location}/vpcscConfig\"Z\n\025GetVPC" + + "SCConfigRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+a" + + "rtifactregistry.googleapis.com/VpcscConf" + + "ig\"\223\001\n\030UpdateVPCSCConfigRequest\022F\n\014vpcsc" + + "_config\030\001 \001(\01320.google.devtools.artifact" + + "registry.v1.VPCSCConfig\022/\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\376\001\n\'com" + + ".google.devtools.artifactregistry.v1B\020VP" + + "CSCConfigProtoP\001ZSgoogle.golang.org/genp" + + "roto/googleapis/devtools/artifactregistr" + + "y/v1;artifactregistry\252\002 Google.Cloud.Art" + + "ifactRegistry.V1\312\002 Google\\Cloud\\Artifact" + + "Registry\\V1\352\002#Google::Cloud::ArtifactReg" + + "istry::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_devtools_artifactregistry_v1_VPCSCConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_devtools_artifactregistry_v1_VPCSCConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_VPCSCConfig_descriptor, + new java.lang.String[] { + "Name", "VpcscPolicy", + }); + internal_static_google_devtools_artifactregistry_v1_GetVPCSCConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_devtools_artifactregistry_v1_GetVPCSCConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_GetVPCSCConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_devtools_artifactregistry_v1_UpdateVPCSCConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_devtools_artifactregistry_v1_UpdateVPCSCConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_UpdateVPCSCConfigRequest_descriptor, + new java.lang.String[] { + "VpcscConfig", "UpdateMask", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Version.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Version.java index 4f02ea6f93db..137ac35a33c6 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Version.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Version.java @@ -355,8 +355,9 @@ public com.google.devtools.artifactregistry.v1.TagOrBuilder getRelatedTagsOrBuil *
    * Output only. Repository-specific Metadata stored against this version.
    * The fields returned are defined by the underlying repository-specific
-   * resource. Currently, the only resource in use is
+   * resource. Currently, the resources could be:
    * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+   * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
    * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -373,8 +374,9 @@ public boolean hasMetadata() { *
    * Output only. Repository-specific Metadata stored against this version.
    * The fields returned are defined by the underlying repository-specific
-   * resource. Currently, the only resource in use is
+   * resource. Currently, the resources could be:
    * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+   * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
    * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -391,8 +393,9 @@ public com.google.protobuf.Struct getMetadata() { *
    * Output only. Repository-specific Metadata stored against this version.
    * The fields returned are defined by the underlying repository-specific
-   * resource. Currently, the only resource in use is
+   * resource. Currently, the resources could be:
    * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+   * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
    * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1909,8 +1912,9 @@ public com.google.devtools.artifactregistry.v1.Tag.Builder addRelatedTagsBuilder *
      * Output only. Repository-specific Metadata stored against this version.
      * The fields returned are defined by the underlying repository-specific
-     * resource. Currently, the only resource in use is
+     * resource. Currently, the resources could be:
      * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+     * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
      * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1927,8 +1931,9 @@ public boolean hasMetadata() { *
      * Output only. Repository-specific Metadata stored against this version.
      * The fields returned are defined by the underlying repository-specific
-     * resource. Currently, the only resource in use is
+     * resource. Currently, the resources could be:
      * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+     * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
      * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1949,8 +1954,9 @@ public com.google.protobuf.Struct getMetadata() { *
      * Output only. Repository-specific Metadata stored against this version.
      * The fields returned are defined by the underlying repository-specific
-     * resource. Currently, the only resource in use is
+     * resource. Currently, the resources could be:
      * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+     * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
      * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1975,8 +1981,9 @@ public Builder setMetadata(com.google.protobuf.Struct value) { *
      * Output only. Repository-specific Metadata stored against this version.
      * The fields returned are defined by the underlying repository-specific
-     * resource. Currently, the only resource in use is
+     * resource. Currently, the resources could be:
      * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+     * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
      * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1998,8 +2005,9 @@ public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) { *
      * Output only. Repository-specific Metadata stored against this version.
      * The fields returned are defined by the underlying repository-specific
-     * resource. Currently, the only resource in use is
+     * resource. Currently, the resources could be:
      * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+     * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
      * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2027,8 +2035,9 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) { *
      * Output only. Repository-specific Metadata stored against this version.
      * The fields returned are defined by the underlying repository-specific
-     * resource. Currently, the only resource in use is
+     * resource. Currently, the resources could be:
      * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+     * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
      * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2050,8 +2059,9 @@ public Builder clearMetadata() { *
      * Output only. Repository-specific Metadata stored against this version.
      * The fields returned are defined by the underlying repository-specific
-     * resource. Currently, the only resource in use is
+     * resource. Currently, the resources could be:
      * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+     * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
      * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2068,8 +2078,9 @@ public com.google.protobuf.Struct.Builder getMetadataBuilder() { *
      * Output only. Repository-specific Metadata stored against this version.
      * The fields returned are defined by the underlying repository-specific
-     * resource. Currently, the only resource in use is
+     * resource. Currently, the resources could be:
      * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+     * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
      * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2088,8 +2099,9 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { *
      * Output only. Repository-specific Metadata stored against this version.
      * The fields returned are defined by the underlying repository-specific
-     * resource. Currently, the only resource in use is
+     * resource. Currently, the resources could be:
      * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+     * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
      * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VersionOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VersionOrBuilder.java index ec27cb329aa9..1ef4ad3364ad 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VersionOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VersionOrBuilder.java @@ -212,8 +212,9 @@ public interface VersionOrBuilder *
    * Output only. Repository-specific Metadata stored against this version.
    * The fields returned are defined by the underlying repository-specific
-   * resource. Currently, the only resource in use is
+   * resource. Currently, the resources could be:
    * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+   * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
    * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -227,8 +228,9 @@ public interface VersionOrBuilder *
    * Output only. Repository-specific Metadata stored against this version.
    * The fields returned are defined by the underlying repository-specific
-   * resource. Currently, the only resource in use is
+   * resource. Currently, the resources could be:
    * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+   * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
    * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -242,8 +244,9 @@ public interface VersionOrBuilder *
    * Output only. Repository-specific Metadata stored against this version.
    * The fields returned are defined by the underlying repository-specific
-   * resource. Currently, the only resource in use is
+   * resource. Currently, the resources could be:
    * [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
+   * [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact]
    * 
* * .google.protobuf.Struct metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VersionProto.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VersionProto.java index a4451c3a204e..efd5725d8e6e 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VersionProto.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VersionProto.java @@ -47,6 +47,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_devtools_artifactregistry_v1_DeleteVersionRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_devtools_artifactregistry_v1_DeleteVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -83,15 +87,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "nRequest\022\014\n\004name\030\001 \001(\t\022>\n\004view\030\002 \001(\01620.g" + "oogle.devtools.artifactregistry.v1.Versi" + "onView\"3\n\024DeleteVersionRequest\022\014\n\004name\030\001" - + " \001(\t\022\r\n\005force\030\002 \001(\010*@\n\013VersionView\022\034\n\030VE" - + "RSION_VIEW_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004F" - + "ULL\020\002B\372\001\n\'com.google.devtools.artifactre" - + "gistry.v1B\014VersionProtoP\001ZSgoogle.golang" - + ".org/genproto/googleapis/devtools/artifa" - + "ctregistry/v1;artifactregistry\252\002 Google." - + "Cloud.ArtifactRegistry.V1\312\002 Google\\Cloud" - + "\\ArtifactRegistry\\V1\352\002#Google::Cloud::Ar" - + "tifactRegistry::V1b\006proto3" + + " \001(\t\022\r\n\005force\030\002 \001(\010\"6\n\033BatchDeleteVersio" + + "nsMetadata\022\027\n\017failed_versions\030\002 \003(\t*@\n\013V" + + "ersionView\022\034\n\030VERSION_VIEW_UNSPECIFIED\020\000" + + "\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002B\372\001\n\'com.google.dev" + + "tools.artifactregistry.v1B\014VersionProtoP" + + "\001ZSgoogle.golang.org/genproto/googleapis" + + "/devtools/artifactregistry/v1;artifactre" + + "gistry\252\002 Google.Cloud.ArtifactRegistry.V" + + "1\312\002 Google\\Cloud\\ArtifactRegistry\\V1\352\002#G" + + "oogle::Cloud::ArtifactRegistry::V1b\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -143,6 +149,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Force", }); + internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_descriptor, + new java.lang.String[] { + "FailedVersions", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VpcscConfigName.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VpcscConfigName.java new file mode 100644 index 000000000000..5c8818a919bb --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VpcscConfigName.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.devtools.artifactregistry.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 VpcscConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/vpcscConfig"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected VpcscConfigName() { + project = null; + location = null; + } + + private VpcscConfigName(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 VpcscConfigName 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 VpcscConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "VpcscConfigName.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 (VpcscConfigName 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()) { + VpcscConfigName that = ((VpcscConfigName) 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}/vpcscConfig. */ + 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(VpcscConfigName vpcscConfigName) { + this.project = vpcscConfigName.project; + this.location = vpcscConfigName.location; + } + + public VpcscConfigName build() { + return new VpcscConfigName(this); + } + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/apt_artifact.proto b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/apt_artifact.proto index c8fcb10c4e85..9e6fa09eecf9 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/apt_artifact.proto +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/apt_artifact.proto @@ -111,6 +111,4 @@ message ImportAptArtifactsResponse { } // The operation metadata for importing artifacts. -message ImportAptArtifactsMetadata { - -} +message ImportAptArtifactsMetadata {} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/artifact.proto b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/artifact.proto index 14173d57a26c..f5c1fa11ca40 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/artifact.proto +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/artifact.proto @@ -40,8 +40,8 @@ message DockerImage { pattern: "projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}" }; - // Required. registry_location, project_id, repository_name and image id forms a unique - // image + // Required. registry_location, project_id, repository_name and image id forms + // a unique image // name:`projects//locations//repository//dockerImages/`. // For example, // "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ @@ -80,11 +80,16 @@ message DockerImage { // The build time is returned to the client as an RFC 3339 string, which can // be easily used with the JavaScript Date constructor. google.protobuf.Timestamp build_time = 7; + + // Output only. The time when the docker image was last updated. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The request to list docker images. message ListDockerImagesRequest { - // Required. The name of the parent resource whose docker images will be listed. + // Required. The name of the parent resource whose docker images will be + // listed. string parent = 1 [(google.api.field_behavior) = REQUIRED]; // The maximum number of artifacts to return. @@ -92,6 +97,9 @@ message ListDockerImagesRequest { // The next_page_token value returned from a previous list request, if any. string page_token = 3; + + // The field to order the results by. + string order_by = 4; } // The response from listing docker images. @@ -114,3 +122,234 @@ message GetDockerImageRequest { } ]; } + +// MavenArtifact represents a maven artifact. +message MavenArtifact { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/MavenArtifact" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}" + }; + + // Required. registry_location, project_id, repository_name and maven_artifact + // forms a unique artifact For example, + // "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/ + // com.google.guava:guava:31.0-jre", + // where "us-west4" is the registry_location, "test-project" is the + // project_id, "test-repo" is the repository_name and + // "com.google.guava:guava:31.0-jre" + // is the maven artifact. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URL to access the pom file of the artifact. + // Example: + // us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom + string pom_uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Group ID for the artifact. + // Example: + // com.google.guava + string group_id = 3; + + // Artifact ID for the artifact. + string artifact_id = 4; + + // Version of this artifact. + string version = 5; + + // Output only. Time the artifact was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the artifact was updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to list maven artifacts. +message ListMavenArtifactsRequest { + // Required. The name of the parent resource whose maven artifacts will be + // listed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/MavenArtifact" + } + ]; + + // The maximum number of artifacts to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing maven artifacts. +message ListMavenArtifactsResponse { + // The maven artifacts returned. + repeated MavenArtifact maven_artifacts = 1; + + // The token to retrieve the next page of artifacts, or empty if there are no + // more artifacts to return. + string next_page_token = 2; +} + +// The request to get maven artifacts. +message GetMavenArtifactRequest { + // Required. The name of the maven artifact. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/MavenArtifact" + } + ]; +} + +// NpmPackage represents an npm artifact. +message NpmPackage { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/NpmPackage" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}" + }; + + // Required. registry_location, project_id, repository_name and npm_package + // forms a unique package For example, + // "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ + // npm_test:1.0.0", + // where "us-west4" is the registry_location, "test-project" is the + // project_id, "test-repo" is the repository_name and + // npm_test:1.0.0" is the npm package. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Package for the artifact. + string package_name = 3; + + // Version of this package. + string version = 4; + + // Tags attached to this package. + repeated string tags = 5; + + // Output only. Time the package was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the package was updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to list npm packages. +message ListNpmPackagesRequest { + // Required. The name of the parent resource whose npm packages will be + // listed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/NpmPackage" + } + ]; + + // The maximum number of artifacts to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing npm packages. +message ListNpmPackagesResponse { + // The npm packages returned. + repeated NpmPackage npm_packages = 1; + + // The token to retrieve the next page of artifacts, or empty if there are no + // more artifacts to return. + string next_page_token = 2; +} + +// The request to get npm packages. +message GetNpmPackageRequest { + // Required. The name of the npm package. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/NpmPackage" + } + ]; +} + +// PythonPackage represents a python artifact. +message PythonPackage { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/PythonPackage" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}" + }; + + // Required. registry_location, project_id, repository_name and python_package + // forms a unique package + // name:`projects//locations//repository//pythonPackages/`. + // For example, + // "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/ + // python_package:1.0.0", + // where "us-west4" is the registry_location, "test-project" is the + // project_id, "test-repo" is the repository_name and + // python_package:1.0.0" is the python package. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URL to access the package. + // Example: + // us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Package for the artifact. + string package_name = 3; + + // Version of this package. + string version = 4; + + // Output only. Time the package was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the package was updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to list python packages. +message ListPythonPackagesRequest { + // Required. The name of the parent resource whose python packages will be + // listed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/PythonPackage" + } + ]; + + // The maximum number of artifacts to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing python packages. +message ListPythonPackagesResponse { + // The python packages returned. + repeated PythonPackage python_packages = 1; + + // The token to retrieve the next page of artifacts, or empty if there are no + // more artifacts to return. + string next_page_token = 2; +} + +// The request to get python packages. +message GetPythonPackageRequest { + // Required. The name of the python package. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/PythonPackage" + } + ]; +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/file.proto b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/file.proto index a6b284a927aa..e62a72ea74ec 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/file.proto +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/file.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.devtools.artifactregistry.v1; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; @@ -66,21 +67,33 @@ message File { // The hashes of the file content. repeated Hash hashes = 4; - // The time when the File was created. - google.protobuf.Timestamp create_time = 5; + // Output only. The time when the File was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // The time when the File was last updated. - google.protobuf.Timestamp update_time = 6; + // Output only. The time when the File was last updated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the Package or Version that owns this file, if any. string owner = 7; + + // Output only. The time when the last attempt to refresh the file's data was + // made. Only set when the repository is remote. + google.protobuf.Timestamp fetch_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The request to list files. message ListFilesRequest { - // The name of the repository whose files will be listed. For example: - // "projects/p1/locations/us-central1/repositories/repo1 - string parent = 1; + // Required. The name of the repository whose files will be listed. For + // example: "projects/p1/locations/us-central1/repositories/repo1 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/File" + } + ]; // An expression for filtering the results of the request. Filter rules are // case insensitive. The fields eligible for filtering are: @@ -118,6 +131,11 @@ message ListFilesResponse { // The request to retrieve a file. message GetFileRequest { - // The name of the file to retrieve. - string name = 1; + // Required. The name of the file to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/File" + } + ]; } diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/package.proto b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/package.proto index e1b0129d393d..58de095ab53d 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/package.proto +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/package.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.devtools.artifactregistry.v1; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; @@ -29,6 +30,10 @@ option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; // Packages are named collections of versions. message Package { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/Package" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}" + }; // The name of the package, for example: // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1". @@ -50,7 +55,10 @@ message Package { message ListPackagesRequest { // Required. The name of the parent resource whose packages will be listed. string parent = 1 [ - (google.api.field_behavior) = REQUIRED + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/Package" + } ]; // The maximum number of packages to return. Maximum page size is 1,000. @@ -74,7 +82,10 @@ message ListPackagesResponse { message GetPackageRequest { // Required. The name of the package to retrieve. string name = 1 [ - (google.api.field_behavior) = REQUIRED + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Package" + } ]; } @@ -82,6 +93,9 @@ message GetPackageRequest { message DeletePackageRequest { // Required. The name of the package to delete. string name = 1 [ - (google.api.field_behavior) = REQUIRED + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Package" + } ]; } diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/service.proto b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/service.proto index ed1cee05e1ad..ec8d3a9667a4 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/service.proto +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/service.proto @@ -26,6 +26,7 @@ import "google/devtools/artifactregistry/v1/repository.proto"; import "google/devtools/artifactregistry/v1/settings.proto"; import "google/devtools/artifactregistry/v1/tag.proto"; import "google/devtools/artifactregistry/v1/version.proto"; +import "google/devtools/artifactregistry/v1/vpcsc_config.proto"; import "google/devtools/artifactregistry/v1/yum_artifact.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; @@ -60,7 +61,8 @@ service ArtifactRegistry { "https://www.googleapis.com/auth/cloud-platform.read-only"; // Lists docker images. - rpc ListDockerImages(ListDockerImagesRequest) returns (ListDockerImagesResponse) { + rpc ListDockerImages(ListDockerImagesRequest) + returns (ListDockerImagesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages" }; @@ -75,11 +77,63 @@ service ArtifactRegistry { option (google.api.method_signature) = "name"; } + // Lists maven artifacts. + rpc ListMavenArtifacts(ListMavenArtifactsRequest) + returns (ListMavenArtifactsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a maven artifact. + rpc GetMavenArtifact(GetMavenArtifactRequest) returns (MavenArtifact) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists npm packages. + rpc ListNpmPackages(ListNpmPackagesRequest) + returns (ListNpmPackagesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a npm package. + rpc GetNpmPackage(GetNpmPackageRequest) returns (NpmPackage) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists python packages. + rpc ListPythonPackages(ListPythonPackagesRequest) + returns (ListPythonPackagesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a python package. + rpc GetPythonPackage(GetPythonPackageRequest) returns (PythonPackage) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}" + }; + option (google.api.method_signature) = "name"; + } + // Imports Apt artifacts. The returned Operation will complete once the // resources are imported. Package, Version, and File resources are created // based on the imported artifacts. Imported artifacts that conflict with // existing resources are ignored. - rpc ImportAptArtifacts(ImportAptArtifactsRequest) returns (google.longrunning.Operation) { + rpc ImportAptArtifacts(ImportAptArtifactsRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import" body: "*" @@ -94,7 +148,8 @@ service ArtifactRegistry { // resources are imported. Package, Version, and File resources are created // based on the imported artifacts. Imported artifacts that conflict with // existing resources are ignored. - rpc ImportYumArtifacts(ImportYumArtifactsRequest) returns (google.longrunning.Operation) { + rpc ImportYumArtifacts(ImportYumArtifactsRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import" body: "*" @@ -106,7 +161,8 @@ service ArtifactRegistry { } // Lists repositories. - rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) { + rpc ListRepositories(ListRepositoriesRequest) + returns (ListRepositoriesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/repositories" }; @@ -123,7 +179,8 @@ service ArtifactRegistry { // Creates a repository. The returned Operation will finish once the // repository has been created. Its response will be the created Repository. - rpc CreateRepository(CreateRepositoryRequest) returns (google.longrunning.Operation) { + rpc CreateRepository(CreateRepositoryRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/repositories" body: "repository" @@ -147,7 +204,8 @@ service ArtifactRegistry { // Deletes a repository and all of its contents. The returned Operation will // finish once the repository has been deleted. It will not have any Operation // metadata and will return a google.protobuf.Empty response. - rpc DeleteRepository(DeleteRepositoryRequest) returns (google.longrunning.Operation) { + rpc DeleteRepository(DeleteRepositoryRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/repositories/*}" }; @@ -176,7 +234,8 @@ service ArtifactRegistry { // Deletes a package and all of its versions and tags. The returned operation // will complete once the package has been deleted. - rpc DeletePackage(DeletePackageRequest) returns (google.longrunning.Operation) { + rpc DeletePackage(DeletePackageRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" }; @@ -205,7 +264,8 @@ service ArtifactRegistry { // Deletes a version and all of its content. The returned operation will // complete once the version has been deleted. - rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) { + rpc DeleteVersion(DeleteVersionRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" }; @@ -275,7 +335,8 @@ service ArtifactRegistry { } // Updates the IAM policy for a given resource. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy" body: "*" @@ -283,14 +344,16 @@ service ArtifactRegistry { } // Gets the IAM policy for a given resource. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { get: "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" }; } // Tests if the caller has a list of permissions on a resource. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions" body: "*" @@ -306,16 +369,32 @@ service ArtifactRegistry { } // Updates the Settings for the Project. - rpc UpdateProjectSettings(UpdateProjectSettingsRequest) returns (ProjectSettings) { + rpc UpdateProjectSettings(UpdateProjectSettingsRequest) + returns (ProjectSettings) { option (google.api.http) = { patch: "/v1/{project_settings.name=projects/*/projectSettings}" body: "project_settings" }; option (google.api.method_signature) = "project_settings,update_mask"; } -} -// Metadata type for longrunning-operations, currently empty. -message OperationMetadata { + // Retrieves the VPCSC Config for the Project. + rpc GetVPCSCConfig(GetVPCSCConfigRequest) returns (VPCSCConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/vpcscConfig}" + }; + option (google.api.method_signature) = "name"; + } + // Updates the VPCSC Config for the Project. + rpc UpdateVPCSCConfig(UpdateVPCSCConfigRequest) returns (VPCSCConfig) { + option (google.api.http) = { + patch: "/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}" + body: "vpcsc_config" + }; + option (google.api.method_signature) = "vpcsc_config,update_mask"; + } } + +// Metadata type for longrunning-operations, currently empty. +message OperationMetadata {} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/settings.proto b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/settings.proto index 5c4e18c10519..d5602085d592 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/settings.proto +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/settings.proto @@ -47,7 +47,7 @@ message ProjectSettings { REDIRECTION_FROM_GCR_IO_ENABLED = 2; // Redirection is enabled, and has been finalized so cannot be reverted. - REDIRECTION_FROM_GCR_IO_FINALIZED = 3; + REDIRECTION_FROM_GCR_IO_FINALIZED = 3 [deprecated = true]; } // The name of the project's settings. diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/version.proto b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/version.proto index f4ac0a92a003..25b11ed73e45 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/version.proto +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/version.proto @@ -74,9 +74,11 @@ message Version { // Output only. Repository-specific Metadata stored against this version. // The fields returned are defined by the underlying repository-specific - // resource. Currently, the only resource in use is + // resource. Currently, the resources could be: // [DockerImage][google.devtools.artifactregistry.v1.DockerImage] - google.protobuf.Struct metadata = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + // [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact] + google.protobuf.Struct metadata = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The request to list versions. @@ -125,3 +127,9 @@ message DeleteVersionRequest { // version and any tags pointing to the version are deleted. bool force = 2; } + +// The metadata of an LRO from deleting multiple versions. +message BatchDeleteVersionsMetadata { + // The versions the operation failed to delete. + repeated string failed_versions = 2; +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/vpcsc_config.proto b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/vpcsc_config.proto new file mode 100644 index 000000000000..852413a7aba8 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/vpcsc_config.proto @@ -0,0 +1,86 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.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.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; +option java_multiple_files = true; +option java_outer_classname = "VPCSCConfigProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// The Artifact Registry VPC SC config that apply to a Project. +message VPCSCConfig { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/VpcscConfig" + pattern: "projects/{project}/locations/{location}/vpcscConfig" + }; + + // VPCSCPolicy is the VPC SC policy for project and location. + enum VPCSCPolicy { + // VPCSC_POLICY_UNSPECIFIED - the VPS SC policy is not defined. + // When VPS SC policy is not defined - the Service will use the default + // behavior (VPCSC_DENY). + VPCSC_POLICY_UNSPECIFIED = 0; + + // VPCSC_DENY - repository will block the requests to the Upstreams for the + // Remote Repositories if the resource is in the perimeter. + DENY = 1; + + // VPCSC_ALLOW - repository will allow the requests to the Upstreams for the + // Remote Repositories if the resource is in the perimeter. + ALLOW = 2; + } + + // The name of the project's VPC SC Config. + // + // Always of the form: + // projects/{projectID}/locations/{location}/vpcscConfig + // + // In update request: never set + // In response: always set + string name = 1; + + // The project per location VPC SC policy that defines the VPC SC behavior for + // the Remote Repository (Allow/Deny). + VPCSCPolicy vpcsc_policy = 2; +} + +// Gets the VPC SC config for a project. +message GetVPCSCConfigRequest { + // Required. The name of the VPCSCConfig resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/VpcscConfig" + } + ]; +} + +// Sets the VPCSC config of the project. +message UpdateVPCSCConfigRequest { + // The project config. + VPCSCConfig vpcsc_config = 1; + + // Field mask to support partial updates. + google.protobuf.FieldMask update_mask = 2; +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/yum_artifact.proto b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/yum_artifact.proto index 0d1faafe9740..4e7870d407f6 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/yum_artifact.proto +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/yum_artifact.proto @@ -103,6 +103,4 @@ message ImportYumArtifactsResponse { } // The operation metadata for importing artifacts. -message ImportYumArtifactsMetadata { - -} +message ImportYumArtifactsMetadata {} diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/AsyncDeletePackage.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/AsyncDeletePackage.java index 395698169892..bed41d2f97ba 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/AsyncDeletePackage.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/AsyncDeletePackage.java @@ -20,6 +20,7 @@ import com.google.api.core.ApiFuture; import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.DeletePackageRequest; +import com.google.devtools.artifactregistry.v1.PackageName; import com.google.longrunning.Operation; public class AsyncDeletePackage { @@ -36,7 +37,10 @@ public static void asyncDeletePackage() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { DeletePackageRequest request = - DeletePackageRequest.newBuilder().setName("name3373707").build(); + DeletePackageRequest.newBuilder() + .setName( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + .build(); ApiFuture future = artifactRegistryClient.deletePackageCallable().futureCall(request); // Do something. diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/AsyncDeletePackageLRO.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/AsyncDeletePackageLRO.java index 2f0cbb265d78..ab8bac55b53b 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/AsyncDeletePackageLRO.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/AsyncDeletePackageLRO.java @@ -21,6 +21,7 @@ import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.DeletePackageRequest; import com.google.devtools.artifactregistry.v1.OperationMetadata; +import com.google.devtools.artifactregistry.v1.PackageName; import com.google.protobuf.Empty; public class AsyncDeletePackageLRO { @@ -37,7 +38,10 @@ public static void asyncDeletePackageLRO() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { DeletePackageRequest request = - DeletePackageRequest.newBuilder().setName("name3373707").build(); + DeletePackageRequest.newBuilder() + .setName( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + .build(); OperationFuture future = artifactRegistryClient.deletePackageOperationCallable().futureCall(request); // Do something. diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackage.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackage.java index 7316912500e1..32b9a5908fc8 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackage.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackage.java @@ -19,6 +19,7 @@ // [START artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync] import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.DeletePackageRequest; +import com.google.devtools.artifactregistry.v1.PackageName; import com.google.protobuf.Empty; public class SyncDeletePackage { @@ -35,7 +36,10 @@ public static void syncDeletePackage() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { DeletePackageRequest request = - DeletePackageRequest.newBuilder().setName("name3373707").build(); + DeletePackageRequest.newBuilder() + .setName( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + .build(); artifactRegistryClient.deletePackageAsync(request).get(); } } diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackagePackagename.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackagePackagename.java new file mode 100644 index 000000000000..4efe5abc659d --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackagePackagename.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_Packagename_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.PackageName; +import com.google.protobuf.Empty; + +public class SyncDeletePackagePackagename { + + public static void main(String[] args) throws Exception { + syncDeletePackagePackagename(); + } + + public static void syncDeletePackagePackagename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + artifactRegistryClient.deletePackageAsync(name).get(); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_Packagename_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackageString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackageString.java index cc98e57326e1..bfde233508e6 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackageString.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/deletepackage/SyncDeletePackageString.java @@ -18,6 +18,7 @@ // [START artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_String_sync] import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.PackageName; import com.google.protobuf.Empty; public class SyncDeletePackageString { @@ -33,7 +34,8 @@ public static void syncDeletePackageString() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - String name = "name3373707"; + String name = + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString(); artifactRegistryClient.deletePackageAsync(name).get(); } } diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/AsyncGetFile.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/AsyncGetFile.java index 295d19e7cc7f..7d6ea0b17c0a 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/AsyncGetFile.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/AsyncGetFile.java @@ -20,6 +20,7 @@ import com.google.api.core.ApiFuture; import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.File; +import com.google.devtools.artifactregistry.v1.FileName; import com.google.devtools.artifactregistry.v1.GetFileRequest; public class AsyncGetFile { @@ -35,7 +36,10 @@ public static void asyncGetFile() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - GetFileRequest request = GetFileRequest.newBuilder().setName("name3373707").build(); + GetFileRequest request = + GetFileRequest.newBuilder() + .setName(FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString()) + .build(); ApiFuture future = artifactRegistryClient.getFileCallable().futureCall(request); // Do something. File response = future.get(); diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFile.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFile.java index ed926e10ddb0..9fe6ef8e5b2a 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFile.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFile.java @@ -19,6 +19,7 @@ // [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync] import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.File; +import com.google.devtools.artifactregistry.v1.FileName; import com.google.devtools.artifactregistry.v1.GetFileRequest; public class SyncGetFile { @@ -34,7 +35,10 @@ public static void syncGetFile() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - GetFileRequest request = GetFileRequest.newBuilder().setName("name3373707").build(); + GetFileRequest request = + GetFileRequest.newBuilder() + .setName(FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString()) + .build(); File response = artifactRegistryClient.getFile(request); } } diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFileFilename.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFileFilename.java new file mode 100644 index 000000000000..e3a824f20d57 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFileFilename.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_Filename_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.File; +import com.google.devtools.artifactregistry.v1.FileName; + +public class SyncGetFileFilename { + + public static void main(String[] args) throws Exception { + syncGetFileFilename(); + } + + public static void syncGetFileFilename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + FileName name = FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]"); + File response = artifactRegistryClient.getFile(name); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetFile_Filename_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFileString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFileString.java index 3d4ebc89c7d2..20f0079d706e 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFileString.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getfile/SyncGetFileString.java @@ -19,6 +19,7 @@ // [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_String_sync] import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.File; +import com.google.devtools.artifactregistry.v1.FileName; public class SyncGetFileString { @@ -33,7 +34,7 @@ public static void syncGetFileString() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - String name = "name3373707"; + String name = FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString(); File response = artifactRegistryClient.getFile(name); } } diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/AsyncGetMavenArtifact.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/AsyncGetMavenArtifact.java new file mode 100644 index 000000000000..75bc113af6f9 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/AsyncGetMavenArtifact.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async] +import com.google.api.core.ApiFuture; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.MavenArtifactName; + +public class AsyncGetMavenArtifact { + + public static void main(String[] args) throws Exception { + asyncGetMavenArtifact(); + } + + public static void asyncGetMavenArtifact() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + GetMavenArtifactRequest request = + GetMavenArtifactRequest.newBuilder() + .setName( + MavenArtifactName.of( + "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]") + .toString()) + .build(); + ApiFuture future = + artifactRegistryClient.getMavenArtifactCallable().futureCall(request); + // Do something. + MavenArtifact response = future.get(); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifact.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifact.java new file mode 100644 index 000000000000..e8f868166745 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifact.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.GetMavenArtifactRequest; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.MavenArtifactName; + +public class SyncGetMavenArtifact { + + public static void main(String[] args) throws Exception { + syncGetMavenArtifact(); + } + + public static void syncGetMavenArtifact() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + GetMavenArtifactRequest request = + GetMavenArtifactRequest.newBuilder() + .setName( + MavenArtifactName.of( + "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]") + .toString()) + .build(); + MavenArtifact response = artifactRegistryClient.getMavenArtifact(request); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifactMavenartifactname.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifactMavenartifactname.java new file mode 100644 index 000000000000..669f4732b3ee --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifactMavenartifactname.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_Mavenartifactname_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.MavenArtifactName; + +public class SyncGetMavenArtifactMavenartifactname { + + public static void main(String[] args) throws Exception { + syncGetMavenArtifactMavenartifactname(); + } + + public static void syncGetMavenArtifactMavenartifactname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + MavenArtifactName name = + MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]"); + MavenArtifact response = artifactRegistryClient.getMavenArtifact(name); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_Mavenartifactname_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifactString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifactString.java new file mode 100644 index 000000000000..766d2bd6a717 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getmavenartifact/SyncGetMavenArtifactString.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_String_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.MavenArtifactName; + +public class SyncGetMavenArtifactString { + + public static void main(String[] args) throws Exception { + syncGetMavenArtifactString(); + } + + public static void syncGetMavenArtifactString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + String name = + MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]") + .toString(); + MavenArtifact response = artifactRegistryClient.getMavenArtifact(name); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_String_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/AsyncGetNpmPackage.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/AsyncGetNpmPackage.java new file mode 100644 index 000000000000..e006c63b0669 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/AsyncGetNpmPackage.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async] +import com.google.api.core.ApiFuture; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.GetNpmPackageRequest; +import com.google.devtools.artifactregistry.v1.NpmPackage; +import com.google.devtools.artifactregistry.v1.NpmPackageName; + +public class AsyncGetNpmPackage { + + public static void main(String[] args) throws Exception { + asyncGetNpmPackage(); + } + + public static void asyncGetNpmPackage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + GetNpmPackageRequest request = + GetNpmPackageRequest.newBuilder() + .setName( + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]") + .toString()) + .build(); + ApiFuture future = + artifactRegistryClient.getNpmPackageCallable().futureCall(request); + // Do something. + NpmPackage response = future.get(); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackage.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackage.java new file mode 100644 index 000000000000..746770839c9c --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackage.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.GetNpmPackageRequest; +import com.google.devtools.artifactregistry.v1.NpmPackage; +import com.google.devtools.artifactregistry.v1.NpmPackageName; + +public class SyncGetNpmPackage { + + public static void main(String[] args) throws Exception { + syncGetNpmPackage(); + } + + public static void syncGetNpmPackage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + GetNpmPackageRequest request = + GetNpmPackageRequest.newBuilder() + .setName( + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]") + .toString()) + .build(); + NpmPackage response = artifactRegistryClient.getNpmPackage(request); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackageNpmpackagename.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackageNpmpackagename.java new file mode 100644 index 000000000000..42ee22ca4456 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackageNpmpackagename.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_Npmpackagename_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.NpmPackage; +import com.google.devtools.artifactregistry.v1.NpmPackageName; + +public class SyncGetNpmPackageNpmpackagename { + + public static void main(String[] args) throws Exception { + syncGetNpmPackageNpmpackagename(); + } + + public static void syncGetNpmPackageNpmpackagename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + NpmPackageName name = + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]"); + NpmPackage response = artifactRegistryClient.getNpmPackage(name); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_Npmpackagename_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackageString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackageString.java new file mode 100644 index 000000000000..2ffb46540dea --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getnpmpackage/SyncGetNpmPackageString.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_String_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.NpmPackage; +import com.google.devtools.artifactregistry.v1.NpmPackageName; + +public class SyncGetNpmPackageString { + + public static void main(String[] args) throws Exception { + syncGetNpmPackageString(); + } + + public static void syncGetNpmPackageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + String name = + NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]").toString(); + NpmPackage response = artifactRegistryClient.getNpmPackage(name); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_String_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/AsyncGetPackage.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/AsyncGetPackage.java index a739760d6967..873bd912fc8b 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/AsyncGetPackage.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/AsyncGetPackage.java @@ -21,6 +21,7 @@ import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.GetPackageRequest; import com.google.devtools.artifactregistry.v1.Package; +import com.google.devtools.artifactregistry.v1.PackageName; public class AsyncGetPackage { @@ -35,7 +36,11 @@ public static void asyncGetPackage() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - GetPackageRequest request = GetPackageRequest.newBuilder().setName("name3373707").build(); + GetPackageRequest request = + GetPackageRequest.newBuilder() + .setName( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + .build(); ApiFuture future = artifactRegistryClient.getPackageCallable().futureCall(request); // Do something. Package response = future.get(); diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackage.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackage.java index beae38f93215..387c7412e7a5 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackage.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackage.java @@ -20,6 +20,7 @@ import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.GetPackageRequest; import com.google.devtools.artifactregistry.v1.Package; +import com.google.devtools.artifactregistry.v1.PackageName; public class SyncGetPackage { @@ -34,7 +35,11 @@ public static void syncGetPackage() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - GetPackageRequest request = GetPackageRequest.newBuilder().setName("name3373707").build(); + GetPackageRequest request = + GetPackageRequest.newBuilder() + .setName( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + .build(); Package response = artifactRegistryClient.getPackage(request); } } diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackagePackagename.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackagePackagename.java new file mode 100644 index 000000000000..16efbcb4649b --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackagePackagename.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetPackage_Packagename_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.Package; +import com.google.devtools.artifactregistry.v1.PackageName; + +public class SyncGetPackagePackagename { + + public static void main(String[] args) throws Exception { + syncGetPackagePackagename(); + } + + public static void syncGetPackagePackagename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + Package response = artifactRegistryClient.getPackage(name); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetPackage_Packagename_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackageString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackageString.java index 31d837092cb3..740585117c48 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackageString.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpackage/SyncGetPackageString.java @@ -19,6 +19,7 @@ // [START artifactregistry_v1_generated_ArtifactRegistry_GetPackage_String_sync] import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.Package; +import com.google.devtools.artifactregistry.v1.PackageName; public class SyncGetPackageString { @@ -33,7 +34,8 @@ public static void syncGetPackageString() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - String name = "name3373707"; + String name = + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString(); Package response = artifactRegistryClient.getPackage(name); } } diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/AsyncGetPythonPackage.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/AsyncGetPythonPackage.java new file mode 100644 index 000000000000..901483cfa711 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/AsyncGetPythonPackage.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async] +import com.google.api.core.ApiFuture; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.GetPythonPackageRequest; +import com.google.devtools.artifactregistry.v1.PythonPackage; +import com.google.devtools.artifactregistry.v1.PythonPackageName; + +public class AsyncGetPythonPackage { + + public static void main(String[] args) throws Exception { + asyncGetPythonPackage(); + } + + public static void asyncGetPythonPackage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + GetPythonPackageRequest request = + GetPythonPackageRequest.newBuilder() + .setName( + PythonPackageName.of( + "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]") + .toString()) + .build(); + ApiFuture future = + artifactRegistryClient.getPythonPackageCallable().futureCall(request); + // Do something. + PythonPackage response = future.get(); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackage.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackage.java new file mode 100644 index 000000000000..f738c9cb96a1 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackage.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.GetPythonPackageRequest; +import com.google.devtools.artifactregistry.v1.PythonPackage; +import com.google.devtools.artifactregistry.v1.PythonPackageName; + +public class SyncGetPythonPackage { + + public static void main(String[] args) throws Exception { + syncGetPythonPackage(); + } + + public static void syncGetPythonPackage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + GetPythonPackageRequest request = + GetPythonPackageRequest.newBuilder() + .setName( + PythonPackageName.of( + "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]") + .toString()) + .build(); + PythonPackage response = artifactRegistryClient.getPythonPackage(request); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackagePythonpackagename.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackagePythonpackagename.java new file mode 100644 index 000000000000..232416a2dc19 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackagePythonpackagename.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_Pythonpackagename_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.PythonPackage; +import com.google.devtools.artifactregistry.v1.PythonPackageName; + +public class SyncGetPythonPackagePythonpackagename { + + public static void main(String[] args) throws Exception { + syncGetPythonPackagePythonpackagename(); + } + + public static void syncGetPythonPackagePythonpackagename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + PythonPackageName name = + PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]"); + PythonPackage response = artifactRegistryClient.getPythonPackage(name); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_Pythonpackagename_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackageString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackageString.java new file mode 100644 index 000000000000..5686901c1493 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getpythonpackage/SyncGetPythonPackageString.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_String_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.PythonPackage; +import com.google.devtools.artifactregistry.v1.PythonPackageName; + +public class SyncGetPythonPackageString { + + public static void main(String[] args) throws Exception { + syncGetPythonPackageString(); + } + + public static void syncGetPythonPackageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + String name = + PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]") + .toString(); + PythonPackage response = artifactRegistryClient.getPythonPackage(name); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_String_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/AsyncGetVPCSCConfig.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/AsyncGetVPCSCConfig.java new file mode 100644 index 000000000000..7f83ee58ae1d --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/AsyncGetVPCSCConfig.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async] +import com.google.api.core.ApiFuture; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; +import com.google.devtools.artifactregistry.v1.VPCSCConfig; +import com.google.devtools.artifactregistry.v1.VpcscConfigName; + +public class AsyncGetVPCSCConfig { + + public static void main(String[] args) throws Exception { + asyncGetVPCSCConfig(); + } + + public static void asyncGetVPCSCConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + GetVPCSCConfigRequest request = + GetVPCSCConfigRequest.newBuilder() + .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + ApiFuture future = + artifactRegistryClient.getVPCSCConfigCallable().futureCall(request); + // Do something. + VPCSCConfig response = future.get(); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfig.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfig.java new file mode 100644 index 000000000000..2ffc2e71b79e --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfig.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; +import com.google.devtools.artifactregistry.v1.VPCSCConfig; +import com.google.devtools.artifactregistry.v1.VpcscConfigName; + +public class SyncGetVPCSCConfig { + + public static void main(String[] args) throws Exception { + syncGetVPCSCConfig(); + } + + public static void syncGetVPCSCConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + GetVPCSCConfigRequest request = + GetVPCSCConfigRequest.newBuilder() + .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + VPCSCConfig response = artifactRegistryClient.getVPCSCConfig(request); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfigString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfigString.java new file mode 100644 index 000000000000..476276327095 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfigString.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_String_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.VPCSCConfig; +import com.google.devtools.artifactregistry.v1.VpcscConfigName; + +public class SyncGetVPCSCConfigString { + + public static void main(String[] args) throws Exception { + syncGetVPCSCConfigString(); + } + + public static void syncGetVPCSCConfigString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + String name = VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString(); + VPCSCConfig response = artifactRegistryClient.getVPCSCConfig(name); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_String_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfigVpcscconfigname.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfigVpcscconfigname.java new file mode 100644 index 000000000000..c43da8ea38d1 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/getvpcscconfig/SyncGetVPCSCConfigVpcscconfigname.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_Vpcscconfigname_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.VPCSCConfig; +import com.google.devtools.artifactregistry.v1.VpcscConfigName; + +public class SyncGetVPCSCConfigVpcscconfigname { + + public static void main(String[] args) throws Exception { + syncGetVPCSCConfigVpcscconfigname(); + } + + public static void syncGetVPCSCConfigVpcscconfigname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + VpcscConfigName name = VpcscConfigName.of("[PROJECT]", "[LOCATION]"); + VPCSCConfig response = artifactRegistryClient.getVPCSCConfig(name); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_Vpcscconfigname_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/AsyncListDockerImages.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/AsyncListDockerImages.java index 4d95edd9eeb5..a09c09b941b3 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/AsyncListDockerImages.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/AsyncListDockerImages.java @@ -40,6 +40,7 @@ public static void asyncListDockerImages() throws Exception { .setParent("parent-995424086") .setPageSize(883849137) .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") .build(); ApiFuture future = artifactRegistryClient.listDockerImagesPagedCallable().futureCall(request); diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/AsyncListDockerImagesPaged.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/AsyncListDockerImagesPaged.java index 5a4fe49fcf6e..b31cd2de3b87 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/AsyncListDockerImagesPaged.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/AsyncListDockerImagesPaged.java @@ -41,6 +41,7 @@ public static void asyncListDockerImagesPaged() throws Exception { .setParent("parent-995424086") .setPageSize(883849137) .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") .build(); while (true) { ListDockerImagesResponse response = diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/SyncListDockerImages.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/SyncListDockerImages.java index 126cf3165336..b57a6a879bd3 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/SyncListDockerImages.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listdockerimages/SyncListDockerImages.java @@ -39,6 +39,7 @@ public static void syncListDockerImages() throws Exception { .setParent("parent-995424086") .setPageSize(883849137) .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") .build(); for (DockerImage element : artifactRegistryClient.listDockerImages(request).iterateAll()) { // doThingsWith(element); diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/AsyncListFiles.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/AsyncListFiles.java index 6667ed99512c..78826cb01388 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/AsyncListFiles.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/AsyncListFiles.java @@ -21,6 +21,7 @@ import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.File; import com.google.devtools.artifactregistry.v1.ListFilesRequest; +import com.google.devtools.artifactregistry.v1.RepositoryName; public class AsyncListFiles { @@ -37,7 +38,7 @@ public static void asyncListFiles() throws Exception { try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { ListFilesRequest request = ListFilesRequest.newBuilder() - .setParent("parent-995424086") + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/AsyncListFilesPaged.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/AsyncListFilesPaged.java index b1bcb75a118f..8ca8713b3ae4 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/AsyncListFilesPaged.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/AsyncListFilesPaged.java @@ -22,6 +22,7 @@ import com.google.devtools.artifactregistry.v1.File; import com.google.devtools.artifactregistry.v1.ListFilesRequest; import com.google.devtools.artifactregistry.v1.ListFilesResponse; +import com.google.devtools.artifactregistry.v1.RepositoryName; public class AsyncListFilesPaged { @@ -38,7 +39,7 @@ public static void asyncListFilesPaged() throws Exception { try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { ListFilesRequest request = ListFilesRequest.newBuilder() - .setParent("parent-995424086") + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFiles.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFiles.java index c0d400bb68a0..48134fd57a0e 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFiles.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFiles.java @@ -20,6 +20,7 @@ import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.File; import com.google.devtools.artifactregistry.v1.ListFilesRequest; +import com.google.devtools.artifactregistry.v1.RepositoryName; public class SyncListFiles { @@ -36,7 +37,7 @@ public static void syncListFiles() throws Exception { try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { ListFilesRequest request = ListFilesRequest.newBuilder() - .setParent("parent-995424086") + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFilesRepositoryname.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFilesRepositoryname.java new file mode 100644 index 000000000000..e94cc2a694c1 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFilesRepositoryname.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListFiles_Repositoryname_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.File; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class SyncListFilesRepositoryname { + + public static void main(String[] args) throws Exception { + syncListFilesRepositoryname(); + } + + public static void syncListFilesRepositoryname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + for (File element : artifactRegistryClient.listFiles(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListFiles_Repositoryname_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFilesString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFilesString.java index 92d87a548726..9802aa71331f 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFilesString.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listfiles/SyncListFilesString.java @@ -19,6 +19,7 @@ // [START artifactregistry_v1_generated_ArtifactRegistry_ListFiles_String_sync] import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.File; +import com.google.devtools.artifactregistry.v1.RepositoryName; public class SyncListFilesString { @@ -33,7 +34,7 @@ public static void syncListFilesString() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - String parent = "parent-995424086"; + String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString(); for (File element : artifactRegistryClient.listFiles(parent).iterateAll()) { // doThingsWith(element); } diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/AsyncListMavenArtifacts.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/AsyncListMavenArtifacts.java new file mode 100644 index 000000000000..05500dbd9695 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/AsyncListMavenArtifacts.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async] +import com.google.api.core.ApiFuture; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class AsyncListMavenArtifacts { + + public static void main(String[] args) throws Exception { + asyncListMavenArtifacts(); + } + + public static void asyncListMavenArtifacts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + ListMavenArtifactsRequest request = + ListMavenArtifactsRequest.newBuilder() + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + artifactRegistryClient.listMavenArtifactsPagedCallable().futureCall(request); + // Do something. + for (MavenArtifact element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/AsyncListMavenArtifactsPaged.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/AsyncListMavenArtifactsPaged.java new file mode 100644 index 000000000000..284d9228d4ac --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/AsyncListMavenArtifactsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_Paged_async] +import com.google.common.base.Strings; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class AsyncListMavenArtifactsPaged { + + public static void main(String[] args) throws Exception { + asyncListMavenArtifactsPaged(); + } + + public static void asyncListMavenArtifactsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + ListMavenArtifactsRequest request = + ListMavenArtifactsRequest.newBuilder() + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListMavenArtifactsResponse response = + artifactRegistryClient.listMavenArtifactsCallable().call(request); + for (MavenArtifact element : response.getMavenArtifactsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_Paged_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifacts.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifacts.java new file mode 100644 index 000000000000..c7db5c9c04a8 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifacts.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class SyncListMavenArtifacts { + + public static void main(String[] args) throws Exception { + syncListMavenArtifacts(); + } + + public static void syncListMavenArtifacts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + ListMavenArtifactsRequest request = + ListMavenArtifactsRequest.newBuilder() + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (MavenArtifact element : + artifactRegistryClient.listMavenArtifacts(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifactsRepositoryname.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifactsRepositoryname.java new file mode 100644 index 000000000000..538f72d41dba --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifactsRepositoryname.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_Repositoryname_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class SyncListMavenArtifactsRepositoryname { + + public static void main(String[] args) throws Exception { + syncListMavenArtifactsRepositoryname(); + } + + public static void syncListMavenArtifactsRepositoryname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + for (MavenArtifact element : artifactRegistryClient.listMavenArtifacts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_Repositoryname_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifactsString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifactsString.java new file mode 100644 index 000000000000..a319bb5bb2d3 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listmavenartifacts/SyncListMavenArtifactsString.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_String_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.MavenArtifact; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class SyncListMavenArtifactsString { + + public static void main(String[] args) throws Exception { + syncListMavenArtifactsString(); + } + + public static void syncListMavenArtifactsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString(); + for (MavenArtifact element : artifactRegistryClient.listMavenArtifacts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_String_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/AsyncListNpmPackages.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/AsyncListNpmPackages.java new file mode 100644 index 000000000000..28f88d5a21c2 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/AsyncListNpmPackages.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async] +import com.google.api.core.ApiFuture; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest; +import com.google.devtools.artifactregistry.v1.NpmPackage; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class AsyncListNpmPackages { + + public static void main(String[] args) throws Exception { + asyncListNpmPackages(); + } + + public static void asyncListNpmPackages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + ListNpmPackagesRequest request = + ListNpmPackagesRequest.newBuilder() + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + artifactRegistryClient.listNpmPackagesPagedCallable().futureCall(request); + // Do something. + for (NpmPackage element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/AsyncListNpmPackagesPaged.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/AsyncListNpmPackagesPaged.java new file mode 100644 index 000000000000..60e2a7a38553 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/AsyncListNpmPackagesPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_Paged_async] +import com.google.common.base.Strings; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesResponse; +import com.google.devtools.artifactregistry.v1.NpmPackage; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class AsyncListNpmPackagesPaged { + + public static void main(String[] args) throws Exception { + asyncListNpmPackagesPaged(); + } + + public static void asyncListNpmPackagesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + ListNpmPackagesRequest request = + ListNpmPackagesRequest.newBuilder() + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListNpmPackagesResponse response = + artifactRegistryClient.listNpmPackagesCallable().call(request); + for (NpmPackage element : response.getNpmPackagesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_Paged_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackages.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackages.java new file mode 100644 index 000000000000..1e4f1a37add5 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackages.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.ListNpmPackagesRequest; +import com.google.devtools.artifactregistry.v1.NpmPackage; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class SyncListNpmPackages { + + public static void main(String[] args) throws Exception { + syncListNpmPackages(); + } + + public static void syncListNpmPackages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + ListNpmPackagesRequest request = + ListNpmPackagesRequest.newBuilder() + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (NpmPackage element : artifactRegistryClient.listNpmPackages(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackagesRepositoryname.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackagesRepositoryname.java new file mode 100644 index 000000000000..5d3d3d78b3e5 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackagesRepositoryname.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_Repositoryname_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.NpmPackage; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class SyncListNpmPackagesRepositoryname { + + public static void main(String[] args) throws Exception { + syncListNpmPackagesRepositoryname(); + } + + public static void syncListNpmPackagesRepositoryname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + for (NpmPackage element : artifactRegistryClient.listNpmPackages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_Repositoryname_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackagesString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackagesString.java new file mode 100644 index 000000000000..084215538e93 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listnpmpackages/SyncListNpmPackagesString.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_String_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.NpmPackage; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class SyncListNpmPackagesString { + + public static void main(String[] args) throws Exception { + syncListNpmPackagesString(); + } + + public static void syncListNpmPackagesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString(); + for (NpmPackage element : artifactRegistryClient.listNpmPackages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_String_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/AsyncListPackages.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/AsyncListPackages.java index 62697b8674e9..5b5fbd7254c0 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/AsyncListPackages.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/AsyncListPackages.java @@ -21,6 +21,7 @@ import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.ListPackagesRequest; import com.google.devtools.artifactregistry.v1.Package; +import com.google.devtools.artifactregistry.v1.RepositoryName; public class AsyncListPackages { @@ -37,7 +38,7 @@ public static void asyncListPackages() throws Exception { try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { ListPackagesRequest request = ListPackagesRequest.newBuilder() - .setParent("parent-995424086") + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/AsyncListPackagesPaged.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/AsyncListPackagesPaged.java index c65a99da6a0c..c105a02774c4 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/AsyncListPackagesPaged.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/AsyncListPackagesPaged.java @@ -22,6 +22,7 @@ import com.google.devtools.artifactregistry.v1.ListPackagesRequest; import com.google.devtools.artifactregistry.v1.ListPackagesResponse; import com.google.devtools.artifactregistry.v1.Package; +import com.google.devtools.artifactregistry.v1.RepositoryName; public class AsyncListPackagesPaged { @@ -38,7 +39,7 @@ public static void asyncListPackagesPaged() throws Exception { try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { ListPackagesRequest request = ListPackagesRequest.newBuilder() - .setParent("parent-995424086") + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackages.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackages.java index 6f70c016795c..a45943446e15 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackages.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackages.java @@ -20,6 +20,7 @@ import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.ListPackagesRequest; import com.google.devtools.artifactregistry.v1.Package; +import com.google.devtools.artifactregistry.v1.RepositoryName; public class SyncListPackages { @@ -36,7 +37,7 @@ public static void syncListPackages() throws Exception { try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { ListPackagesRequest request = ListPackagesRequest.newBuilder() - .setParent("parent-995424086") + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackagesRepositoryname.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackagesRepositoryname.java new file mode 100644 index 000000000000..734db97b1494 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackagesRepositoryname.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListPackages_Repositoryname_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.Package; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class SyncListPackagesRepositoryname { + + public static void main(String[] args) throws Exception { + syncListPackagesRepositoryname(); + } + + public static void syncListPackagesRepositoryname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + for (Package element : artifactRegistryClient.listPackages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListPackages_Repositoryname_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackagesString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackagesString.java index ae2224786dcb..e431e625fa8e 100644 --- a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackagesString.java +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpackages/SyncListPackagesString.java @@ -19,6 +19,7 @@ // [START artifactregistry_v1_generated_ArtifactRegistry_ListPackages_String_sync] import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; import com.google.devtools.artifactregistry.v1.Package; +import com.google.devtools.artifactregistry.v1.RepositoryName; public class SyncListPackagesString { @@ -33,7 +34,7 @@ public static void syncListPackagesString() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { - String parent = "parent-995424086"; + String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString(); for (Package element : artifactRegistryClient.listPackages(parent).iterateAll()) { // doThingsWith(element); } diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/AsyncListPythonPackages.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/AsyncListPythonPackages.java new file mode 100644 index 000000000000..8da629aa3595 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/AsyncListPythonPackages.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async] +import com.google.api.core.ApiFuture; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest; +import com.google.devtools.artifactregistry.v1.PythonPackage; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class AsyncListPythonPackages { + + public static void main(String[] args) throws Exception { + asyncListPythonPackages(); + } + + public static void asyncListPythonPackages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + ListPythonPackagesRequest request = + ListPythonPackagesRequest.newBuilder() + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + artifactRegistryClient.listPythonPackagesPagedCallable().futureCall(request); + // Do something. + for (PythonPackage element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/AsyncListPythonPackagesPaged.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/AsyncListPythonPackagesPaged.java new file mode 100644 index 000000000000..cf95e3811d04 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/AsyncListPythonPackagesPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_Paged_async] +import com.google.common.base.Strings; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesResponse; +import com.google.devtools.artifactregistry.v1.PythonPackage; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class AsyncListPythonPackagesPaged { + + public static void main(String[] args) throws Exception { + asyncListPythonPackagesPaged(); + } + + public static void asyncListPythonPackagesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + ListPythonPackagesRequest request = + ListPythonPackagesRequest.newBuilder() + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListPythonPackagesResponse response = + artifactRegistryClient.listPythonPackagesCallable().call(request); + for (PythonPackage element : response.getPythonPackagesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_Paged_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackages.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackages.java new file mode 100644 index 000000000000..bca4d2cd87a4 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackages.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.ListPythonPackagesRequest; +import com.google.devtools.artifactregistry.v1.PythonPackage; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class SyncListPythonPackages { + + public static void main(String[] args) throws Exception { + syncListPythonPackages(); + } + + public static void syncListPythonPackages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + ListPythonPackagesRequest request = + ListPythonPackagesRequest.newBuilder() + .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (PythonPackage element : + artifactRegistryClient.listPythonPackages(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackagesRepositoryname.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackagesRepositoryname.java new file mode 100644 index 000000000000..ed3018d2c075 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackagesRepositoryname.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_Repositoryname_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.PythonPackage; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class SyncListPythonPackagesRepositoryname { + + public static void main(String[] args) throws Exception { + syncListPythonPackagesRepositoryname(); + } + + public static void syncListPythonPackagesRepositoryname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + for (PythonPackage element : artifactRegistryClient.listPythonPackages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_Repositoryname_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackagesString.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackagesString.java new file mode 100644 index 000000000000..e5fd0ce5e349 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/listpythonpackages/SyncListPythonPackagesString.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_String_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.PythonPackage; +import com.google.devtools.artifactregistry.v1.RepositoryName; + +public class SyncListPythonPackagesString { + + public static void main(String[] args) throws Exception { + syncListPythonPackagesString(); + } + + public static void syncListPythonPackagesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString(); + for (PythonPackage element : artifactRegistryClient.listPythonPackages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_String_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/AsyncUpdateVPCSCConfig.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/AsyncUpdateVPCSCConfig.java new file mode 100644 index 000000000000..d83a407e7309 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/AsyncUpdateVPCSCConfig.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async] +import com.google.api.core.ApiFuture; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; +import com.google.devtools.artifactregistry.v1.VPCSCConfig; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateVPCSCConfig { + + public static void main(String[] args) throws Exception { + asyncUpdateVPCSCConfig(); + } + + public static void asyncUpdateVPCSCConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + UpdateVPCSCConfigRequest request = + UpdateVPCSCConfigRequest.newBuilder() + .setVpcscConfig(VPCSCConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + artifactRegistryClient.updateVPCSCConfigCallable().futureCall(request); + // Do something. + VPCSCConfig response = future.get(); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/SyncUpdateVPCSCConfig.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/SyncUpdateVPCSCConfig.java new file mode 100644 index 000000000000..fae6ecee82a5 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/SyncUpdateVPCSCConfig.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; +import com.google.devtools.artifactregistry.v1.VPCSCConfig; +import com.google.protobuf.FieldMask; + +public class SyncUpdateVPCSCConfig { + + public static void main(String[] args) throws Exception { + syncUpdateVPCSCConfig(); + } + + public static void syncUpdateVPCSCConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + UpdateVPCSCConfigRequest request = + UpdateVPCSCConfigRequest.newBuilder() + .setVpcscConfig(VPCSCConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + VPCSCConfig response = artifactRegistryClient.updateVPCSCConfig(request); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/SyncUpdateVPCSCConfigVpcscconfigFieldmask.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/SyncUpdateVPCSCConfigVpcscconfigFieldmask.java new file mode 100644 index 000000000000..9d29d4ae1af7 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/updatevpcscconfig/SyncUpdateVPCSCConfigVpcscconfigFieldmask.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.devtools.artifactregistry.v1.samples; + +// [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_VpcscconfigFieldmask_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.VPCSCConfig; +import com.google.protobuf.FieldMask; + +public class SyncUpdateVPCSCConfigVpcscconfigFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateVPCSCConfigVpcscconfigFieldmask(); + } + + public static void syncUpdateVPCSCConfigVpcscconfigFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) { + VPCSCConfig vpcscConfig = VPCSCConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + VPCSCConfig response = artifactRegistryClient.updateVPCSCConfig(vpcscConfig, updateMask); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_VpcscconfigFieldmask_sync]